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

UI/gate wizard #6094

Merged
merged 6 commits into from
Jan 28, 2019
Merged

UI/gate wizard #6094

merged 6 commits into from
Jan 28, 2019

Conversation

andaley
Copy link
Contributor

@andaley andaley commented Jan 24, 2019

Only display onboarding wizard sections that the user has access to

  • Only allow users to begin the wizard when they have selected at least 1 item
  • Note: a user must have ALL capabilities for a given section for it to be enabled. For instance, if a user can create, edit, but not delete a policy, then they cannot progress through the 'Policies' section of the onboarding wizard.

Testing

If a user has full capabilities but has not selected anything, all sections should be enabled but the start button should be disabled.
screen shot 2019-01-23 at 4 11 02 pm

Once they select something, the start button should be enabled.
screen shot 2019-01-23 at 4 11 15 pm

If a user has no capabilities, all sections should be disabled with a tooltip on hover.
screen shot 2019-01-23 at 4 11 55 pm

@andaley andaley changed the title UU/gate wizard UI/gate wizard Jan 24, 2019
@andaley andaley requested review from a team January 24, 2019 00:10
johncowen
johncowen previously approved these changes Jan 25, 2019
Copy link

@johncowen johncowen left a comment

Choose a reason for hiding this comment

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

Hey Noelle!

Got a chance to try this out, looks good to me!

I left a couple of notes, both suggestions. Check see what Matthew and Madalyn think of course but 👍

@@ -108,33 +108,53 @@ export default Service.extend({
}
},

hasPermission(pathName) {
hasPermission(pathName, capabilities = [null]) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why [null] instead of []?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

setting capabilities as [] caused the tests to fail & incorrectly show items because calling .every on an empty array returned true. javascript! 🤷‍♀️

Copy link
Contributor

Choose a reason for hiding this comment

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

huh guess I haven't used every/some enough to realize that - thanks!

meirish
meirish previously approved these changes Jan 28, 2019
Copy link
Contributor

@meirish meirish left a comment

Choose a reason for hiding this comment

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

A couple of questions, but looks great👌. I think you can delete some things, but just going to pre-approve in anticipation of that.

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.

3 participants