Skip to content

fix(disk): stop the disk card text overflowing and tidy up the chart - #1068

Merged
kesselb merged 1 commit into
masterfrom
fix/disk-section-layout
Aug 2, 2026
Merged

kesselb merged 1 commit into
masterfrom
fix/disk-section-layout

Conversation

@karlitschek

@karlitschek karlitschek commented Aug 2, 2026 •

Copy link
Copy Markdown
Member

The device name spilled out through the right border of the card. The text column was flex: 1 0 auto, so it could never shrink below its max-content width, and a device name like ubuntu--vg-ubuntu--lv offers no break opportunity. The word-break that would have caught it only lived inside the width <= 1280px media query, so it was a wide-window-only bug.

The cards also sized themselves off the viewport via col-4, but the settings pane is much narrower than the window, so each card got a third of an already narrow column and every label wrapped. They are now an auto-fill grid that measures the container it actually sits in.

Label/value pairs became a dl. They previously relied on the whitespace between two adjacent spans, which Vue's whitespace: 'condense' removes outright when it contains a newline, rendering "Available:25.76 GB". Core styles dl/dt/dd for prose (dt,dd{padding:12px}, dt{width:130px}), which adds 24px to every row of a compact stat list, so that is reset here.

While in the chart itself:

  • Drop the default white slice border, which cut visible gashes through the ring on dark themes, in favour of spacing between the arcs.
  • Read both arc colours from the theme, so they match the dots in front of the "Used"/"Available" labels instead of a hardcoded grey that did not.
  • Put the usage percentage in the hole rather than leaving it empty.
  • Re-enable tooltips.
  • Let the container drive the canvas size instead of inline width/height attributes fighting Chart.js' own sizing.
  • Label the canvas for screen readers.

馃 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@karlitschek
karlitschek force-pushed the fix/disk-section-layout branch from d8e3a50 to b07716c Compare August 2, 2026 13:10
@kesselb
kesselb force-pushed the fix/disk-section-layout branch from b07716c to ddd5fe8 Compare August 2, 2026 21:37
Let the text column shrink and break long device names, so a name like
ubuntu--vg-ubuntu--lv no longer spills through the card border.

Replace the viewport-based col-4 with an auto-fill grid that measures the
settings pane the cards actually sit in.

Turn the label/value pairs into a dl, so they no longer depend on whitespace
that Vue condenses away, rendering "Available:25.76 GB".

Tidy the chart: drop the white slice border that gashes the ring on dark
themes, theme the arc colours, show the usage percentage in the hole,
re-enable tooltips, and label the canvas for screen readers.

Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Frank Karlitschek <karlitschek@users.noreply.github.com>
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
@kesselb
kesselb force-pushed the fix/disk-section-layout branch from ddd5fe8 to 35b39fd Compare August 2, 2026 21:41
@kesselb kesselb self-assigned this Aug 2, 2026
@kesselb kesselb added this to the Nextcloud 35 milestone Aug 2, 2026
@kesselb
kesselb enabled auto-merge August 2, 2026 21:41
@kesselb
kesselb merged commit 13f3b8f into master Aug 2, 2026
37 checks passed
@kesselb
kesselb deleted the fix/disk-section-layout branch August 2, 2026 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants