-
Notifications
You must be signed in to change notification settings - Fork 155
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
fix: Runtime drawers default active #2870
Conversation
This reverts commit 227dd63.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2870 +/- ##
==========================================
- Coverage 96.20% 96.20% -0.01%
==========================================
Files 762 761 -1
Lines 21488 21453 -35
Branches 7284 7280 -4
==========================================
- Hits 20673 20639 -34
+ Misses 762 761 -1
Partials 53 53 ☔ View full report in Codecov by Sentry. |
@@ -1042,5 +1042,36 @@ describe('toolbar mode only features', () => { | |||
|
|||
expect(wrapper.findActiveDrawer()!.getElement()).toHaveTextContent('runtime drawer content'); | |||
}); | |||
|
|||
test('dynamically registered drawers with defaultActive: true should open even when there are already open drawer(s) on the page', async () => { |
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.
Do we have negative case scenarios?
- After max drawers already open,
defaultActive
does not open a new one - After user opened a global drawer manually, late registered
defaultActive
don't open
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.
No for both. Do we have any specific requirements for this? If so, could you point me to where I can check them?
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.
That's my understanding of our discussion for this bug yesterday. I do not think there is any written down text
…um limit is reached or if there are already global drawer(s) opened by user action
Description
Runtime drawers with
defaultActive: true
were not opening when there were already open drawers on the page. This PR fixes that issue by updating the condition in theonDrawersRegistered
event. Previously, runtime drawers withdefaultActive: true
would only set active drawers if none were open. Now, the condition has been adjusted to check if drawers withdefaultActive
are not currently open, allowing them to open regardless of other active drawers.Related links, issue #, if available: n/a
How has this been tested?
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md
.CONTRIBUTING.md
.Security
checkSafeUrl
function.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.