Skip to content

Commit

Permalink
fix(ui): fix label selection blocked by dropdown
Browse files Browse the repository at this point in the history
Fixes label selection being blocked by labels menu dropdown and
adds margins to labels menu items.

Co-authored-by: Daniel Campbell <[email protected]>
  • Loading branch information
OfTheDelmer and mavarius committed Feb 19, 2019
1 parent 284bef4 commit e1b02b3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 22 deletions.
22 changes: 4 additions & 18 deletions ui/src/clockface/components/label/LabelSelector.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,13 @@
.label-selector--menu {
width: 100%;
min-height: 50px;
margin: $ix-marg-b;
}

.label-selector--menu-item {
padding: $ix-marg-a $ix-marg-b;
color: $g13-mist;
transition: color 0.25s ease, background-color 0.25s ease;

&.active,
&.active:hover {
cursor: pointer;
color: $g18-cloud;
background-color: $g6-smoke;
}
margin: 1px;
}

.label-selector--description,
.label-selector--empty {
font-size: 13px;
font-weight: 500;
Expand All @@ -61,15 +52,10 @@
line-height: 30px;
}

.label-selector--description {
margin-left: 6px;
color: $g13-mist;
flex: 2 0 50%;
}

.label-selector--bottom {
.label-selector--selection {
display: flex;
flex-wrap: nowrap;
margin-bottom: $ix-marg-c;
}

.label-selector--remove-all {
Expand Down
4 changes: 2 additions & 2 deletions ui/src/clockface/components/label/LabelSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ class LabelSelector extends Component<Props, State> {
return (
<ClickOutside onClickOutside={this.handleStopSuggesting}>
<div className="label-selector">
{this.input}
<div className="label-selector--bottom">
<div className="label-selector--selection">
{this.selectedLabels}
{this.clearSelectedButton}
</div>
{this.input}
</div>
</ClickOutside>
)
Expand Down
6 changes: 5 additions & 1 deletion ui/src/clockface/components/label/LabelSelectorMenuItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ class LabelSelectorMenuItem extends Component<Props> {
const {name, colorHex, description, id} = this.props

return (
<span onMouseOver={this.handleMouseOver} onClick={this.handleClick}>
<span
className="label-selector--menu-item"
onMouseOver={this.handleMouseOver}
onClick={this.handleClick}
>
<Label
name={name}
description={description}
Expand Down
2 changes: 1 addition & 1 deletion ui/src/shared/components/ResourceLabelForm.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

.resource-label--form {
margin: $ix-marg-b;
margin-bottom: $ix-marg-b;

.resource-label--create-button {
margin-top: $ix-marg-c + 2px;
Expand Down

0 comments on commit e1b02b3

Please sign in to comment.