Skip to content

Add closePopupMenu function to navbar service #142

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

Merged
merged 1 commit into from
Feb 15, 2019

Conversation

patocallaghan
Copy link
Contributor

As discussed with @mansona offline this is required for fixing ember-learn/ember-website#151

The PR introduces a closePopupMenu method to the navbar service. This allows you to close the es-navbar dropdown if it's open.

this.navbar.closePopupMenu();

I was trying to add a unit test for the new function but it wasn't straightforward. It's a bit janky as internally the navbar#register method accesses the DOM which isn't available in a unit test. Any thoughts?

Copy link
Member

@mansona mansona left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@mansona
Copy link
Member

mansona commented Feb 15, 2019

@patocallaghan I think it's best to come back to the testing story later. There isn't that much testing around the components in here yet and we don't need to block needed features like this while waiting for testing 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants