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

[Look&Feel] Discover and Query Management fix #7530

Merged
merged 7 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelogs/fragments/7530.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
refactor:
- [Look&Feel] Discover and Query Management fix ([#7530](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7530))

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

Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ import {
EuiText,
EuiSpacer,
EuiIcon,
EuiToolTip,
} from '@elastic/eui';

import { i18n } from '@osd/i18n';
Expand Down Expand Up @@ -176,16 +175,15 @@ export function SavedQueryManagementComponent({
});

const savedQueryPopoverButton = (
<EuiToolTip content={label} delay="long" position="bottom">
<EuiSmallButtonEmpty
onClick={handleTogglePopover}
aria-label={label}
data-test-subj="saved-query-management-popover-button"
className="osdSavedQueryManagement__popoverButton"
>
<EuiIcon type="save" className="euiQuickSelectPopover__buttonText" />
</EuiSmallButtonEmpty>
</EuiToolTip>
<EuiSmallButtonEmpty
onClick={handleTogglePopover}
aria-label={label}
data-test-subj="saved-query-management-popover-button"
className="osdSavedQueryManagement__popoverButton"
title={label}
>
<EuiIcon type="save" className="euiQuickSelectPopover__buttonText" />
</EuiSmallButtonEmpty>
);

const savedQueryRows = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import React, { useState } from 'react';
import {
EuiPopover,
EuiPopoverTitle,
EuiSmallButtonIcon,
EuiButtonIcon,
EuiToolTip,
EuiFlexGroup,
Expand Down Expand Up @@ -153,7 +152,7 @@ export const DiscoverField = ({
defaultMessage: 'Add field as column',
})}
>
<EuiSmallButtonIcon
<EuiButtonIcon
iconType="plusInCircleFilled"
onClick={(ev: React.MouseEvent<HTMLButtonElement>) => {
if (ev.type === 'click') {
Expand All @@ -163,6 +162,7 @@ export const DiscoverField = ({
ev.stopPropagation();
toggleDisplay(field);
}}
size="xs"
data-test-subj={`fieldToggle-${field.name}`}
aria-label={addLabelAria}
className="dscSidebarField__actionButton"
Expand All @@ -177,7 +177,7 @@ export const DiscoverField = ({
defaultMessage: 'Remove field from table',
})}
>
<EuiSmallButtonIcon
<EuiButtonIcon
color="danger"
iconType="cross"
onClick={(ev: React.MouseEvent<HTMLButtonElement>) => {
Expand All @@ -188,6 +188,7 @@ export const DiscoverField = ({
ev.stopPropagation();
toggleDisplay(field);
}}
size="xs"
data-test-subj={`fieldToggle-${field.name}`}
aria-label={removeLabelAria}
className="dscSidebarField__actionButton"
Expand Down

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

Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ $visLegendLineHeight: $euiSize;

.visLegend__toggle {
border-radius: $euiBorderRadius;
position: absolute;
bottom: 0;
left: 0;
display: flex;
padding: $euiSizeXS;
background-color: $euiColorEmptyShade;
Expand All @@ -24,6 +21,12 @@ $visLegendLineHeight: $euiSize;
}
}

.visLegend__toggleTooltipAnchor {
position: absolute;
bottom: 0;
left: 0;
}

.visLegend__toggle--isOpen {
background-color: transparentize($euiColorDarkestShade, 0.9);
opacity: 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,12 @@ export class VisLegend extends PureComponent<VisLegendProps, VisLegendState> {

return (
<div className="visLegend">
<EuiToolTip content={label} delay="long" position="bottom">
<EuiToolTip
anchorClassName="visLegend__toggleTooltipAnchor"
content={label}
delay="long"
position="bottom"
>
<button
type="button"
onClick={this.toggleLegend}
Expand Down
Loading