fix: hardening sweep for #840 - #968
Conversation
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR Modified ComponentsList · View in Storybook
RadioList · View in Storybook
Tooltip · View in Storybook
TreeList · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: 1 accessibility violation(s) found — 1 critical. XDSList - 1 issue(s)
Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
2e56f65 to
88c6fbb
Compare
…dius, radio gap, tree lines, story fixes
88c6fbb to
6d53f76
Compare
|
Ordered and bulleted lists don't appear to show the numbers or bullets on mobile safari |
|
Radiolist horizontal layout seems better. The radio buttons appear to be top aligned instead of center aligned with the label and description. Start content should appear after the radio button before the label instead of before the radio button |
|
Treelist still has some layout issues. A child element that's expandable shows the chevron indented into the tree lines which is good but it's missing a bit of spacing on left hand side to stay evenly spaced between the lines and the label. The last child of a tree list should show an "L" shaped line instead of the "T" shaped line. Finally items without children that have icons are slightly misaligned from items with children and icons in the same level. |
|
For the tooltip example, don't show a disabled button -- that's not the point of the example. Instead revert that and add a description stating that it's for demonstrating disabling the tooltip via prop. |
- List: add listStylePosition inside for mobile Safari marker rendering - RadioList: fix vertical centering (marginTop 0/2), move startContent after radio - TreeList: fix branch margin (9→10), terminus borderBottomRightRadius, leaf icon alignment - Tooltip: revert disabled story to isEnabled=false demo with description
|
Radio buttons should be vertically centered with the label and description just like the checkbox inputs. I'm finding the small checkbox to be almost circular with the new radius so we should probably use one radius level down and give feedback on the issue. |
|
List number and disc got moved into the list item so they're at least visible on mobile safari. However they appear on top of the rest of the content and there's unnatural amount of padding to the left where they used to live. They should appear to left of the list item content without the extra spacing on the outside. |
|
List items and tree list items should have slightly larger radius. |
|
Tree list "L" terminal is still not appearing correctly -- perhaps we're not correctly detecting "last item"? It should be the last item of the children set not the very very last item of the whole tree list. The chevron for child items with children needs to be nudged maybe 2-4 pixels to the right to be centrally aligned with the line. Preserve the vertical alignment of the labels though. If you nudge the icon 2px right by adding more margin left then subtract that from margin right. |
- TreeList: replace hardcoded constants with spacing/radius tokens - TreeList: fix 'L' terminal by preventing ancestor line overlap at terminus level - TreeList: nudge chevron with spacing-0-5 token for branch line alignment - TreeList/List: bump item radius from radius-inner to radius-element - List: fix marker layout — remove listStylePosition:inside, reduce outer padding - RadioList: center-align radio with label/description, reorder startContent after radio - CheckboxInput: per-size radius (sm=radius-inner, md=radius-element) - Tooltip story: revert disabled button, add isEnabled description
cixzhang
left a comment
There was a problem hiding this comment.
List items with numerical and ordinals are broken on mobile safari again. I think it's fine to have them contained but make sure we adjust the padding accordingly and align the list item content. For example we wouldn't need extra padding with markers if the markers are inside the content.
- computedMarginLeft now uses calc() with spacing-5, spacing-4, spacing-2 vars - Chevron nudge bumped from spacing-0-5 (2px) to spacing-1 (4px)
- Remove INDENT, CHEVRON_SIZE, CHEVRON_MARGIN, BRANCH_MARGIN_LEFT constants - TreeListBranches: positions use calc() with spacing tokens, remove numeric props - TreeListItem: treeBranches padding uses calc(spacing-2 + spacing-0-5) - TreeListBranches: container/connector widths use spacing-5 token
Mobile Safari doesn't render ::marker when list-style-type is only on the parent <ul>/<ol>. Move marker styles to the <li> directly via context. - Pass listStyle through XDSListContext instead of hasMarkers boolean - Apply markerStyles[listStyle] on XDSListItem - Parent <ul> keeps list-style-type: none always - Checkbox: revert to radius-inner (4px) for both sizes, matching www
Mobile Safari inherits list-style-type: none from the parent <ul>/<ol>, overriding the child <li> value. Adding list-style-type: unset on the listWithMarkers style lets the <li> marker styles take effect.
…on <li> The marker was clipped because list-style-position: outside renders in the parent's padding area, which mobile Safari doesn't reliably show. Using list-style-position: inside on the <li> places the marker within the content box. Also apply list-style-type on both parent and <li> for reliable inheritance. Remove listWithMarkers parent padding (no longer needed).
Native list-style-type with list-style-position:inside on mobile Safari causes layout conflicts when the <li> uses display:list-item alongside flex content. The marker overlaps content instead of sitting beside it. Follow the WWW XDS pattern: suppress native markers entirely and render custom marker components (dot/circle/number) as flex siblings. Numbers use CSS counters (counter-reset on <ul>/<ol>, counter-increment on <li>, content: counter(xds-list) via ::before). Dots and circles are styled <span> elements. This keeps <li> as display:flex always — no mode switching, no cross-browser issues. Co-authored-by: Navi <navi@navibot.dev>
Center dot/circle markers vertically with the label baseline using marginTop calc((lineHeight - dotSize) / 2). Number markers align naturally via baseline. Reduce marker container width from spacing-5 (20px) to spacing-3 (12px) for tighter spacing. Co-authored-by: Navi <navi@navibot.dev>
Addresses findings from the hardening audit in #840.
Component fixes (5)
--radius-element→--radius-container(8px → 12px)--spacing-3→--spacing-2(12px → 8px)--radius-inner→--radius-element(4px → 8px)--spacing-2→--spacing-5(8px → 40px) for clearer label associationStory fixes (4)
size="md"→size={40}("md" was invalid)hAlign="end"textAlign: center→startDialog border changes broken out to a separate PR with container-level
defaultHasDividersapproach.Won't fix (with rationale)
See updated issue body on #840 — items crossed out with inline rationale.
Ref #840