Skip to content

Portal: toggle-group chips break words at 390 px (Choices/Filter), seen on the Expiration and Quotas tabs #324

Open

Description

@ephico2real2

Parent: #302 (found by OB1 run 17 on CRC, main 9ba33b2).

What is wrong. At 390 px the toggle-group chips of the shared Choices / Filter components (cmapi-portal-ui/src/components/ui.tsx, lines 96-121) shrink until their words break mid-word, instead of keeping their width and scrolling inside .cp-scroll (cmapi-portal-ui/src/app.css line 2: max-width: 100%; overflow-x: auto). The label "State" also breaks into "St / at / e".

Where it shows.

  • The Expiration tab, live on CRC: the State filter reads "Need s actio n 0", "Expiri ng ≤ 14 d 0", "Pendi ng delete 0", "A ctiv e 1". Picture: cmapi-portal-ui/screenshots/expiration-crc/expiration-list-390-light.png (docs PR from branch crc-deploy-expirations).
  • The Quotas tab, built-mocked: "mediu m" in the New size choice, cmapi-portal-ui/screenshots/slice-3-built-mocked/quotas-390-light.png (on main).

Why the layout check passed. Check 7 of tests/api/portal.test.mjs tests for sideways page scroll and placeholders; a chip that wraps its text inside itself causes neither (pageOverflowX was 0 in the CRC walk).

How to prove it. At 390 px, for each .pf-v6-c-toggle-group__button inside .cp-scroll, assert that no word of its text is split over two lines: for example, compare getClientRects() of a Range over each word against one rect, or assert that each button's scrollWidth <= clientWidth with white-space: nowrap measured. The test fails on main 9ba33b2 and passes once the items keep their content width (for example flex-shrink: 0 on the items with the group scrolling in .cp-scroll), the fix chosen from PatternFly's guidance for ToggleGroup at narrow widths.

Research mandate (fix-defect): read PatternFly 6's ToggleGroup and overflow guidance, and the mockup's chip behaviour at 390 px (mockups/portal/Main.dc.html), before choosing between scrolling the chips and wrapping whole chips onto new lines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Backlogstatus:open

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions