-
Notifications
You must be signed in to change notification settings - Fork 88
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(NcAppSidebar): Allow to set open
state to prevent focus trap issues on mobile
#5584
Conversation
BTW the styleguide still does not work because multiple sidebars are opened that always set a focus trap. |
778139d
to
2618252
Compare
You mean, if styleguidist is open on mobile? |
Yes, because currently one focus trap for each example is created and you can not interact with the page except for the first app sidebar example. |
2618252
to
cf4f2bf
Compare
cf4f2bf
to
4ecad73
Compare
@nextcloud-libraries/designers about the toggle icon, we have this discussion here: So I used the icon recommended by @nimishavijay but got some feedback that it does not self descriptive for the sidebar. Maybe instead use |
4ecad73
to
2628763
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.
To make sure that it’s obvious and also different from the left navigation which uses menu-open, let’s use dock-right: https://pictogrammers.com/library/mdi/icon/dock-right/
2628763
to
f2dd294
Compare
@jancborchardt implemented ✔️ |
8a9f744
to
b0c5390
Compare
Checking attrs inheritance |
4aeff83
to
91bb18a
Compare
…ssues on mobile Signed-off-by: Ferdinand Thiessen <[email protected]>
To allow adjusting the position of the button a new `toggleClasses` prop is added. This can be use to assign custom classes to be used with the `:deep` selector. Co-authored-by: Ferdinand Thiessen <[email protected]> Co-authored-by: Grigorii K. Shartsev <[email protected]> Signed-off-by: Ferdinand Thiessen <[email protected]>
9c65000
to
35c96b5
Compare
…idebar [next] feat(NcAppSidebar): Allow to set open state to prevent focus trap issues on mobile #5584
CSS styling overrides have to be adjusted after upstream changes. Ref nextcloud-libraries/nextcloud-vue#5584 Signed-off-by: Richard Steinmetz <[email protected]>
open
state #5335☑️ Resolves
If the current screen size is "mobile" (<= 512px) and the app sidebar is not removed from dom but only hidden (
v-show
instead ofv-if
) then currently a user can not interact with the page anymore.This happens because a focus trap is registered but not removed when the element is hidden.
So this adds a comment about using
v-if
but for performance (e.g the sidebar is hidden and shown often) the sidebar also now allows to set theopen
prop for hiding it.🏁 Checklist
next
requested with a Vue 3 upgrade