-
Notifications
You must be signed in to change notification settings - Fork 48
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 opening side menu on multiple instances #4045
Conversation
Your demo site is ready! 🚀 Visit it here: https://fgpv-vpgf.github.io/fgpv-vpgf/multi-instance-sidemenu/samples/index-samples.html |
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.
Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @yileifeng)
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.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @yileifeng)
packages/ramp-core/src/app/ui/sidenav/sidenav.service.js
line 325 at r1 (raw file):
$mdSidenav('left') .open() .then(() => $rootElement.find('md-sidenav[md-component-id="left"] button').first().rvFocus());
does the sidenav need an ID? Duplicate ids can mess with screenreaders so if we can avoid that we should.
5b6b9ba
to
dc0a13e
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.
Reviewable status: 1 of 6 files reviewed, 1 unresolved discussion (waiting on @RyanCoulsonCA and @spencerwahl)
packages/ramp-core/src/app/ui/sidenav/sidenav.service.js
line 325 at r1 (raw file):
Previously, spencerwahl (Spencer Wahl) wrote…
does the sidenav need an ID? Duplicate ids can mess with screenreaders so if we can avoid that we should.
changed md-component-id
to append -{map ID}
, let me know if this works
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.
Reviewable status: 1 of 6 files reviewed, 1 unresolved discussion (waiting on @RyanCoulsonCA and @spencerwahl)
packages/ramp-core/src/app/ui/sidenav/sidenav.service.js
line 325 at r1 (raw file):
Previously, yileifeng (Yi Lei Feng) wrote…
changed
md-component-id
to append-{map ID}
, let me know if this works
if so, can also update the other sidenav ID naming for basemaps (it is also just labeled right
currently)
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.
Reviewable status: 1 of 6 files reviewed, 1 unresolved discussion (waiting on @RyanCoulsonCA, @spencerwahl, and @yileifeng)
packages/ramp-core/src/app/ui/sidenav/sidenav.service.js
line 325 at r1 (raw file):
Previously, yileifeng (Yi Lei Feng) wrote…
if so, can also update the other sidenav ID naming for basemaps (it is also just labeled
right
currently)
Turns out I misunderstood what kind of id this is and its actually just set as md-component-id
which shouldn't cause any issues... my bad for not investigating further.
Can leave these changes in or revert, up to you.
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.
Reviewed 5 of 5 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @yileifeng)
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.
Reviewed 1 of 2 files at r1, 5 of 5 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @yileifeng)
Closes ramp4-pcar4/story-ramp#202
Fixes Storylines issue where page jumps to a previous map (with side menu already open) after opening side menu for a different map on the page. This is due to sidemenu IDs named the same so we end up calling
rvFocus
on the first element found. Instead, using$rootElement.find()
should find the correct menu. Changes to sample page can be discarded after demo if needed.Demo
This change is![Reviewable](https://camo.githubusercontent.com/23b05f5fb48215c989e92cc44cf6512512d083132bd3daf689867c8d9d386888/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)