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

Create CollapseButton component class to standardize appearance of this button. #11462

Merged
merged 5 commits into from May 4, 2017

Conversation

cjcenizal
Copy link
Contributor

@cjcenizal cjcenizal commented Apr 27, 2017

Addresses #11459

Notice the 4th caret, in the top-right corner of the timepicker dropdown.

Before

image

After

image

@cjcenizal cjcenizal added Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins. bug Fixes for quality problems that affect the customer experience v5.5.0 v6.0.0 labels Apr 27, 2017
@lukasolson lukasolson self-assigned this Apr 28, 2017
Copy link
Member

@lukasolson lukasolson left a comment

Choose a reason for hiding this comment

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

Hmm, ideally, if we're modifying this directive, we would do the following:

  1. Make the directive an attribute or element directive rather than a class directive (probably making use of transclude or something to make sure we don't modify the content)
  2. Move the HTML into a template file and use something like ng-class to control the class (instead of manually adding/removing classes whenever clicked)

Thoughts @cjcenizal? I understand this would take a bit more time to do, but I think it might be worth it in the end, since you're already modifying this directive.

@cjcenizal
Copy link
Contributor Author

@lukasolson You're right. I thought about it when I was working on this, too. But I think our sidebar will undergo some design and refactoring changes in the future, so I was thinking it'd be best to make the minimally invasive change now, and let this code get swept away during redesign or refactoring phases in the future.

Also, in terms of benefits, how much maintenance will this code require? If not that much, then will refactoring it now hold much benefit for people in the future?

@@ -23,6 +32,17 @@ uiModules

$collapser.on('click', function () {
$elem.toggleClass('closed');
Copy link
Member

Choose a reason for hiding this comment

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

If you're moving to a add/remove class instead of toggle class, why not move this down as well?

@cjcenizal
Copy link
Contributor Author

@lukasolson Good point man! Addressed. Could you take another look?

@cjcenizal
Copy link
Contributor Author

jenkins, test this

@lukasolson
Copy link
Member

Is this the intended behavior?

may-04-2017 13-12-49

Seems a little funky that the collapse button would stay in that same spot. I believe before it would go to the top (and not cover the content).

@lukasolson
Copy link
Member

I guess I was wrong... It looks like it used to be that way too. Ignore that last comment. 😄

Copy link
Member

@lukasolson lukasolson left a comment

Choose a reason for hiding this comment

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

LGTM!

@cjcenizal cjcenizal merged commit e91c99f into elastic:master May 4, 2017
@cjcenizal cjcenizal deleted the 11459/bug/caret-buttons branch May 4, 2017 20:58
cjcenizal added a commit to cjcenizal/kibana that referenced this pull request May 4, 2017
…is button. (elastic#11462)

* Create CollapseButton component class to standardize appearance of this button.
* Fix positioning of LocalSearch icon.
* Update collapsible-sidebar directive and Discover page object to use test subject selector.
* Refactor 'closed' class assignment.
cjcenizal added a commit that referenced this pull request May 4, 2017
…is button. (#11462) (#11605)

* Create CollapseButton component class to standardize appearance of this button.
* Fix positioning of LocalSearch icon.
* Update collapsible-sidebar directive and Discover page object to use test subject selector.
* Refactor 'closed' class assignment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience release_note:fix 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.

None yet

3 participants