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

Fix discover options' location #7581

Merged
merged 6 commits into from
Jul 30, 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/7581.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
feat:
- Fix discover options' location ([#7581](https:/opensearch-project/OpenSearch-Dashboards/pull/7581))
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,16 @@ export const DiscoverChart = ({
</div>
);

const toggleLabel = i18n.translate('queryEditor.collapse', {
defaultMessage: 'Toggle query editor',
const toggleLabel = i18n.translate('histogram.collapse', {
defaultMessage: 'Toggle histogram',
});

const toggle = (
<EuiToolTip content={toggleLabel}>
<EuiButtonIcon
aria-expanded={isCollapsed}
aria-label={toggleLabel}
data-test-subj="queryEditorCollapseBtn"
data-test-subj="histogramCollapseBtn"
onClick={() => setIsCollapsed(!isCollapsed)}
iconType={isCollapsed ? 'arrowRight' : 'arrowDown'}
iconSize={'s'}
Expand All @@ -124,9 +124,11 @@ export const DiscoverChart = ({

const histogramHeader = (
<EuiFlexGroup direction="column" gutterSize="xs">
<EuiFlexItem grow={false}>{hitsCounter}</EuiFlexItem>
<EuiFlexGroup direction="row" gutterSize="s">
<EuiFlexItem grow={true}>{hitsCounter}</EuiFlexItem>
<EuiFlexItem grow={false}>{discoverOptions}</EuiFlexItem>
</EuiFlexGroup>
<EuiFlexItem grow={false}>{isTimeBased && timeChartHeader}</EuiFlexItem>
<EuiFlexItem grow={false}>{discoverOptions}</EuiFlexItem>
</EuiFlexGroup>
);

Expand Down
Loading