Skip to content

Commit

Permalink
[Maps] provide drag-n-drop support to order tooltip properties (#46631)
Browse files Browse the repository at this point in the history
* [Maps] tooltip custom labels

* add drag handlers for re-ordering tooltip property order

* add trash button to remove property

* add jest tests for AddTooltipFieldPopover

* sort EMS file tooltip properties

* update TooltipSelector jest test

* clean up AddTooltipFieldPopover field sorting

* remove console statements

* add more styles when row is getting dragged

* change reorder aria label

* move css changes into seperate file

* allow adding multiple fields before closing popover

* clear checked state on Add

* update jest snapshots

* use FieldIcon to display field type as icon

* add bottom border to tooltip field

* avoid flash after drag and drop

* Tooltip styles (#32)

* update TooltipSelector snapshot

* replace 24px with
  • Loading branch information
nreese committed Oct 9, 2019
1 parent cb4d683 commit e925186
Show file tree
Hide file tree
Showing 14 changed files with 757 additions and 172 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions x-pack/legacy/plugins/maps/public/components/_index.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
@import './metric_editors';
@import './geometry_filter';
@import './tooltip_selector';
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
.mapTooltipSelector__propertyRow {
display: flex;

padding: $euiSizeXS 0;
border-bottom: 1px solid $euiColorLightShade;
background-color: $euiColorEmptyShade;

&:hover,
&:focus,
&:focus-within {
.mapTooltipSelector__propertyIcons {
display: block;
animation: mapPropertyIconsBecomeVisible $euiAnimSpeedFast $euiAnimSlightResistance;
}
}

.mapTooltipSelector__propertyIcons {
&:hover,
&:focus {
display: block;
animation: mapPropertyIconsBecomeVisible $euiAnimSpeedFast $euiAnimSlightResistance;
}
}
}

.mapTooltipSelector__propertyRow-isDragging {
@include euiBottomShadowMedium;
}

.mapTooltipSelector__propertyRow-isDraggingOver {
// Don't allow interaction events while layer is being re-ordered
// sass-lint:disable-block no-important
pointer-events: none !important;
}

.mapTooltipSelector__propertyContent {
overflow: hidden;
flex-grow: 1;
min-height: $euiSizeL;
}

.mapTooltipSelector__propertyIcons {
flex-shrink: 0;
display: none;
}

.mapTooltipSelector__grab:hover {
cursor: grab;
}

@keyframes mapPropertyIconsBecomeVisible {
0% {
opacity: 0;
}

100% {
opacity: 1;
}
}
Loading

0 comments on commit e925186

Please sign in to comment.