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] Add and Remove state for kui table rows #11020

Closed
wants to merge 4 commits into from

Conversation

snide
Copy link
Contributor

@snide snide commented Apr 4, 2017

Adds add and remove states for kui table rows based off our error/success variables. Also adds helpful global animation constants that can be used across our sass. The table rows will fade in/out as the classes get applied/removed.

image

This was a request by @ycombinator

@snide snide added the Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins. label Apr 4, 2017
@snide snide requested a review from cjcenizal April 4, 2017 16:48
&:hover {
.kuiTableRowHoverReveal {
display: inline-block;
}
}
}

.kuiTableRow-isDeleted {
Copy link
Contributor

Choose a reason for hiding this comment

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

Chatted with @snide off-PR. This class name will be changed to kuiTableRow-isBeingDeleted to reflect more accurately what this style will convey.

@snide
Copy link
Contributor Author

snide commented Apr 4, 2017

@ycombinator addressed.

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.

This looks awesome! I had one question and one suggestion.

Also, do you want to add a button the user can click to execute some JS, which will dynamically apply and remove these state classes? This way people can see the animations in action. Here's how it's done in the Modal example: https://github.com/elastic/kibana/blob/master/ui_framework/doc_site/src/views/modal/modal_example.jsx#L45 and https://github.com/elastic/kibana/blob/master/ui_framework/doc_site/src/views/modal/modal_overlay.js

<td class="kuiTableRowCell kuiTableRowCell--checkBox">
<div class="kuiTableRowCell__liner">
<input type="checkbox" class="kuiCheckBox">
</div>
</td>
<td class="kuiTableRowCell">
<div class="kuiTableRowCell__liner">
<a class="kuiLink" href="#">Celebration of some very long content that will affect cell width and should eventually become truncated</a>
<a class="kuiLink" href="#">This is newly added row</a>
Copy link
Contributor

Choose a reason for hiding this comment

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

Small typo: This is a newly added row

background: lighten($errorColor, 35%);
}

.kuiTableRow-isNew {
Copy link
Contributor

Choose a reason for hiding this comment

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

I've been nesting these state classes inside of the root component alongside the pseudo-classes, since they're both used to communicate states. E.g. https://github.com/elastic/kibana/blob/master/ui_framework/components/tabs/_tabs.scss#L54

What do you think? Do you have a preference?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cjcenizal This is why I'd rather use mixins for the css classes, so no preference is allowed :)

I generally don't mind nested classes, but I didn't see much in your code so I kept it out. I'll switch it around if that's the norm.

@bohyun-e
Copy link

bohyun-e commented Apr 4, 2017

@snide Following @ycombinator 's comment from my question

posting here instead.

@snide
Copy link
Contributor Author

snide commented Apr 4, 2017

@cjcenizal addressed. If you'd like to add some js for to show the animation in the docs you're welcome to, but it's pretty simple, so i don't think it's needed. Similar to the expanded toggle above it.

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.

LGTM

@cjcenizal
Copy link
Contributor

We'll need to backport this to 5.x -- ping me if you need a hand with that.

@ycombinator
Copy link
Contributor

jenkins, test this.

@cjcenizal cjcenizal changed the title Add and Remove state for kui table rows [UI Framework] Add and Remove state for kui table rows Apr 5, 2017
Copy link
Contributor

@ycombinator ycombinator left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@ycombinator ycombinator left a comment

Choose a reason for hiding this comment

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

@snide This PR now has conflicts, so those should be addressed before merging (and backporting).

@jbudz
Copy link
Member

jbudz commented Apr 20, 2018

Looks old, closing this out with the expectation that kui -> eui will cover this. Mentioned this in the meta issue. Feel free to reopen if I'm out of date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants