Skip to content
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

Merged
merged 14 commits into from
Jun 6, 2016
Merged

sidenav update #384

merged 14 commits into from
Jun 6, 2016

Conversation

miguelcobain
Copy link
Owner

to let other people review this

@miguelcobain miguelcobain added this to the 1.0 milestone May 24, 2016
@miguelcobain miguelcobain self-assigned this May 24, 2016
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');
Copy link
Contributor

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().

Copy link
Owner Author

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?

Copy link
Contributor

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.

Copy link
Owner Author

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.

{{#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}}
Copy link
Contributor

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?

Copy link
Owner Author

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.

@miguelcobain miguelcobain changed the title sidenav update [WIP] sidenav update Jun 6, 2016
@miguelcobain miguelcobain merged commit 9c52a9b into master Jun 6, 2016
@DanChadwick DanChadwick deleted the sidenav-wip branch June 6, 2016 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants