Repository navigation
Conversation
…erless Select, Combobox, Dropdown Menu, Date Range Picker and Prompt Input's command list each zeroed the browser's [popover] border on their own. They now take popupReset.borderless; each keeps its own margin and padding, which differ. Built CSS and prerendered pages are identical, and the open popups' computed styles match base in light and dark.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The goal is to fix every bug on
ui-sdkthat we can fix on our side, before it lands onmain. This unit is the tracker follow-up "Popup border resets" from #157. Five popups each zeroed the browser's[popover]border with their own copy of the same four lines and their own comment. ui-sdk leaves that border on menu, select, combobox and date picker content (@ui-sdk/react/docs/styling-and-animation.md:144). The next popup that needs the reset should find it in one place.What changed
popupReset.borderlessinpackages/ui/src/lib/constella/styles.tszeroes the four border widths.popupReset.base(Date Range Picker afterpopoverStyles.popup, which ispopupReset.base). Each drops its own four lines.Tradeoffs
[popover]box. Comment Sicko proposed widening it to border, margin and padding. Rejected. Dropdown Menu, Date Range Picker and Prompt Input set no margin today, and Prompt Input's menu measuresmargin-top: 8px. A shared margin reset would change that, so this would not be a pure refactor.popupReset.baseorpopupSurface.base. Sheet, Tooltip and Popover also usepopupReset.base, and Hover Card and Model Picker usepopupSurface.base. Adding the reset there would change those parts.borderless, notborder. The project lintconstella(no-shorthand-mix)reads aborderkey as the shorthand.Verification
vpr check,vpr buildandvpr testpass (75 files, 664 passed, 1 expected fail).node apps/site/scripts/diff-prerender.ts before afterreports0 of 84 pages differ.styles-ByMNzEmc.csshas the same name and md5 in both builds.~/.local/share/pw/jpop-cmp.mjs. Report and screenshots are local inorbit-autopilot/ui-sdk-fix-all/shots/J-popreset/.ui-sdk-reuse-reviewerreturnedCLEAN. ui-sdk has no reset API for these parts, and itsweb.cssis a whole theme that Constella doesn't import./orbit:deslopand/orbit:no-commentsran. Comment Sicko deleted nothing, and its one kill is rejected under Tradeoffs.Tracker
popupReset.borderless. Margin and padding stay in each part because they differ.