-
Notifications
You must be signed in to change notification settings - Fork 127
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
Feat/popover with dialog #2838
base: next
Are you sure you want to change the base?
Feat/popover with dialog #2838
Conversation
🦋 Changeset detectedLatest commit: a775a81 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Size Change: -1.66 kB (-0.24%) Total Size: 677 kB
ℹ️ View Unchanged
|
39c0366
to
cb0a8b1
Compare
cb0a8b1
to
b93ff84
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## next #2838 +/- ##
==========================================
- Coverage 87.83% 87.76% -0.07%
==========================================
Files 225 225
Lines 13005 12849 -156
Branches 1776 1762 -14
==========================================
- Hits 11423 11277 -146
+ Misses 1528 1517 -11
- Partials 54 55 +1
|
b37a1b9
to
e80f8d5
Compare
e80f8d5
to
71bb4dd
Compare
71bb4dd
to
9029a27
Compare
9029a27
to
275cd6a
Compare
275cd6a
to
0a650e9
Compare
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.
Since this is still a work in progress, I've limited myself to a superficial review and skimmed past some of the changes, especially to the styles.
One thing that stood out to me is the duplicated logic between the Popover and Modal components. Both components initialize the dialog polyfill and handle interactions such as outside clicks. I wonder if we could avoid this by restructuring the components as follows:
- Implement a basic Dialog component that implements the semantics (incl. dialog polyfill) and interactions, but no styles and positioning. This is what I was going for with the Dialog sub-component in the DateInput.
- The Modal component builds on top of the Dialog component and only adds styles.
- The Popover component builds on top of the Dialog component and adds styles as well as floating positioning on desktop
With this approach, only the mobile styles would be duplicated which are easier to keep in sync and have less of an impact on bundle size.
What do you think? Did I miss any downsides or obstacles?
packages/circuit-ui/components/TopNavigation/components/ProfileMenu/ProfileMenu.tsx
Outdated
Show resolved
Hide resolved
packages/circuit-ui/components/TopNavigation/components/ProfileMenu/ProfileMenu.tsx
Outdated
Show resolved
Hide resolved
packages/circuit-ui/components/Popover/components/PopoverItem.tsx
Outdated
Show resolved
Hide resolved
@@ -319,7 +343,6 @@ describe('DateInput', () => { | |||
|
|||
expect(ref.current).toHaveValue('2000-01-12'); | |||
expect(onChange).toHaveBeenCalled(); | |||
expect(openCalendarButton).toHaveFocus(); |
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.
👀
Addresses DSYS-875
Purpose
Describe what you are trying to accomplish
Approach and changes
Describe how you solved the problem
Definition of done