Skip to content

Build your personal knowledge base with Trilium Notes

client/content manager/space usage: simplify the space usage status line

Adorian Doran5e171dcd7848
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json
index 34691d9996..9190793928 100644
--- a/apps/client/src/translations/en/translation.json
+++ b/apps/client/src/translations/en/translation.json
@@ -2690,9 +2690,9 @@
"center_subtree_size_hint": "Space this note and all of its descendants actually occupy, revisions included, with duplicated content counted once",
"back": "Back",
"current_note": "Current note:",
- "status_content_one": "Total content size: {{size}} in {{count}} note ({{revisionsSize}} revisions, {{attachmentsSize}} note attachments)",
- "status_content_other": "Total content size: {{size}} in {{count}} notes ({{revisionsSize}} revisions, {{attachmentsSize}} note attachments)",
- "status_content_hint": "Space the content actually occupies: all notes (hidden ones included), attachments and revisions, with duplicated content counted once. The bracketed figures are the space only revisions, respectively only attachments, hold.",
+ "status_content_one": "1 note occupying {{size}} (of which {{attachmentsSize}} are note attachments)",
+ "status_content_other": "{{count}} notes occupying {{size}} (of which {{attachmentsSize}} are note attachments)",
+ "status_content_hint": "Space held by all notes (hidden ones included), their attachments and their revisions, with duplicated content counted once",
"status_deleted_one": "Deleted notes: {{size}} in {{count}} note",
"status_deleted_other": "Deleted notes: {{size}} in {{count}} notes",
"status_deleted_hint": "Space still held by deleted notes; erasing them reclaims it",
diff --git a/apps/client/src/widgets/type_widgets/options/content_manager/space_usage/index.css b/apps/client/src/widgets/type_widgets/options/content_manager/space_usage/index.css
index b4235d561c..d6cdaff350 100644
--- a/apps/client/src/widgets/type_widgets/options/content_manager/space_usage/index.css
+++ b/apps/client/src/widgets/type_widgets/options/content_manager/space_usage/index.css
@@ -37,13 +37,15 @@
padding-block: 8px;
}
+ /* Reads as a caption under the chart rather than a bar fenced off from it: centered, muted and
+ unruled, so the map keeps the eye and the totals stay available underneath it. */
.space-usage-status {
display: flex;
flex: 0 0 auto;
flex-wrap: wrap;
+ justify-content: center;
gap: 0.6em;
- border-top: 1px solid var(--main-border-color);
- padding-block: 6px;
+ color: var(--muted-text-color);
font-size: 0.85em;
}
diff --git a/apps/client/src/widgets/type_widgets/options/content_manager/space_usage/index.spec.tsx b/apps/client/src/widgets/type_widgets/options/content_manager/space_usage/index.spec.tsx
index a42e100a36..1b5d2cd0a9 100644
--- a/apps/client/src/widgets/type_widgets/options/content_manager/space_usage/index.spec.tsx
+++ b/apps/client/src/widgets/type_widgets/options/content_manager/space_usage/index.spec.tsx
@@ -89,7 +89,6 @@ describe("SpaceUsage section", () => {
expect(contentSpan.textContent?.trim()).toBe(t("space_usage.status_content", {
count: 12,
size: formatSize(4000),
- revisionsSize: formatSize(200),
attachmentsSize: formatSize(300)
}) ?? "");
expect(deletedSpan.textContent?.trim()).toBe(t("space_usage.status_deleted", {
diff --git a/apps/client/src/widgets/type_widgets/options/content_manager/space_usage/index.tsx b/apps/client/src/widgets/type_widgets/options/content_manager/space_usage/index.tsx
index 5fe9d5c144..c826d1fb9b 100644
--- a/apps/client/src/widgets/type_widgets/options/content_manager/space_usage/index.tsx
+++ b/apps/client/src/widgets/type_widgets/options/content_manager/space_usage/index.tsx
@@ -54,15 +54,16 @@ export default function SpaceUsage({ sectionSwitcher }: ContentManagerSectionPro
{overview && (
<footer className="space-usage-status">
<StatusEntry
+ // Revisions are left out: they carry their own cell on the map, which names
+ // their size, so repeating it here would only lengthen the line.
text={t("space_usage.status_content", {
count: overview.content.noteCount,
size: formatSize(overview.content.size),
- revisionsSize: formatSize(overview.content.revisionsSize),
attachmentsSize: formatSize(overview.content.attachmentsSize)
})}
hint={t("space_usage.status_content_hint")}
/>
- <span className="space-usage-status-separator" aria-hidden="true">–</span>
+ <span className="space-usage-status-separator" aria-hidden="true">•</span>
<StatusEntry
text={t("space_usage.status_deleted", {
count: overview.deletedNotes.noteCount,