-
-
Notifications
You must be signed in to change notification settings - Fork 333
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
sidenav update #384
sidenav update #384
Conversation
this._super(...arguments); | ||
if (this.get('navContainer')) { | ||
let lockedOpen = this.get('navContainer').get('sideBar').get('locked-open'); | ||
let lockedOpen = this.get('navContainer').get('sideBar').get('lockedOpen'); |
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.
Would there be a use case for lockedOpen being dynamic (i.e. changing after component creation)? I don't have one, but it would be easy to move this to didReceiveAttrs().
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.
this is on the toggle component. The toggle component is reaching the sidenav container for the lockedOpen
. lockedOpen is never passed in to sidenav-toggle, so I don't see how we can use didReceiveAttrs?
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.
Ah, right. Difficult to bind attributes from components that are parent/child. No matter as the use case is sketchy anyhow.
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.
still need a better way to do this with the new service. shouldn't be difficult.
…alue. added some guards on the lockedOpen changes
{{#paper-sidenav-toggle as |toggle|}} | ||
{{#paper-button onClick=(action "toggleMenu" target=toggle) iconButton=true}} | ||
{{#paper-sidenav-toggle class="hide-gt-sm"}} | ||
{{#paper-button onClick=null iconButton=true}} |
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.
Is this idiomatic? Maybe it should still be:
{{#paper-sidenav-toggle as |toggle|}}
{{#paper-button onClick=toggle iconButton=true}}
{{paper-icon "menu"}}
{{/paper-button}}
{{/paper-sidenav-toggle}}
That way you can also use a link or something instead and it's explicit what the purpose of the toggle+button combo is?
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.
Yeah, maybe that is more flexible as well.
to let other people review this