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): Fix dismiss callout and next styling #4938

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
5 changes: 3 additions & 2 deletions packages/osd-stylelint-config/config/global_selectors.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"src/plugins/vis_builder/public/application/components/side_nav.scss",
"packages/osd-ui-framework/src/components/button/button_group/_button_group.scss",
"src/plugins/discover_legacy/public/application/components/sidebar/discover_sidebar.scss",
"src/plugins/discover_legacy/public/application/angular/doc_table/components/table_row/_open.scss"
"src/plugins/discover_legacy/public/application/angular/doc_table/components/table_row/_open.scss",
"src/plugins/discover/public/application/components/data_grid/data_grid_table_cell_value.scss"
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const Sidebar: FC = ({ children }) => {
return (
<EuiPageSideBar className="deSidebar" sticky>
<EuiSplitPanel.Outer className="eui-yScroll" hasBorder={true} borderRadius="none">
<EuiSplitPanel.Inner paddingSize="s" grow={false}>
<EuiSplitPanel.Inner paddingSize="s" color="subdued" grow={false}>
<EuiComboBox
placeholder="Select a datasource"
singleSelection={{ asPlainText: true }}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.euiDescriptionList.euiDescriptionList--inline .euiDescriptionList__title.osdDescriptionListFieldTitle {
background-color: tintOrShade($euiColorPrimary, 90%, 70%);
}
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ describe('Testing fetchTableDataCell function', () => {
compressed={true}
type="inline"
>
<EuiDescriptionListTitle>
<EuiDescriptionListTitle
className="osdDescriptionListFieldTitle"
>
order_date
</EuiDescriptionListTitle>
<EuiDescriptionListDescription
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/
import './data_grid_table_cell_value.scss';

import React, { Fragment } from 'react';
import dompurify from 'dompurify';
Expand Down Expand Up @@ -30,7 +31,9 @@ function fetchSourceTypeDataCell(
<EuiDescriptionList type="inline" compressed>
{Object.keys(formattedRow).map((key) => (
<Fragment key={key}>
<EuiDescriptionListTitle>{key}</EuiDescriptionListTitle>
<EuiDescriptionListTitle className="osdDescriptionListFieldTitle">
{key}
</EuiDescriptionListTitle>
<EuiDescriptionListDescription
dangerouslySetInnerHTML={{ __html: dompurify.sanitize(formattedRow[key]) }}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,22 @@ export default function DiscoverCanvas({ setHeaderActionMenu, history }: ViewPro
if (isCallOutVisible) {
callOut = (
<EuiFlexItem grow={false}>
<EuiCallOut
title="You're viewing Discover 2.0. The old Discover app will be retired in OpenSearch version 2.11. To switch back to the old version, turn off the New Discover toggle."
iconType="alert"
dismissible
onDismissible={closeCallOut}
>
<p>
To provide feedback,{' '}
<EuiLink href="https://github.com/opensearch-project/OpenSearch-Dashboards/issues">
open an issue
</EuiLink>
.
</p>
</EuiCallOut>
<EuiPanel hasBorder={false} hasShadow={false} color="transparent" paddingSize="s">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we have 2 callouts here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that was a merge conflict - should be fixed

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, somehow managed to not commit - let me try again.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ha, OK, yeah, this should be fixed - but doublecheck my resolution here.

<EuiCallOut
title="You're viewing Discover 2.0. The old Discover app will be retired in OpenSearch version 2.11. To switch back to the old version, turn off the New Discover toggle."
iconType="alert"
dismissible
onDismiss={closeCallOut}
>
<p>
To provide feedback,{' '}
<EuiLink href="https://github.com/opensearch-project/OpenSearch-Dashboards/issues">
open an issue
</EuiLink>
.
</p>
</EuiCallOut>
</EuiPanel>
</EuiFlexItem>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export function DiscoverLegacy({
title="This Discover app version will be retired in OpenSearch version 2.11. To switch to the new Discover 2.0 version, turn on the New Discover toggle."
iconType="alert"
dismissible
onDismissible={closeCallOut}
onDismiss={closeCallOut}
>
<p>
To provide feedback,{' '}
Expand Down
Loading