-
Notifications
You must be signed in to change notification settings - Fork 616
SelectPanel: Add variant=modal #5198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
f7c39ea
WIP - full variant
broccolinisoup f31034f
wip
broccolinisoup 87b84ee
full variant style fix
broccolinisoup 36f029e
Merge branch 'main' into select-panel-full-variant
broccolinisoup ef13937
Merge branch 'main' into select-panel-full-variant
broccolinisoup 3816a96
implement anchor for full variant and close button
broccolinisoup e72d333
Merge branch 'main' into select-panel-full-variant
broccolinisoup 2e5a623
Refactor selectpanel to use styledoverlay instead of anchored overlay
broccolinisoup 987f189
Merge branch 'main' into select-panel-full-variant
broccolinisoup bc9a6c9
wip
siddharthkp d165dae
default modal size + add backdrop
siddharthkp 667fb54
add footer and onCancel fn
siddharthkp ca5f714
add example of modal and secondary action, leave notes
siddharthkp f8d47e9
add docs.json entries
siddharthkp 53ff7ba
use Overlay instead of AnchoredOverlay
siddharthkp 859019e
Create fluffy-days-brake.md
siddharthkp e427df0
the tiniest chnage
siddharthkp fca7e79
move focus trap for easier review
siddharthkp f0be480
tiny formatting to make it easier to review
siddharthkp 1b7b968
Merge branch 'selectpanel-use-anchored-position' into selectpanel-mod…
siddharthkp 679f5d0
remove onCancel
siddharthkp d7b28be
dont need mock for modal
siddharthkp 5db37aa
test(vrt): update snapshots
siddharthkp 2c92a4f
trying to center
siddharthkp 7c178bd
centering works now
siddharthkp 43aaf3f
add modal stories to e2e
siddharthkp 2a14113
test(vrt): update snapshots
siddharthkp fdc0bd4
Merge branch 'main' into selectpanel-modal-variant-2
siddharthkp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file modified
BIN
-2.9 KB
(92%)
...ctPanel.test.ts-snapshots/SelectPanel-Above-Tall-Body-dark-colorblind-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-2.98 KB
(92%)
.../SelectPanel-Above-Tall-Body-dark-colorblind-modern-action-list--true-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3.28 KB
(92%)
...SelectPanel.test.ts-snapshots/SelectPanel-Above-Tall-Body-dark-dimmed-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3.31 KB
(92%)
...hots/SelectPanel-Above-Tall-Body-dark-dimmed-modern-action-list--true-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-2.79 KB
(93%)
...anel.test.ts-snapshots/SelectPanel-Above-Tall-Body-dark-high-contrast-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-2.85 KB
(92%)
...lectPanel-Above-Tall-Body-dark-high-contrast-modern-action-list--true-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-2.9 KB
(92%)
...onents/SelectPanel.test.ts-snapshots/SelectPanel-Above-Tall-Body-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-2.98 KB
(92%)
...s-snapshots/SelectPanel-Above-Tall-Body-dark-modern-action-list--true-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-2.9 KB
(92%)
...ctPanel.test.ts-snapshots/SelectPanel-Above-Tall-Body-dark-tritanopia-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-2.98 KB
(92%)
.../SelectPanel-Above-Tall-Body-dark-tritanopia-modern-action-list--true-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3.2 KB
(92%)
...tPanel.test.ts-snapshots/SelectPanel-Above-Tall-Body-light-colorblind-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-2.88 KB
(92%)
...SelectPanel-Above-Tall-Body-light-colorblind-modern-action-list--true-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3.01 KB
(92%)
...nel.test.ts-snapshots/SelectPanel-Above-Tall-Body-light-high-contrast-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3.04 KB
(92%)
...ectPanel-Above-Tall-Body-light-high-contrast-modern-action-list--true-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3.2 KB
(92%)
...nents/SelectPanel.test.ts-snapshots/SelectPanel-Above-Tall-Body-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-2.88 KB
(92%)
...-snapshots/SelectPanel-Above-Tall-Body-light-modern-action-list--true-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3.2 KB
(92%)
...tPanel.test.ts-snapshots/SelectPanel-Above-Tall-Body-light-tritanopia-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-2.88 KB
(92%)
...SelectPanel-Above-Tall-Body-light-tritanopia-modern-action-list--true-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3.1 KB
(90%)
...ctPanel.test.ts-snapshots/SelectPanel-External-Anchor-dark-colorblind-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-2.94 KB
(90%)
.../SelectPanel-External-Anchor-dark-colorblind-modern-action-list--true-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3.11 KB
(90%)
...SelectPanel.test.ts-snapshots/SelectPanel-External-Anchor-dark-dimmed-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3.17 KB
(90%)
...hots/SelectPanel-External-Anchor-dark-dimmed-modern-action-list--true-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-2.98 KB
(90%)
...anel.test.ts-snapshots/SelectPanel-External-Anchor-dark-high-contrast-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3.01 KB
(90%)
...lectPanel-External-Anchor-dark-high-contrast-modern-action-list--true-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3.1 KB
(90%)
...onents/SelectPanel.test.ts-snapshots/SelectPanel-External-Anchor-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-2.94 KB
(90%)
...s-snapshots/SelectPanel-External-Anchor-dark-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.1 KB
(90%)
...ctPanel.test.ts-snapshots/SelectPanel-External-Anchor-dark-tritanopia-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.94 KB
(90%)
.../SelectPanel-External-Anchor-dark-tritanopia-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.42 KB
(89%)
...tPanel.test.ts-snapshots/SelectPanel-External-Anchor-light-colorblind-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.14 KB
(90%)
...SelectPanel-External-Anchor-light-colorblind-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.07 KB
(89%)
...nel.test.ts-snapshots/SelectPanel-External-Anchor-light-high-contrast-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.1 KB
(89%)
...ectPanel-External-Anchor-light-high-contrast-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.42 KB
(89%)
...nents/SelectPanel.test.ts-snapshots/SelectPanel-External-Anchor-light-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.14 KB
(90%)
...-snapshots/SelectPanel-External-Anchor-light-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.42 KB
(89%)
...tPanel.test.ts-snapshots/SelectPanel-External-Anchor-light-tritanopia-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.14 KB
(90%)
...SelectPanel-External-Anchor-light-tritanopia-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.06 KB
(90%)
...ots/SelectPanel-Height-Initial-with-Overflowing-Items-dark-colorblind-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3 KB
(90%)
...itial-with-Overflowing-Items-dark-colorblind-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.2 KB
(90%)
...apshots/SelectPanel-Height-Initial-with-Overflowing-Items-dark-dimmed-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.17 KB
(90%)
...t-Initial-with-Overflowing-Items-dark-dimmed-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3 KB
(90%)
.../SelectPanel-Height-Initial-with-Overflowing-Items-dark-high-contrast-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.02 KB
(90%)
...al-with-Overflowing-Items-dark-high-contrast-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.06 KB
(90%)
...t.ts-snapshots/SelectPanel-Height-Initial-with-Overflowing-Items-dark-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3 KB
(90%)
...l-Height-Initial-with-Overflowing-Items-dark-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.06 KB
(90%)
...ots/SelectPanel-Height-Initial-with-Overflowing-Items-dark-tritanopia-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3 KB
(90%)
...itial-with-Overflowing-Items-dark-tritanopia-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.55 KB
(88%)
...ts/SelectPanel-Height-Initial-with-Overflowing-Items-light-colorblind-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.25 KB
(89%)
...tial-with-Overflowing-Items-light-colorblind-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.27 KB
(89%)
...SelectPanel-Height-Initial-with-Overflowing-Items-light-high-contrast-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.28 KB
(89%)
...l-with-Overflowing-Items-light-high-contrast-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.55 KB
(88%)
....ts-snapshots/SelectPanel-Height-Initial-with-Overflowing-Items-light-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.25 KB
(89%)
...-Height-Initial-with-Overflowing-Items-light-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.55 KB
(88%)
...ts/SelectPanel-Height-Initial-with-Overflowing-Items-light-tritanopia-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.25 KB
(89%)
...tial-with-Overflowing-Items-light-tritanopia-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.72 KB
(89%)
...el-Height-Initial-with-Underflowing-Items-After-Fetch-dark-colorblind-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.6 KB
(90%)
...derflowing-Items-After-Fetch-dark-colorblind-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.75 KB
(90%)
...tPanel-Height-Initial-with-Underflowing-Items-After-Fetch-dark-dimmed-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.77 KB
(89%)
...h-Underflowing-Items-After-Fetch-dark-dimmed-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.57 KB
(89%)
...Height-Initial-with-Underflowing-Items-After-Fetch-dark-high-contrast-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.57 KB
(89%)
...flowing-Items-After-Fetch-dark-high-contrast-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.72 KB
(89%)
...s/SelectPanel-Height-Initial-with-Underflowing-Items-After-Fetch-dark-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.6 KB
(90%)
...ial-with-Underflowing-Items-After-Fetch-dark-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.72 KB
(89%)
...el-Height-Initial-with-Underflowing-Items-After-Fetch-dark-tritanopia-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.6 KB
(90%)
...derflowing-Items-After-Fetch-dark-tritanopia-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.15 KB
(88%)
...l-Height-Initial-with-Underflowing-Items-After-Fetch-light-colorblind-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.86 KB
(89%)
...erflowing-Items-After-Fetch-light-colorblind-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.83 KB
(89%)
...eight-Initial-with-Underflowing-Items-After-Fetch-light-high-contrast-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.83 KB
(89%)
...lowing-Items-After-Fetch-light-high-contrast-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.15 KB
(88%)
.../SelectPanel-Height-Initial-with-Underflowing-Items-After-Fetch-light-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.86 KB
(89%)
...al-with-Underflowing-Items-After-Fetch-light-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.15 KB
(88%)
...l-Height-Initial-with-Underflowing-Items-After-Fetch-light-tritanopia-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.86 KB
(89%)
...erflowing-Items-After-Fetch-light-tritanopia-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.84 KB
(89%)
...ts/SelectPanel-Height-Initial-with-Underflowing-Items-dark-colorblind-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.82 KB
(90%)
...tial-with-Underflowing-Items-dark-colorblind-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.03 KB
(89%)
...pshots/SelectPanel-Height-Initial-with-Underflowing-Items-dark-dimmed-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.01 KB
(89%)
...-Initial-with-Underflowing-Items-dark-dimmed-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.82 KB
(89%)
...SelectPanel-Height-Initial-with-Underflowing-Items-dark-high-contrast-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.83 KB
(89%)
...l-with-Underflowing-Items-dark-high-contrast-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.84 KB
(89%)
....ts-snapshots/SelectPanel-Height-Initial-with-Underflowing-Items-dark-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.82 KB
(90%)
...-Height-Initial-with-Underflowing-Items-dark-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.84 KB
(89%)
...ts/SelectPanel-Height-Initial-with-Underflowing-Items-dark-tritanopia-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.82 KB
(90%)
...tial-with-Underflowing-Items-dark-tritanopia-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.35 KB
(88%)
...s/SelectPanel-Height-Initial-with-Underflowing-Items-light-colorblind-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.06 KB
(89%)
...ial-with-Underflowing-Items-light-colorblind-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.06 KB
(89%)
...electPanel-Height-Initial-with-Underflowing-Items-light-high-contrast-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.07 KB
(89%)
...-with-Underflowing-Items-light-high-contrast-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.35 KB
(88%)
...ts-snapshots/SelectPanel-Height-Initial-with-Underflowing-Items-light-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.06 KB
(89%)
...Height-Initial-with-Underflowing-Items-light-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.35 KB
(88%)
...s/SelectPanel-Height-Initial-with-Underflowing-Items-light-tritanopia-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.06 KB
(89%)
...ial-with-Underflowing-Items-light-tritanopia-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file added
BIN
+35 KB
...lectPanel.test.ts-snapshots/SelectPanel-Modal-variant-dark-colorblind-linux.png
Oops, something went wrong.
Binary file added
BIN
+34.8 KB
...ts/SelectPanel-Modal-variant-dark-colorblind-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file added
BIN
+35.7 KB
...s/SelectPanel.test.ts-snapshots/SelectPanel-Modal-variant-dark-dimmed-linux.png
Oops, something went wrong.
Binary file added
BIN
+35.5 KB
...pshots/SelectPanel-Modal-variant-dark-dimmed-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file added
BIN
+36.1 KB
...tPanel.test.ts-snapshots/SelectPanel-Modal-variant-dark-high-contrast-linux.png
Oops, something went wrong.
Binary file added
BIN
+35.9 KB
...SelectPanel-Modal-variant-dark-high-contrast-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file added
BIN
+35.1 KB
...mponents/SelectPanel.test.ts-snapshots/SelectPanel-Modal-variant-dark-linux.png
Oops, something went wrong.
Binary file added
BIN
+34.8 KB
....ts-snapshots/SelectPanel-Modal-variant-dark-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file added
BIN
+35 KB
...lectPanel.test.ts-snapshots/SelectPanel-Modal-variant-dark-tritanopia-linux.png
Oops, something went wrong.
Binary file added
BIN
+34.8 KB
...ts/SelectPanel-Modal-variant-dark-tritanopia-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file added
BIN
+34.7 KB
...ectPanel.test.ts-snapshots/SelectPanel-Modal-variant-light-colorblind-linux.png
Oops, something went wrong.
Binary file added
BIN
+34.5 KB
...s/SelectPanel-Modal-variant-light-colorblind-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file added
BIN
+34.6 KB
...Panel.test.ts-snapshots/SelectPanel-Modal-variant-light-high-contrast-linux.png
Oops, something went wrong.
Binary file added
BIN
+34.4 KB
...electPanel-Modal-variant-light-high-contrast-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file added
BIN
+34.7 KB
...ponents/SelectPanel.test.ts-snapshots/SelectPanel-Modal-variant-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+34.6 KB
...ts-snapshots/SelectPanel-Modal-variant-light-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file added
BIN
+34.7 KB
...ectPanel.test.ts-snapshots/SelectPanel-Modal-variant-light-tritanopia-linux.png
Oops, something went wrong.
Binary file added
BIN
+34.5 KB
...s/SelectPanel-Modal-variant-light-tritanopia-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file added
BIN
+35 KB
...shots/SelectPanel-Modal-variant-with-secondary-action-dark-colorblind-linux.png
Oops, something went wrong.
Binary file added
BIN
+34.8 KB
...ariant-with-secondary-action-dark-colorblind-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file added
BIN
+35.7 KB
...snapshots/SelectPanel-Modal-variant-with-secondary-action-dark-dimmed-linux.png
Oops, something went wrong.
Binary file added
BIN
+35.5 KB
...al-variant-with-secondary-action-dark-dimmed-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file added
BIN
+36.1 KB
...ts/SelectPanel-Modal-variant-with-secondary-action-dark-high-contrast-linux.png
Oops, something went wrong.
Binary file added
BIN
+35.9 KB
...ant-with-secondary-action-dark-high-contrast-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file added
BIN
+35.1 KB
...est.ts-snapshots/SelectPanel-Modal-variant-with-secondary-action-dark-linux.png
Oops, something went wrong.
Binary file added
BIN
+34.8 KB
...nel-Modal-variant-with-secondary-action-dark-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file added
BIN
+35 KB
...shots/SelectPanel-Modal-variant-with-secondary-action-dark-tritanopia-linux.png
Oops, something went wrong.
Binary file added
BIN
+34.8 KB
...ariant-with-secondary-action-dark-tritanopia-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file added
BIN
+34.7 KB
...hots/SelectPanel-Modal-variant-with-secondary-action-light-colorblind-linux.png
Oops, something went wrong.
Binary file added
BIN
+34.5 KB
...riant-with-secondary-action-light-colorblind-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file added
BIN
+34.6 KB
...s/SelectPanel-Modal-variant-with-secondary-action-light-high-contrast-linux.png
Oops, something went wrong.
Binary file added
BIN
+34.4 KB
...nt-with-secondary-action-light-high-contrast-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file added
BIN
+34.7 KB
...st.ts-snapshots/SelectPanel-Modal-variant-with-secondary-action-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+34.6 KB
...el-Modal-variant-with-secondary-action-light-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file added
BIN
+34.7 KB
...hots/SelectPanel-Modal-variant-with-secondary-action-light-tritanopia-linux.png
Oops, something went wrong.
Binary file added
BIN
+34.5 KB
...riant-with-secondary-action-light-tritanopia-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.06 KB
(90%)
...lectPanel.test.ts-snapshots/SelectPanel-Single-Select-dark-colorblind-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3 KB
(90%)
...ts/SelectPanel-Single-Select-dark-colorblind-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.2 KB
(90%)
...s/SelectPanel.test.ts-snapshots/SelectPanel-Single-Select-dark-dimmed-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.17 KB
(90%)
...pshots/SelectPanel-Single-Select-dark-dimmed-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3 KB
(90%)
...tPanel.test.ts-snapshots/SelectPanel-Single-Select-dark-high-contrast-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.02 KB
(90%)
...SelectPanel-Single-Select-dark-high-contrast-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.06 KB
(90%)
...mponents/SelectPanel.test.ts-snapshots/SelectPanel-Single-Select-dark-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3 KB
(90%)
....ts-snapshots/SelectPanel-Single-Select-dark-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.06 KB
(90%)
...lectPanel.test.ts-snapshots/SelectPanel-Single-Select-dark-tritanopia-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3 KB
(90%)
...ts/SelectPanel-Single-Select-dark-tritanopia-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.55 KB
(88%)
...ectPanel.test.ts-snapshots/SelectPanel-Single-Select-light-colorblind-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.25 KB
(89%)
...s/SelectPanel-Single-Select-light-colorblind-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.27 KB
(89%)
...Panel.test.ts-snapshots/SelectPanel-Single-Select-light-high-contrast-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.28 KB
(89%)
...electPanel-Single-Select-light-high-contrast-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.55 KB
(88%)
...ponents/SelectPanel.test.ts-snapshots/SelectPanel-Single-Select-light-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.25 KB
(89%)
...ts-snapshots/SelectPanel-Single-Select-light-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.55 KB
(88%)
...ectPanel.test.ts-snapshots/SelectPanel-Single-Select-light-tritanopia-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.25 KB
(89%)
...s/SelectPanel-Single-Select-light-tritanopia-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.86 KB
(91%)
...SelectPanel.test.ts-snapshots/SelectPanel-With-Footer-dark-colorblind-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.82 KB
(91%)
...hots/SelectPanel-With-Footer-dark-colorblind-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.76 KB
(92%)
...nts/SelectPanel.test.ts-snapshots/SelectPanel-With-Footer-dark-dimmed-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.85 KB
(91%)
...napshots/SelectPanel-With-Footer-dark-dimmed-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.89 KB
(91%)
...ectPanel.test.ts-snapshots/SelectPanel-With-Footer-dark-high-contrast-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.89 KB
(91%)
...s/SelectPanel-With-Footer-dark-high-contrast-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.86 KB
(91%)
...components/SelectPanel.test.ts-snapshots/SelectPanel-With-Footer-dark-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.82 KB
(91%)
...st.ts-snapshots/SelectPanel-With-Footer-dark-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.86 KB
(91%)
...SelectPanel.test.ts-snapshots/SelectPanel-With-Footer-dark-tritanopia-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.82 KB
(91%)
...hots/SelectPanel-With-Footer-dark-tritanopia-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.25 KB
(90%)
...electPanel.test.ts-snapshots/SelectPanel-With-Footer-light-colorblind-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.95 KB
(91%)
...ots/SelectPanel-With-Footer-light-colorblind-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.14 KB
(90%)
...ctPanel.test.ts-snapshots/SelectPanel-With-Footer-light-high-contrast-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.12 KB
(90%)
.../SelectPanel-With-Footer-light-high-contrast-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.25 KB
(90%)
...omponents/SelectPanel.test.ts-snapshots/SelectPanel-With-Footer-light-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.95 KB
(91%)
...t.ts-snapshots/SelectPanel-With-Footer-light-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-3.25 KB
(90%)
...electPanel.test.ts-snapshots/SelectPanel-With-Footer-light-tritanopia-linux.png
Oops, something went wrong.
Binary file modified
BIN
-2.95 KB
(91%)
...ots/SelectPanel-With-Footer-light-tritanopia-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-6.87 KB
(85%)
...SelectPanel.test.ts-snapshots/SelectPanel-With-Groups-dark-colorblind-linux.png
Oops, something went wrong.
Binary file modified
BIN
-6.86 KB
(85%)
...hots/SelectPanel-With-Groups-dark-colorblind-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-6.75 KB
(85%)
...nts/SelectPanel.test.ts-snapshots/SelectPanel-With-Groups-dark-dimmed-linux.png
Oops, something went wrong.
Binary file modified
BIN
-7.38 KB
(84%)
...napshots/SelectPanel-With-Groups-dark-dimmed-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-6.99 KB
(84%)
...ectPanel.test.ts-snapshots/SelectPanel-With-Groups-dark-high-contrast-linux.png
Oops, something went wrong.
Binary file modified
BIN
-6.78 KB
(85%)
...s/SelectPanel-With-Groups-dark-high-contrast-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-6.87 KB
(85%)
...components/SelectPanel.test.ts-snapshots/SelectPanel-With-Groups-dark-linux.png
Oops, something went wrong.
Binary file modified
BIN
-6.86 KB
(85%)
...st.ts-snapshots/SelectPanel-With-Groups-dark-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-6.87 KB
(85%)
...SelectPanel.test.ts-snapshots/SelectPanel-With-Groups-dark-tritanopia-linux.png
Oops, something went wrong.
Binary file modified
BIN
-6.86 KB
(85%)
...hots/SelectPanel-With-Groups-dark-tritanopia-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-7.78 KB
(83%)
...electPanel.test.ts-snapshots/SelectPanel-With-Groups-light-colorblind-linux.png
Oops, something went wrong.
Binary file modified
BIN
-7.33 KB
(84%)
...ots/SelectPanel-With-Groups-light-colorblind-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-7.66 KB
(83%)
...ctPanel.test.ts-snapshots/SelectPanel-With-Groups-light-high-contrast-linux.png
Oops, something went wrong.
Binary file modified
BIN
-7.31 KB
(84%)
.../SelectPanel-With-Groups-light-high-contrast-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-7.78 KB
(83%)
...omponents/SelectPanel.test.ts-snapshots/SelectPanel-With-Groups-light-linux.png
Oops, something went wrong.
Binary file modified
BIN
-7.33 KB
(84%)
...t.ts-snapshots/SelectPanel-With-Groups-light-modern-action-list--true-linux.png
Oops, something went wrong.
Binary file modified
BIN
-7.78 KB
(83%)
...electPanel.test.ts-snapshots/SelectPanel-With-Groups-light-tritanopia-linux.png
Oops, something went wrong.
Binary file modified
BIN
-7.33 KB
(84%)
...ots/SelectPanel-With-Groups-light-tritanopia-modern-action-list--true-linux.png
Oops, something went wrong.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,23 +29,25 @@ interface SelectPanelMultiSelection { | |
onSelectedChange: (selected: ItemInput[]) => void | ||
} | ||
|
||
type OpenGestures = 'anchor-click' | 'anchor-key-press' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❤️ |
||
type CloseGestures = 'click-outside' | 'escape' | 'selection' | 'save-click' | 'cancel-click' | ||
|
||
interface SelectPanelBaseProps { | ||
// TODO: Make `title` required in the next major version | ||
title?: string | React.ReactElement | ||
subtitle?: string | React.ReactElement | ||
onOpenChange: ( | ||
open: boolean, | ||
gesture: 'anchor-click' | 'anchor-key-press' | 'click-outside' | 'escape' | 'selection', | ||
) => void | ||
onOpenChange: (open: boolean, gesture: OpenGestures | CloseGestures) => void | ||
placeholder?: string | ||
// TODO: Make `inputLabel` required in next major version | ||
inputLabel?: string | ||
overlayProps?: Partial<OverlayProps> | ||
footer?: string | React.ReactElement | ||
// TODO: do we need keep the old variants for backward-compat? there isn't any usage in dotcom | ||
variant?: 'anchored' | 'modal' | FilteredActionListProps['variant'] | ||
} | ||
|
||
export type SelectPanelProps = SelectPanelBaseProps & | ||
Omit<FilteredActionListProps, 'selectionVariant'> & | ||
Omit<FilteredActionListProps, 'selectionVariant' | 'variant'> & | ||
Pick<AnchoredOverlayProps, 'open'> & | ||
AnchoredOverlayWrapperAnchorProps & | ||
(SelectPanelSingleSelection | SelectPanelMultiSelection) | ||
|
@@ -90,7 +92,8 @@ export function SelectPanel({ | |
items, | ||
footer, | ||
textInputProps, | ||
overlayProps, | ||
variant = 'anchored', | ||
overlayProps = variant === 'modal' ? {maxWidth: 'medium', height: 'fit-content', maxHeight: 'large'} : undefined, | ||
sx, | ||
...listProps | ||
}: SelectPanelProps): JSX.Element { | ||
|
@@ -111,12 +114,16 @@ export function SelectPanel({ | |
[onOpenChange], | ||
) | ||
const onClose = useCallback( | ||
(gesture: Parameters<Exclude<AnchoredOverlayProps['onClose'], undefined>>[0] | 'selection') => { | ||
(gesture: Parameters<Exclude<AnchoredOverlayProps['onClose'], undefined>>[0] | CloseGestures) => { | ||
onOpenChange(false, gesture) | ||
}, | ||
[onOpenChange], | ||
) | ||
|
||
const onCancel = () => { | ||
// TODO | ||
} | ||
|
||
const renderMenuAnchor = useMemo(() => { | ||
if (renderAnchor === null) { | ||
return null | ||
|
@@ -256,8 +263,19 @@ export function SelectPanel({ | |
/* this is required so that clicking the button while the panel is open does not re-open the panel */ | ||
[anchorRef] | ||
} | ||
{...position} | ||
data-variant={variant} | ||
{...overlayProps} | ||
{...(variant === 'anchored' ? position : {})} | ||
sx={{ | ||
'&[data-variant="anchored"]': { | ||
margin: 0, | ||
}, | ||
'&[data-variant="modal"]': { | ||
position: 'fixed', | ||
inset: 0, | ||
margin: 'auto', | ||
}, | ||
}} | ||
> | ||
<LiveRegionOutlet /> | ||
{usingModernActionList ? null : ( | ||
|
@@ -300,20 +318,56 @@ export function SelectPanel({ | |
// than the Overlay (which would break scrolling the items) | ||
sx={{...sx, height: 'inherit', maxHeight: 'inherit'}} | ||
/> | ||
{footer && ( | ||
{footer || variant === 'modal' ? ( | ||
<Box | ||
sx={{ | ||
display: 'flex', | ||
borderTop: '1px solid', | ||
borderColor: 'border.default', | ||
padding: 2, | ||
padding: variant === 'modal' ? 3 : 2, | ||
justifyContent: footer ? 'space-between' : 'end', | ||
alignItems: 'center', | ||
flexShrink: 0, | ||
minHeight: '44px', | ||
'> button': { | ||
// make button full width if there's just one | ||
width: variant === 'modal' ? 'auto' : '100%', | ||
}, | ||
}} | ||
> | ||
{footer} | ||
{variant === 'modal' ? ( | ||
<Box sx={{display: 'flex', gap: 2}}> | ||
<Button | ||
type="button" | ||
size="small" | ||
onClick={() => { | ||
onCancel() | ||
onClose('cancel-click') | ||
}} | ||
> | ||
Cancel | ||
</Button> | ||
{/* TODO: loading state for save? */} | ||
<Button type="submit" size="small" variant="primary" onClick={() => onClose('save-click')}> | ||
Save | ||
</Button> | ||
</Box> | ||
) : null} | ||
</Box> | ||
)} | ||
) : null} | ||
</Box> | ||
</Overlay> | ||
{variant === 'modal' && ( | ||
<Box | ||
data-backdrop | ||
sx={{ | ||
backgroundColor: 'primer.canvas.backdrop', | ||
position: 'fixed', | ||
inset: 0, | ||
}} | ||
/> | ||
)} | ||
</LiveRegion> | ||
) | ||
} | ||
|
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
non blocking improvement 1/2: While footer is backward compatible, it's not obvious what it means. What we want here is a "secondary action".
Looking at usage (3 instances), we have