Files
2026-10-29 18:46:39 +08:00

2.8 KiB
Raw Permalink Blame History

admin-services-dockerman

info-table-entry-column — value cells break only words that do not fit

  • page: admin-services-dockerman-overview · Services → Dockerman JS → Overview
  • package: luci-app-dockerman (openwrt/luci, the JS rewrite)
  • dom: .cbi-section.cbi-tblsection > table.table.cbi-section-table > tr.cbi-section-table-row > td.td.cbi-value-field[data-name=entry|value] — docker info rendered as two-column TableSections; the value column holds multi-KB JSON with no spaces (Runtimes, Plugins)
  • symptom: the entry column collapsed to ~42px and showed one character per line (MemoryLimit over 7–8 lines) beside the JSON values
  • cause: .td.cbi-value-field carried word-break: break-all at every width (added in 50c2b84 as an overflow guard). break-all drops every cell's min-content to about one character; auto table layout then hands spare width out by max-content, so the JSON took nearly all of it. bootstrap sets no word-break on desktop cells — its labels stay whole but the JSON stretches the table to ~3.5k px and the page scrolls sideways.
  • fix: components/_table.css & td, & .td { &.cbi-value-field { wrap-anywhere md:max-w-prose } } — wrap-anywhere keeps break-all's min-content (same overflow guard) but only breaks a word that does not fit; md:max-w-prose caps each cell's intrinsic contribution so one huge value cannot starve the other columns (the used width may still exceed it: 944px measured) · a2d110a · 1.3.2. Lineage: 50c2b84 2025-10-12 (0.5.8_beta) added &.cbi-value-field { break-all } for "System => (Software, Mount Points): Fix overflow when td text is too long" and "Network => Wireless host: Fix overflow when td text is too long", replacing the global td max-w-94 it removed for passwall (see admin-services-passwall.md); 031283c 2026-07-09 added the mobile-card utilities on the same rule (max-md:mb-1 max-md:basis-full max-md:self-start max-md:text-left and the [data-widget=…] max-md:basis-1/2 sub-rule)
  • verified: device, Chromium, Environment table before → after: entry column 42 → 260px at 1440, 42 → 196 at 1024, 41 → 152 at 800; short words split across lines 41 → 0 / 0 / 2; mobile cards unchanged; section height 8301 → 3797px at 1440; firewall zone and rule GridSections kept identical column widths at 1440/1024/800/390; a file:// fixture gave the same result in Chromium, WebKit and Firefox. Side effect noted, not measured: on admin-system-mounts the GridSection value cells take the 65ch cap instead of the page's max-w-104 (same specificity, later rule).
  • fixture: fixtures/admin-services-dockerman-overview--info-table.html (entry column nowrap at 1440/1024/390 — at 800 two short words still split, so that width is not asserted)
  • issue: #96 · mirror: shadcn f4d7219 · status: active