-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,13 +63,22 @@ $tableCellPadding: 7px 8px 8px; | |
} | ||
|
||
.kuiTableRow { | ||
transition: background $globalAnimSlightResistance $globalAnimSpeedSlow; | ||
&:hover { | ||
.kuiTableRowHoverReveal { | ||
display: inline-block; | ||
} | ||
} | ||
} | ||
|
||
.kuiTableRow-isDeleted { | ||
background: lighten($errorColor, 35%); | ||
} | ||
|
||
.kuiTableRow-isNew { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
background: lighten($successColor, 70%); | ||
} | ||
|
||
.kuiTableRowHoverReveal { | ||
display: none; | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,20 +97,20 @@ <h3 class="kuiSubTitle"> | |
</td> | ||
</tr> | ||
|
||
<tr class="kuiTableRow"> | ||
<tr class="kuiTableRow kuiTableRow-isNew"> | ||
<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> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Small typo: This is a newly added row |
||
</div> | ||
</td> | ||
<td class="kuiTableRowCell"> | ||
<div class="kuiTableRowCell__liner"> | ||
<div class="kuiIcon kuiIcon--warning fa-bolt"></div> | ||
<div class="kuiIcon kuiIcon--error fa-warning"></div> | ||
</div> | ||
</td> | ||
<td class="kuiTableRowCell"> | ||
|
@@ -125,20 +125,20 @@ <h3 class="kuiSubTitle"> | |
</td> | ||
</tr> | ||
|
||
<tr class="kuiTableRow"> | ||
<tr class="kuiTableRow kuiTableRow-isDeleted"> | ||
<td class="kuiTableRowCell kuiTableRowCell--checkBox"> | ||
<div class="kuiTableRowCell__liner"> | ||
<input type="checkbox" class="kuiCheckBox"> | ||
<input type="checkbox" class="kuiCheckBox" disabled> | ||
</div> | ||
</td> | ||
<td class="kuiTableRowCell"> | ||
<div class="kuiTableRowCell__liner"> | ||
<a class="kuiLink" href="#">Dog</a> | ||
<p class="kuiText">This row is in the process of being deleted</p> | ||
</div> | ||
</td> | ||
<td class="kuiTableRowCell"> | ||
<div class="kuiTableRowCell__liner"> | ||
<div class="kuiIcon kuiIcon--error fa-warning"></div> | ||
<div class="kuiIcon kuiIcon--warning fa-bolt"></div> | ||
</div> | ||
</td> | ||
<td class="kuiTableRowCell"> | ||
|
There was a problem hiding this comment.
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.