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 Framework] Change menu to unordered list #12102

Merged
merged 5 commits into from
Jun 1, 2017
Merged

[UI Framework] Change menu to unordered list #12102

merged 5 commits into from
Jun 1, 2017

Conversation

rhoboat
Copy link

@rhoboat rhoboat commented May 31, 2017

In some instances, a Menu as an unordered list feels more semantically accurate than using divs. Correspondingly MenuItems are list items.

@rhoboat rhoboat requested a review from cjcenizal May 31, 2017 17:29
@rhoboat rhoboat added WIP Work in progress Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins. labels May 31, 2017
@rhoboat rhoboat self-assigned this May 31, 2017
@rhoboat rhoboat added review v5.2.0 and removed WIP Work in progress labels May 31, 2017
Copy link
Contributor

@cjcenizal cjcenizal 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 in the browser! I really like this change. Thanks for doing it! Just had a few comments.

Also, I think we generally hold off on creating backport PRs until the PR into master has been merged. It's a bit easier that way because you don't have to worry about changes made in response to code reviews of the original PR rippling throughout the backport PRs. And you also won't need to get the backport PRs reviewed 99% of the time, because they code won't be any different than the original.

line-height: $globalLineHeight;
color: $globalFontColor;
}
.kuiEventBody__message {
Copy link
Contributor

Choose a reason for hiding this comment

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

*/
.kuiMenu {
padding-left: 0;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we structure the comment like this? This will be more consistent with the rest of the comments in the UI Framework.

/**
 * 1. Allow this class to be applied to `ol` and `ul` elements.
 */
.kuiMenu {
  padding-left: 0; /* 1 */
}

.kuiMenu--contained {
border: $globalBorderThin;
padding-left: 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't necessary because kuiMenu--contained should only be applied to elements that also have kuiMenu applied to it.


.kuiMenuItem {
padding: 6px 10px;
}
}

.kuiMenuItem {
list-style: none;
Copy link
Contributor

Choose a reason for hiding this comment

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

And this would become:

/**
 * 1. Allow this class to be applied to `li` elements.
 */
.kuiMenuItem {
  list-style: none; /* 1 */
}

@rhoboat
Copy link
Author

rhoboat commented May 31, 2017

@cjcenizal Implemented your requests.

@rhoboat
Copy link
Author

rhoboat commented May 31, 2017

I'm going to go ahead and backport changes because I have a dependent feature on 5.x currently. I probably should have built my other feature on master, but that feature has the most changes for 5.x rather than master, since it's our migration assistant. If I don't backport I'm basically unable to do much work. These are small enough changes that I feel ok about that extra work.

Copy link
Contributor

@cjcenizal cjcenizal 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, just had one request!


.kuiMenuItem {
padding: 6px 10px;
}
}

.kuiMenuItem {
list-style: none;
list-style: none; /* 2 */
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we scope this comment to the class itself, like in my original comment? As we add more comments, they scale better when the comments are localized like this.

Copy link
Author

@rhoboat rhoboat May 31, 2017

Choose a reason for hiding this comment

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

Your original comment had the /* 1 */ on the same line as the rule. What am I not seeing?

Copy link
Contributor

Choose a reason for hiding this comment

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

I meant like this:

/**
 * 1. Allow this class to be applied to `li` elements.
 */
.kuiMenuItem {
  list-style: none; /* 1 */
}

Copy link
Author

Choose a reason for hiding this comment

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

Do you mean the block comment that explains what each number is?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep, that block comment is now local to the class to which it pertains.

Copy link
Author

Choose a reason for hiding this comment

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

Gotcha. Once I do that, ok to merge? I don't think this needs a 2nd reviewer.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yup! 👍

@cjcenizal
Copy link
Contributor

Might want to rebase master though, to get the tests to pass.

@rhoboat rhoboat merged commit 46c832d into elastic:master Jun 1, 2017
@rhoboat rhoboat deleted the listify-menus branch June 1, 2017 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport review Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins. v5.5.0 v6.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants