Skip to content

Commit

Permalink
[Discover] Remove sidebar item drag icon
Browse files Browse the repository at this point in the history
  • Loading branch information
jughosta committed Sep 7, 2023
1 parent ab2c54e commit 1d8ae3b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 86 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,36 +70,3 @@
background: lightOrDarkTheme(transparentize($euiColorMediumShade, .9), $euiColorEmptyShade);
color: $euiColorDarkShade;
}

// A drag handle will appear only on item hover/focus
.unifiedFieldListItemButton--withDragHandle {
&.kbnFieldButton {
padding: 0;
margin-bottom: $euiSizeXS / 2;
}

.kbnFieldButton__dragHandle {
margin-right: 0;
width: 0;
overflow: hidden;
transition: $euiAnimSpeedNormal ease-in-out;
transition-property: width, margin-right;
}

&.domDragDrop-isDraggable {
box-shadow: none;
}
&.domDragDrop-isDraggable:hover {
transform: none;
}

&:hover,
&[class*='-isActive'],
.domDragDrop__keyboardHandler:focus + &,
&:focus-within {
.kbnFieldButton__dragHandle {
margin-right: $euiSizeS;
width: $euiSize;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,11 @@ import {
UnifiedFieldListItemStats,
type UnifiedFieldListItemStatsProps,
} from './field_list_item_stats';
import { FieldListItemHandle } from './field_list_item_handle';
import type {
UnifiedFieldListSidebarContainerStateService,
AddFieldFilterHandler,
} from '../../types';

const DRAG_HANDLE = <FieldListItemHandle />;

interface GetCommonFieldItemButtonPropsParams {
stateService: UnifiedFieldListSidebarContainerStateService;
field: DataViewField;
Expand Down Expand Up @@ -343,7 +340,6 @@ function UnifiedFieldListItemComponent({
isActive={infoIsOpen}
flush={alwaysShowActionButton ? 'both' : undefined}
shouldAlwaysShowAction={alwaysShowActionButton}
dragHandle={isDragDisabled ? undefined : DRAG_HANDLE}
onClick={field.type !== '_source' ? togglePopover : undefined}
{...getCommonFieldItemButtonProps({ stateService, field, isSelected, toggleDisplay })}
/>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,14 @@
.unifiedFieldListSidebar__flyoutHeader {
align-items: center;
}

.unifiedFieldListSidebar .unifiedFieldListItemButton {
&.kbnFieldButton {
padding: 0;
margin-bottom: $euiSizeXS / 2;
}

&.domDragDrop-isDraggable {
box-shadow: none;
}
}

0 comments on commit 1d8ae3b

Please sign in to comment.