From 691dea9e332d438a045f3e7263f978fe842b741c Mon Sep 17 00:00:00 2001 From: Zhongnan Su Date: Tue, 9 Jul 2024 13:38:09 -0700 Subject: [PATCH 01/12] [Look&Feel] Refactor to use small list group item (#7198) Signed-off-by: Zhongnan Su --- .../public/ui/saved_query_management/saved_query_list_item.tsx | 1 + src/plugins/saved_objects/public/finder/saved_object_finder.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/src/plugins/data/public/ui/saved_query_management/saved_query_list_item.tsx b/src/plugins/data/public/ui/saved_query_management/saved_query_list_item.tsx index 311089440de..77711d6382a 100644 --- a/src/plugins/data/public/ui/saved_query_management/saved_query_list_item.tsx +++ b/src/plugins/data/public/ui/saved_query_management/saved_query_list_item.tsx @@ -96,6 +96,7 @@ export const SavedQueryListItem = ({ return ( Date: Tue, 9 Jul 2024 13:39:17 -0700 Subject: [PATCH 02/12] [Look&Feel] Standard Paragraph Text Size (#7156) Signed-off-by: Zhongnan Su --- .../application/ui/app_not_found_screen.tsx | 16 +++--- .../core_app/errors/url_overflow_ui.tsx | 2 +- .../status/components/server_status.tsx | 2 +- .../fatal_errors_screen.test.tsx.snap | 18 ++++--- .../fatal_errors/fatal_errors_screen.tsx | 15 +++--- .../overwrite_modal.test.tsx.snap | 10 ++-- .../application/components/import_flyout.tsx | 2 +- .../components/overwrite_modal.tsx | 18 ++++--- .../something_went_wrong_callout.tsx | 2 +- .../application/components/welcome_panel.tsx | 2 +- .../__snapshots__/clone_modal.test.js.snap | 4 +- .../dashboard_top_nav/top_nav/clone_modal.tsx | 36 +++++++------ .../dashboard_empty_screen.test.tsx.snap | 20 +++---- .../empty/dashboard_empty_screen.tsx | 6 +-- .../on_unsupported_time_pattern.tsx | 6 ++- .../query_string_input/language_switcher.tsx | 2 +- .../query_string_input/query_bar_top_row.tsx | 36 +++++++------ .../query_string_input/query_string_input.tsx | 38 +++++++------ .../ui/saved_query_form/save_query_form.tsx | 4 +- .../public/components/no_view.tsx | 16 +++--- .../components/chart/histogram/histogram.tsx | 6 ++- .../chart/hits_counter/hits_counter.tsx | 2 +- .../components/no_results/no_results.tsx | 14 ++--- .../lib/embeddables/embeddable_root.tsx | 6 ++- .../__snapshots__/data_view.test.tsx.snap | 6 ++- .../views/data/components/data_view.tsx | 2 +- .../public/components/landing/landing.tsx | 2 +- .../table_list_view/table_list_view.tsx | 17 +++--- .../public/util/mount_point_portal.test.tsx | 4 +- .../public/util/mount_point_portal.tsx | 13 +++-- .../saved_objects_table.test.tsx.snap | 54 +++++++++++-------- .../objects_table/components/flyout.tsx | 2 +- .../components/overwrite_modal.tsx | 4 +- .../objects_table/saved_objects_table.tsx | 15 +++--- .../application/components/right_nav.tsx | 15 +++--- .../application/components/workspace.tsx | 16 +++--- .../components/annotations_editor.js | 2 +- .../application/components/markdown_editor.js | 4 +- .../components/panel_config/table.js | 2 +- .../__snapshots__/new_vis_modal.test.tsx.snap | 16 +++--- .../type_selection/new_vis_help.test.tsx | 5 +- .../wizard/type_selection/new_vis_help.tsx | 2 +- .../wizard/type_selection/vis_help_text.tsx | 2 +- .../application/utils/get_table_columns.tsx | 24 ++++++--- 44 files changed, 289 insertions(+), 201 deletions(-) diff --git a/src/core/public/application/ui/app_not_found_screen.tsx b/src/core/public/application/ui/app_not_found_screen.tsx index ac2b2f80b9c..9575846095c 100644 --- a/src/core/public/application/ui/app_not_found_screen.tsx +++ b/src/core/public/application/ui/app_not_found_screen.tsx @@ -28,7 +28,7 @@ * under the License. */ -import { EuiEmptyPrompt, EuiPage, EuiPageBody, EuiPageContent } from '@elastic/eui'; +import { EuiEmptyPrompt, EuiPage, EuiPageBody, EuiPageContent, EuiText } from '@elastic/eui'; import React from 'react'; import { FormattedMessage } from '@osd/i18n/react'; @@ -48,12 +48,14 @@ export const AppNotFound = () => ( } body={ -

- -

+ +

+ +

+
} /> diff --git a/src/core/public/core_app/errors/url_overflow_ui.tsx b/src/core/public/core_app/errors/url_overflow_ui.tsx index ab5b8cf972b..01a4393f3b4 100644 --- a/src/core/public/core_app/errors/url_overflow_ui.tsx +++ b/src/core/public/core_app/errors/url_overflow_ui.tsx @@ -38,7 +38,7 @@ import { IS_IE } from './url_overflow'; export const UrlOverflowUi: React.FC<{ basePath: IBasePath }> = ({ basePath }) => { return ( - +

= ({ name, server - +

{name}

diff --git a/src/core/public/fatal_errors/__snapshots__/fatal_errors_screen.test.tsx.snap b/src/core/public/fatal_errors/__snapshots__/fatal_errors_screen.test.tsx.snap index 1f86c71d1a9..2165a2112f2 100644 --- a/src/core/public/fatal_errors/__snapshots__/fatal_errors_screen.test.tsx.snap +++ b/src/core/public/fatal_errors/__snapshots__/fatal_errors_screen.test.tsx.snap @@ -43,13 +43,17 @@ exports[`FatalErrorsScreen rendering render matches snapshot 1`] = ` ] } body={ -

- -

+ +

+ +

+
} iconColor="danger" iconType="alert" diff --git a/src/core/public/fatal_errors/fatal_errors_screen.tsx b/src/core/public/fatal_errors/fatal_errors_screen.tsx index 5cc359ecc89..ecb95f3217e 100644 --- a/src/core/public/fatal_errors/fatal_errors_screen.tsx +++ b/src/core/public/fatal_errors/fatal_errors_screen.tsx @@ -37,6 +37,7 @@ import { EuiPage, EuiPageBody, EuiPageContent, + EuiText, } from '@elastic/eui'; import React from 'react'; import * as Rx from 'rxjs'; @@ -113,13 +114,15 @@ export class FatalErrorsScreen extends React.Component { } body={ -

- +

+ -

+ /> +

+
} actions={[ -

- Are you sure you want to overwrite the existing queries? This action cannot be undone. All existing queries will be deleted and replaced with the imported queries. If you are unsure, please choose the "Merge with existing queries" option instead -

+ +

+ Are you sure you want to overwrite the existing queries? This action cannot be undone. All existing queries will be deleted and replaced with the imported queries. If you are unsure, please choose the "Merge with existing queries" option instead +

+
`; diff --git a/src/plugins/console/public/application/components/import_flyout.tsx b/src/plugins/console/public/application/components/import_flyout.tsx index d8c791411ad..03991ef05f0 100644 --- a/src/plugins/console/public/application/components/import_flyout.tsx +++ b/src/plugins/console/public/application/components/import_flyout.tsx @@ -121,7 +121,7 @@ export const ImportFlyout = ({ close, refresh }: ImportFlyoutProps) => { - +

{loadingMessage}

diff --git a/src/plugins/console/public/application/components/overwrite_modal.tsx b/src/plugins/console/public/application/components/overwrite_modal.tsx index 5432a0fc86c..c4e36e30004 100644 --- a/src/plugins/console/public/application/components/overwrite_modal.tsx +++ b/src/plugins/console/public/application/components/overwrite_modal.tsx @@ -5,7 +5,7 @@ import React from 'react'; import { i18n } from '@osd/i18n'; -import { EUI_MODAL_CONFIRM_BUTTON, EuiConfirmModal } from '@elastic/eui'; +import { EUI_MODAL_CONFIRM_BUTTON, EuiConfirmModal, EuiText } from '@elastic/eui'; export interface OverwriteModalProps { onSkip: () => void; @@ -29,13 +29,15 @@ export const OverwriteModal = ({ onSkip, onConfirm }: OverwriteModalProps) => { defaultFocusedButton={EUI_MODAL_CONFIRM_BUTTON} maxWidth="500px" > -

- {i18n.translate('console.overwriteModal.body.conflict', { - defaultMessage: - 'Are you sure you want to overwrite the existing queries? This action cannot be undone. All existing queries will be deleted and replaced with the imported queries. If you are unsure, please choose the "{option}" option instead', - values: { option: 'Merge with existing queries' }, - })} -

+ +

+ {i18n.translate('console.overwriteModal.body.conflict', { + defaultMessage: + 'Are you sure you want to overwrite the existing queries? This action cannot be undone. All existing queries will be deleted and replaced with the imported queries. If you are unsure, please choose the "{option}" option instead', + values: { option: 'Merge with existing queries' }, + })} +

+
); }; diff --git a/src/plugins/console/public/application/components/something_went_wrong_callout.tsx b/src/plugins/console/public/application/components/something_went_wrong_callout.tsx index c69d14b0f8c..f12d5b9cda8 100644 --- a/src/plugins/console/public/application/components/something_went_wrong_callout.tsx +++ b/src/plugins/console/public/application/components/something_went_wrong_callout.tsx @@ -52,7 +52,7 @@ export const SomethingWentWrongCallout: FunctionComponent = ({ error, onB defaultMessage: 'Cannot load Console', })} > - +

- +

- +

{ color="warning" data-test-subj="titleDupicateWarnMsg" > -

- - - - ), - }} - /> -

+ +

+ + + + ), + }} + /> +

+
); @@ -174,7 +176,7 @@ export class DashboardCloneModal extends React.Component { - +

{ return ( - +

{description1} {description1 &&  } @@ -122,11 +122,11 @@ export function DashboardEmptyScreen({ className="dshStartScreen__pageContent" > - +

{mainText}

{additionalText ? ( - + {additionalText} ) : null} diff --git a/src/plugins/data/public/index_patterns/index_patterns/on_unsupported_time_pattern.tsx b/src/plugins/data/public/index_patterns/index_patterns/on_unsupported_time_pattern.tsx index 6cf7cb8a327..f0a40cfdcd9 100644 --- a/src/plugins/data/public/index_patterns/index_patterns/on_unsupported_time_pattern.tsx +++ b/src/plugins/data/public/index_patterns/index_patterns/on_unsupported_time_pattern.tsx @@ -30,7 +30,7 @@ import { i18n } from '@osd/i18n'; import { FormattedMessage } from '@osd/i18n/react'; -import { EuiButton, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; +import { EuiButton, EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui'; import React from 'react'; import { CoreStart } from 'opensearch-dashboards/public'; import { toMountPoint } from '../../../../opensearch_dashboards_react/public'; @@ -62,7 +62,9 @@ export const onUnsupportedTimePattern = ( title: warningTitle, text: toMountPoint(
-

{warningText}

+ +

{warningText}

+
- +

-

- +

+ - - - ), - }} - /> -

+ values={{ + link: ( + + + + ), + }} + /> +

+
onLuceneSyntaxWarningOptOut(toast)}> diff --git a/src/plugins/data/public/ui/query_string_input/query_string_input.tsx b/src/plugins/data/public/ui/query_string_input/query_string_input.tsx index 5d071748700..b2750e855b0 100644 --- a/src/plugins/data/public/ui/query_string_input/query_string_input.tsx +++ b/src/plugins/data/public/ui/query_string_input/query_string_input.tsx @@ -42,6 +42,7 @@ import { EuiLink, htmlIdGenerator, EuiPortal, + EuiText, } from '@elastic/eui'; import { FormattedMessage } from '@osd/i18n/react'; @@ -399,24 +400,29 @@ export default class QueryStringInputUI extends Component { }), text: toMountPoint(
-

- +

+ - - - ), - }} - /> -

+ values={{ + link: ( + + + + ), + }} + /> +

+ onDQLNestedQuerySyntaxInfoOptOut(toast)}> diff --git a/src/plugins/data/public/ui/saved_query_form/save_query_form.tsx b/src/plugins/data/public/ui/saved_query_form/save_query_form.tsx index e7e7ca27424..a57878c456a 100644 --- a/src/plugins/data/public/ui/saved_query_form/save_query_form.tsx +++ b/src/plugins/data/public/ui/saved_query_form/save_query_form.tsx @@ -157,7 +157,9 @@ export function SaveQueryForm({ const saveQueryForm = ( - {savedQueryDescriptionText} + + {savedQueryDescriptionText} + { @@ -27,12 +27,14 @@ export const NoView = () => {

} body={ -

- -

+ +

+ +

+
} /> diff --git a/src/plugins/discover/public/application/components/chart/histogram/histogram.tsx b/src/plugins/discover/public/application/components/chart/histogram/histogram.tsx index 87917c113c2..7c2782fa424 100644 --- a/src/plugins/discover/public/application/components/chart/histogram/histogram.tsx +++ b/src/plugins/discover/public/application/components/chart/histogram/histogram.tsx @@ -28,7 +28,7 @@ * under the License. */ -import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiSpacer } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiSpacer, EuiText } from '@elastic/eui'; import moment from 'moment-timezone'; import { unitOfTime } from 'moment'; import React, { Component } from 'react'; @@ -207,7 +207,9 @@ export class DiscoverHistogram extends Component{partialDataText} -

{formattedValue}

+ +

{formattedValue}

+
); } diff --git a/src/plugins/discover/public/application/components/chart/hits_counter/hits_counter.tsx b/src/plugins/discover/public/application/components/chart/hits_counter/hits_counter.tsx index fede3e04ecd..28fd96169a5 100644 --- a/src/plugins/discover/public/application/components/chart/hits_counter/hits_counter.tsx +++ b/src/plugins/discover/public/application/components/chart/hits_counter/hits_counter.tsx @@ -60,7 +60,7 @@ export function HitsCounter({ hits, showResetButton, onResetQuery }: HitsCounter alignItems="center" > - + {formatNumWithCommas(hits)}{' '} { - +

{ { description: 200, title: ( - + { { description: status:200, title: ( - + { { description: status:[400 TO 499], title: ( - + { { description: status:[400 TO 499] AND extension:PHP, title: ( - + { { description: status:[400 TO 499] AND (extension:php OR extension:html), title: ( - + { - +

{
{this.props.loading && } - {this.props.error && {this.props.error}} + {this.props.error && ( + + {this.props.error} + + )} ); } diff --git a/src/plugins/inspector/public/views/data/components/__snapshots__/data_view.test.tsx.snap b/src/plugins/inspector/public/views/data/components/__snapshots__/data_view.test.tsx.snap index bf8eabe60b8..0ef7dab5eca 100644 --- a/src/plugins/inspector/public/views/data/components/__snapshots__/data_view.test.tsx.snap +++ b/src/plugins/inspector/public/views/data/components/__snapshots__/data_view.test.tsx.snap @@ -612,9 +612,11 @@ exports[`Inspector Data View component should render loading state 1`] = ` className="euiSpacer euiSpacer--s" /> - +

- +

- + -

- -

+ +

+ +

+
); } diff --git a/src/plugins/opensearch_dashboards_react/public/util/mount_point_portal.test.tsx b/src/plugins/opensearch_dashboards_react/public/util/mount_point_portal.test.tsx index 21e6b278845..51ca1c18688 100644 --- a/src/plugins/opensearch_dashboards_react/public/util/mount_point_portal.test.tsx +++ b/src/plugins/opensearch_dashboards_react/public/util/mount_point_portal.test.tsx @@ -216,6 +216,8 @@ describe('MountPointPortal', () => { await refresh(); - expect(portalTarget.innerHTML).toBe('

Error rendering portal content

'); + expect(portalTarget.innerHTML).toBe( + '

Error rendering portal content

' + ); }); }); diff --git a/src/plugins/opensearch_dashboards_react/public/util/mount_point_portal.tsx b/src/plugins/opensearch_dashboards_react/public/util/mount_point_portal.tsx index 3462e3da443..250064613c0 100644 --- a/src/plugins/opensearch_dashboards_react/public/util/mount_point_portal.tsx +++ b/src/plugins/opensearch_dashboards_react/public/util/mount_point_portal.tsx @@ -32,6 +32,7 @@ import { i18n } from '@osd/i18n'; import React, { useRef, useEffect, useState, Component } from 'react'; import ReactDOM from 'react-dom'; import { MountPoint } from 'opensearch-dashboards/public'; +import { EuiText } from '@elastic/eui'; import { useIfMounted } from './utils'; interface MountPointPortalProps { @@ -98,11 +99,13 @@ class MountPointPortalErrorBoundary extends Component<{}, { error?: any }> { render() { if (this.state.error) { return ( -

- {i18n.translate('opensearch-dashboards-react.mountPointPortal.errorMessage', { - defaultMessage: 'Error rendering portal content', - })} -

+ +

+ {i18n.translate('opensearch-dashboards-react.mountPointPortal.errorMessage', { + defaultMessage: 'Error rendering portal content', + })} +

+
); } return this.props.children; diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/__snapshots__/saved_objects_table.test.tsx.snap b/src/plugins/saved_objects_management/public/management_section/objects_table/__snapshots__/saved_objects_table.test.tsx.snap index 6c56eed79fe..3cadcda9175 100644 --- a/src/plugins/saved_objects_management/public/management_section/objects_table/__snapshots__/saved_objects_table.test.tsx.snap +++ b/src/plugins/saved_objects_management/public/management_section/objects_table/__snapshots__/saved_objects_table.test.tsx.snap @@ -28,13 +28,17 @@ exports[`SavedObjectsTable delete should show a confirm modal 1`] = ` /> } > -

- -

+ +

+ +

+
} > -

- -

+ +

+ +

+
} > -

- -

+ +

+ +

+
{ - +

{loadingMessage}

diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/overwrite_modal.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/components/overwrite_modal.tsx index 40e0c0645b4..1d45d7f914b 100644 --- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/overwrite_modal.tsx +++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/overwrite_modal.tsx @@ -133,7 +133,9 @@ export const OverwriteModal = ({ conflict, onFinish }: OverwriteModalProps) => { defaultFocusedButton={EUI_MODAL_CONFIRM_BUTTON} maxWidth="500px" > -

{bodyText}

+ +

{bodyText}

+
{selectControl} ); diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx index 8cc50bb19a8..162daab66e5 100644 --- a/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx +++ b/src/plugins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx @@ -55,6 +55,7 @@ import { EuiFormRow, EuiFlexGroup, EuiFlexItem, + EuiText, } from '@elastic/eui'; import { i18n } from '@osd/i18n'; import { FormattedMessage } from '@osd/i18n/react'; @@ -738,12 +739,14 @@ export class SavedObjectsTable extends Component -

- -

+ +

+ +

+
{ maxWidth="300px" data-test-subj="confirmVisChangeModal" > -

- -

+ +

+ +

+
)} diff --git a/src/plugins/vis_builder/public/application/components/workspace.tsx b/src/plugins/vis_builder/public/application/components/workspace.tsx index 295ed528434..62f92b83505 100644 --- a/src/plugins/vis_builder/public/application/components/workspace.tsx +++ b/src/plugins/vis_builder/public/application/components/workspace.tsx @@ -4,7 +4,7 @@ */ import { i18n } from '@osd/i18n'; -import { EuiEmptyPrompt, EuiFlexItem, EuiIcon, EuiPanel } from '@elastic/eui'; +import { EuiEmptyPrompt, EuiFlexItem, EuiIcon, EuiPanel, EuiText } from '@elastic/eui'; import React, { useState, useMemo, useEffect, useLayoutEffect } from 'react'; import { useOpenSearchDashboards } from '../../../../opensearch_dashboards_react/public'; import { IExpressionLoaderParams } from '../../../../expressions/public'; @@ -124,12 +124,14 @@ export const WorkspaceUI = () => { } body={ <> -

- {i18n.translate('visBuilder.workSpace.empty.description', { - defaultMessage: - 'Drag a field to the configuration panel to generate a visualization.', - })} -

+ +

+ {i18n.translate('visBuilder.workSpace.empty.description', { + defaultMessage: + 'Drag a field to the configuration panel to generate a visualization.', + })} +

+
+

- +

- +

- +

Start creating your visualization by selecting a type for that visualization. @@ -1016,9 +1016,11 @@ exports[`NewVisModal filter for visualization types should render as expected 1` ] } > - +

Start creating your visualization by selecting a type for that visualization. @@ -2066,9 +2068,11 @@ exports[`NewVisModal should render as expected 1`] = ` ] } > - +

{ buttonText: 'Do it now!', description: 'Look at this fancy new thing!!!', }, + title: 'Test title', stage: 'production', }, @@ -56,7 +57,9 @@ describe('NewVisHelp', () => { /> ) ).toMatchInlineSnapshot(` - +

+

- + {highlightMsg && (

{highlightMsg} diff --git a/src/plugins/visualize/public/application/utils/get_table_columns.tsx b/src/plugins/visualize/public/application/utils/get_table_columns.tsx index 02917cf2b90..8cf5d658407 100644 --- a/src/plugins/visualize/public/application/utils/get_table_columns.tsx +++ b/src/plugins/visualize/public/application/utils/get_table_columns.tsx @@ -30,7 +30,15 @@ import React from 'react'; import { History } from 'history'; -import { EuiBetaBadge, EuiButton, EuiEmptyPrompt, EuiIcon, EuiLink, EuiBadge } from '@elastic/eui'; +import { + EuiBetaBadge, + EuiButton, + EuiEmptyPrompt, + EuiIcon, + EuiLink, + EuiBadge, + EuiText, +} from '@elastic/eui'; import { i18n } from '@osd/i18n'; import { FormattedMessage } from '@osd/i18n/react'; @@ -175,12 +183,14 @@ export const getNoItemsMessage = (createItem: () => void) => (

} body={ -

- -

+ +

+ +

+
} actions={ Date: Tue, 9 Jul 2024 14:08:52 -0700 Subject: [PATCH 03/12] [OE] skip running tests if CODEOWNERS was change (#7197) * [OE] skip running tests if CODEOWNERS was change Signed-off-by: Kawika Avilla * Changeset file for PR #7197 created/updated --------- Signed-off-by: Kawika Avilla Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> --- .github/workflows/build_and_test_workflow.yml | 2 ++ changelogs/fragments/7197.yml | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 changelogs/fragments/7197.yml diff --git a/.github/workflows/build_and_test_workflow.yml b/.github/workflows/build_and_test_workflow.yml index 6eff022974c..728722e952d 100644 --- a/.github/workflows/build_and_test_workflow.yml +++ b/.github/workflows/build_and_test_workflow.yml @@ -11,6 +11,7 @@ on: - '**/*.md' - 'docs/**' - '.lycheeignore' + - 'CODEOWNERS' - 'changelogs/fragments/**' pull_request: branches: ['**'] @@ -18,6 +19,7 @@ on: - '**/*.md' - 'docs/**' - '.lycheeignore' + - 'CODEOWNERS' - 'changelogs/fragments/**' env: diff --git a/changelogs/fragments/7197.yml b/changelogs/fragments/7197.yml new file mode 100644 index 00000000000..1810544b0b5 --- /dev/null +++ b/changelogs/fragments/7197.yml @@ -0,0 +1,2 @@ +chore: +- Skip running tests for updates in CODEOWNERS ([#7197](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7197)) \ No newline at end of file From f7ecefbb207cb4c612f0bb82ab88be7f17c23878 Mon Sep 17 00:00:00 2001 From: Viraj Sanghvi Date: Wed, 10 Jul 2024 10:29:49 -0700 Subject: [PATCH 04/12] feat: address styling of non-primary buttons by making secondary/empty (#7211) * feat: address styling of non-primary buttons by making secondary/empty --------- Signed-off-by: Viraj Sanghvi Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> --- changelogs/fragments/7211.yml | 2 ++ .../top_nav/__snapshots__/open_search_panel.test.tsx.snap | 5 ++--- .../application/components/top_nav/open_search_panel.tsx | 7 +++---- .../editor/__snapshots__/controls_tab.test.tsx.snap | 1 - .../public/components/editor/controls_tab.tsx | 1 - .../vis/__snapshots__/input_control_vis.test.tsx.snap | 4 ---- .../public/components/vis/input_control_vis.tsx | 1 - src/plugins/share/public/components/url_panel_content.tsx | 1 - 8 files changed, 7 insertions(+), 15 deletions(-) create mode 100644 changelogs/fragments/7211.yml diff --git a/changelogs/fragments/7211.yml b/changelogs/fragments/7211.yml new file mode 100644 index 00000000000..504ddde9a66 --- /dev/null +++ b/changelogs/fragments/7211.yml @@ -0,0 +1,2 @@ +feat: +- Address styling of non-primary buttons by making secondary/empty ([#7211](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7211)) \ No newline at end of file diff --git a/src/plugins/discover/public/application/components/top_nav/__snapshots__/open_search_panel.test.tsx.snap b/src/plugins/discover/public/application/components/top_nav/__snapshots__/open_search_panel.test.tsx.snap index 1fa9680fa70..90658765ca7 100644 --- a/src/plugins/discover/public/application/components/top_nav/__snapshots__/open_search_panel.test.tsx.snap +++ b/src/plugins/discover/public/application/components/top_nav/__snapshots__/open_search_panel.test.tsx.snap @@ -51,8 +51,7 @@ exports[`render 1`] = ` - @@ -61,7 +60,7 @@ exports[`render 1`] = ` id="discover.topNav.openSearchPanel.manageSearchesButtonLabel" values={Object {}} /> - + diff --git a/src/plugins/discover/public/application/components/top_nav/open_search_panel.tsx b/src/plugins/discover/public/application/components/top_nav/open_search_panel.tsx index f0ff36a15e5..171c728dfd8 100644 --- a/src/plugins/discover/public/application/components/top_nav/open_search_panel.tsx +++ b/src/plugins/discover/public/application/components/top_nav/open_search_panel.tsx @@ -33,7 +33,7 @@ import rison from 'rison-node'; import { i18n } from '@osd/i18n'; import { FormattedMessage } from '@osd/i18n/react'; import { - EuiButton, + EuiButtonEmpty, EuiFlexGroup, EuiFlexItem, EuiFlyout, @@ -101,8 +101,7 @@ export function OpenSearchPanel({ onClose, makeUrl }: Props) { {/* eslint-disable-next-line @elastic/eui/href-or-on-click */} - - + diff --git a/src/plugins/input_control_vis/public/components/editor/__snapshots__/controls_tab.test.tsx.snap b/src/plugins/input_control_vis/public/components/editor/__snapshots__/controls_tab.test.tsx.snap index c54bf4929e9..08a8cd93749 100644 --- a/src/plugins/input_control_vis/public/components/editor/__snapshots__/controls_tab.test.tsx.snap +++ b/src/plugins/input_control_vis/public/components/editor/__snapshots__/controls_tab.test.tsx.snap @@ -172,7 +172,6 @@ exports[`renders ControlsTab 1`] = ` diff --git a/src/plugins/input_control_vis/public/components/editor/controls_tab.tsx b/src/plugins/input_control_vis/public/components/editor/controls_tab.tsx index a5c3201a307..805645d6277 100644 --- a/src/plugins/input_control_vis/public/components/editor/controls_tab.tsx +++ b/src/plugins/input_control_vis/public/components/editor/controls_tab.tsx @@ -212,7 +212,6 @@ class ControlsTabUi extends PureComponent { { {(copy: () => void) => ( Date: Wed, 10 Jul 2024 15:04:49 -0700 Subject: [PATCH 05/12] [Look&Feel] Refactor to use semantic headers for page, modal & flyout (#7192) * [Look&Feel] refactor to use semantic header for page, modal and flygout Signed-off-by: Zhongnan Su * Changeset file for PR #7192 created/updated --------- Signed-off-by: Zhongnan Su Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> --- changelogs/fragments/7192.yml | 2 + .../dashboard_listing.test.tsx.snap | 100 +++++++++++------- .../__snapshots__/clone_modal.test.js.snap | 16 ++- .../dashboard_top_nav/top_nav/clone_modal.tsx | 12 ++- .../utils/get_no_items_message.tsx | 30 +++--- .../ui/saved_query_form/save_query_form.tsx | 10 +- .../data_grid/data_grid_table_flyout.tsx | 6 +- .../open_search_panel.test.tsx.snap | 6 +- .../components/top_nav/open_search_panel.tsx | 6 +- .../inspector_panel.test.tsx.snap | 14 +-- .../inspector/public/ui/inspector_panel.tsx | 8 +- .../public/components/landing/landing.tsx | 13 +-- .../overview_page_header.test.tsx.snap | 6 +- .../overview_page_header.tsx | 6 +- .../saved_object_save_modal.test.tsx.snap | 24 +++-- .../save_modal/saved_object_save_modal.tsx | 14 ++- .../__snapshots__/header.test.tsx.snap | 34 +++--- .../object_view/components/header.tsx | 6 +- .../__snapshots__/header.test.tsx.snap | 6 +- .../objects_table/components/header.tsx | 5 +- .../application/utils/get_table_columns.tsx | 14 +-- 21 files changed, 195 insertions(+), 143 deletions(-) create mode 100644 changelogs/fragments/7192.yml diff --git a/changelogs/fragments/7192.yml b/changelogs/fragments/7192.yml new file mode 100644 index 00000000000..4076bf2d162 --- /dev/null +++ b/changelogs/fragments/7192.yml @@ -0,0 +1,2 @@ +refactor: +- [Look&Feel] Refactor to use semantic headers for page, modal & flyout ([#7192](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7192)) \ No newline at end of file diff --git a/src/plugins/dashboard/public/application/components/dashboard_listing/__snapshots__/dashboard_listing.test.tsx.snap b/src/plugins/dashboard/public/application/components/dashboard_listing/__snapshots__/dashboard_listing.test.tsx.snap index a4236dfb66e..8a935d4affc 100644 --- a/src/plugins/dashboard/public/application/components/dashboard_listing/__snapshots__/dashboard_listing.test.tsx.snap +++ b/src/plugins/dashboard/public/application/components/dashboard_listing/__snapshots__/dashboard_listing.test.tsx.snap @@ -1097,15 +1097,19 @@ exports[`dashboard listing hideWriteControls 1`] = ` - - +

+ +

+
} /> } @@ -2338,15 +2342,19 @@ exports[`dashboard listing render table listing with initial filters from URL 1` } iconType="dashboardApp" title={ -

- -

+

+ +

+
} /> } @@ -3579,15 +3587,19 @@ exports[`dashboard listing renders call to action when no dashboards exist 1`] = } iconType="dashboardApp" title={ -

- -

+

+ +

+
} /> } @@ -4820,15 +4832,19 @@ exports[`dashboard listing renders table rows 1`] = ` } iconType="dashboardApp" title={ -

- -

+

+ +

+
} /> } @@ -6061,15 +6077,19 @@ exports[`dashboard listing renders warning when listingLimit is exceeded 1`] = ` } iconType="dashboardApp" title={ -

- -

+

+ +

+
} /> } diff --git a/src/plugins/dashboard/public/application/components/dashboard_top_nav/top_nav/__snapshots__/clone_modal.test.js.snap b/src/plugins/dashboard/public/application/components/dashboard_top_nav/top_nav/__snapshots__/clone_modal.test.js.snap index 8c3a617209e..1ea30b7fe0a 100644 --- a/src/plugins/dashboard/public/application/components/dashboard_top_nav/top_nav/__snapshots__/clone_modal.test.js.snap +++ b/src/plugins/dashboard/public/application/components/dashboard_top_nav/top_nav/__snapshots__/clone_modal.test.js.snap @@ -8,11 +8,17 @@ exports[`renders DashboardCloneModal 1`] = ` > - + +

+ +

+
diff --git a/src/plugins/dashboard/public/application/components/dashboard_top_nav/top_nav/clone_modal.tsx b/src/plugins/dashboard/public/application/components/dashboard_top_nav/top_nav/clone_modal.tsx index ae806ecc298..fb1aefab776 100644 --- a/src/plugins/dashboard/public/application/components/dashboard_top_nav/top_nav/clone_modal.tsx +++ b/src/plugins/dashboard/public/application/components/dashboard_top_nav/top_nav/clone_modal.tsx @@ -168,10 +168,14 @@ export class DashboardCloneModal extends React.Component { > - + +

+ +

+
diff --git a/src/plugins/dashboard/public/application/utils/get_no_items_message.tsx b/src/plugins/dashboard/public/application/utils/get_no_items_message.tsx index 175cafdc7a5..3b4681a00fd 100644 --- a/src/plugins/dashboard/public/application/utils/get_no_items_message.tsx +++ b/src/plugins/dashboard/public/application/utils/get_no_items_message.tsx @@ -5,7 +5,7 @@ import React, { Fragment } from 'react'; import { FormattedMessage } from '@osd/i18n/react'; -import { EuiButton, EuiEmptyPrompt, EuiLink } from '@elastic/eui'; +import { EuiButton, EuiEmptyPrompt, EuiLink, EuiText } from '@elastic/eui'; import { ApplicationStart } from 'opensearch-dashboards/public'; export const getNoItemsMessage = ( @@ -18,12 +18,14 @@ export const getNoItemsMessage = ( - - + +

+ +

+
} /> ); @@ -33,12 +35,14 @@ export const getNoItemsMessage = ( - - + +

+ +

+
} body={ diff --git a/src/plugins/data/public/ui/saved_query_form/save_query_form.tsx b/src/plugins/data/public/ui/saved_query_form/save_query_form.tsx index a57878c456a..5d648d667eb 100644 --- a/src/plugins/data/public/ui/saved_query_form/save_query_form.tsx +++ b/src/plugins/data/public/ui/saved_query_form/save_query_form.tsx @@ -234,9 +234,13 @@ export function SaveQueryForm({ - {i18n.translate('data.search.searchBar.savedQueryFormTitle', { - defaultMessage: 'Save query', - })} + +

+ {i18n.translate('data.search.searchBar.savedQueryFormTitle', { + defaultMessage: 'Save query', + })} +

+
diff --git a/src/plugins/discover/public/application/components/data_grid/data_grid_table_flyout.tsx b/src/plugins/discover/public/application/components/data_grid/data_grid_table_flyout.tsx index 315d5ca9c00..54ba156f005 100644 --- a/src/plugins/discover/public/application/components/data_grid/data_grid_table_flyout.tsx +++ b/src/plugins/discover/public/application/components/data_grid/data_grid_table_flyout.tsx @@ -11,7 +11,7 @@ import { EuiFlyoutBody, EuiFlexGroup, EuiFlexItem, - EuiTitle, + EuiText, } from '@elastic/eui'; import { FormattedMessage } from '@osd/i18n/react'; import { DocViewer } from '../doc_viewer/doc_viewer'; @@ -43,11 +43,11 @@ export function DataGridFlyout({ return ( - +

-
+
diff --git a/src/plugins/discover/public/application/components/top_nav/__snapshots__/open_search_panel.test.tsx.snap b/src/plugins/discover/public/application/components/top_nav/__snapshots__/open_search_panel.test.tsx.snap index 90658765ca7..185e4fe70b4 100644 --- a/src/plugins/discover/public/application/components/top_nav/__snapshots__/open_search_panel.test.tsx.snap +++ b/src/plugins/discover/public/application/components/top_nav/__snapshots__/open_search_panel.test.tsx.snap @@ -9,8 +9,8 @@ exports[`render 1`] = ` -

-
+
- +

-
+
- -

- Inspector -

-
+

+ Inspector +

+ + - -

{title}

-
+ +

{title}

+
- +

-
+ -

Page Title

-
+
diff --git a/src/plugins/opensearch_dashboards_react/public/overview_page/overview_page_header/overview_page_header.tsx b/src/plugins/opensearch_dashboards_react/public/overview_page/overview_page_header/overview_page_header.tsx index a636f7ecdb7..54eb4f940ef 100644 --- a/src/plugins/opensearch_dashboards_react/public/overview_page/overview_page_header/overview_page_header.tsx +++ b/src/plugins/opensearch_dashboards_react/public/overview_page/overview_page_header/overview_page_header.tsx @@ -34,7 +34,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiIcon, - EuiTitle, + EuiText, IconType, } from '@elastic/eui'; import { i18n } from '@osd/i18n'; @@ -101,9 +101,9 @@ export const OverviewPageHeader: FC = ({ )} - +

{title}

-
+
diff --git a/src/plugins/saved_objects/public/save_modal/__snapshots__/saved_object_save_modal.test.tsx.snap b/src/plugins/saved_objects/public/save_modal/__snapshots__/saved_object_save_modal.test.tsx.snap index 019daab09c2..bd73f21e112 100644 --- a/src/plugins/saved_objects/public/save_modal/__snapshots__/saved_object_save_modal.test.tsx.snap +++ b/src/plugins/saved_objects/public/save_modal/__snapshots__/saved_object_save_modal.test.tsx.snap @@ -8,15 +8,21 @@ exports[`SavedObjectSaveModal should render matching snapshot 1`] = ` > - + +

+ +

+
diff --git a/src/plugins/saved_objects/public/save_modal/saved_object_save_modal.tsx b/src/plugins/saved_objects/public/save_modal/saved_object_save_modal.tsx index a78615311f1..19277fd8080 100644 --- a/src/plugins/saved_objects/public/save_modal/saved_object_save_modal.tsx +++ b/src/plugins/saved_objects/public/save_modal/saved_object_save_modal.tsx @@ -106,11 +106,15 @@ export class SavedObjectSaveModal extends React.Component > - + +

+ +

+
diff --git a/src/plugins/saved_objects_management/public/management_section/object_view/components/__snapshots__/header.test.tsx.snap b/src/plugins/saved_objects_management/public/management_section/object_view/components/__snapshots__/header.test.tsx.snap index 81e74038af0..dc7a140dbd6 100644 --- a/src/plugins/saved_objects_management/public/management_section/object_view/components/__snapshots__/header.test.tsx.snap +++ b/src/plugins/saved_objects_management/public/management_section/object_view/components/__snapshots__/header.test.tsx.snap @@ -17,23 +17,27 @@ exports[`Intro component renders correctly 1`] = `
- -

+
- + - Edit search - -

-
+ > + Edit search + + +
+ diff --git a/src/plugins/saved_objects_management/public/management_section/object_view/components/header.tsx b/src/plugins/saved_objects_management/public/management_section/object_view/components/header.tsx index ff76a268296..c17e1248c95 100644 --- a/src/plugins/saved_objects_management/public/management_section/object_view/components/header.tsx +++ b/src/plugins/saved_objects_management/public/management_section/object_view/components/header.tsx @@ -32,10 +32,10 @@ import React from 'react'; import { EuiFlexGroup, EuiFlexItem, - EuiTitle, EuiButton, EuiPageContentHeader, EuiPageContentHeaderSection, + EuiText, } from '@elastic/eui'; import { FormattedMessage } from '@osd/i18n/react'; @@ -59,7 +59,7 @@ export const Header = ({ return ( - + {canEdit ? (

)} -
+
diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/header.test.tsx.snap b/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/header.test.tsx.snap index 038e1aaf2d8..92693296808 100644 --- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/header.test.tsx.snap +++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/header.test.tsx.snap @@ -9,7 +9,9 @@ exports[`Header should render normally 1`] = ` - +

-
+
- +

-
+
diff --git a/src/plugins/visualize/public/application/utils/get_table_columns.tsx b/src/plugins/visualize/public/application/utils/get_table_columns.tsx index 8cf5d658407..212529e6b37 100644 --- a/src/plugins/visualize/public/application/utils/get_table_columns.tsx +++ b/src/plugins/visualize/public/application/utils/get_table_columns.tsx @@ -175,12 +175,14 @@ export const getNoItemsMessage = (createItem: () => void) => ( - - + +

+ +

+
} body={ From b422791347c22029f0cf155ff24492d0ea9e3c8d Mon Sep 17 00:00:00 2001 From: Dan Dong <58446449+danieldong51@users.noreply.github.com> Date: Wed, 10 Jul 2024 22:40:34 -0700 Subject: [PATCH 06/12] [Look&Feel] Update Popover Padding Size (#7200) * Changed padding size of Popovers to small. --------- Signed-off-by: Dan Dong Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> --- changelogs/fragments/7200.yml | 2 ++ .../ui/header/__snapshots__/header.test.tsx.snap | 4 ++-- .../__snapshots__/header_help_menu.test.tsx.snap | 16 ++++++++-------- .../public/chrome/ui/header/header_help_menu.tsx | 1 + .../public/header_user_theme_menu.tsx | 1 + .../ui/query_string_input/language_switcher.tsx | 1 + .../components/sidebar/discover_field.tsx | 1 + .../application/components/data_tab/field.tsx | 1 + 8 files changed, 17 insertions(+), 10 deletions(-) create mode 100644 changelogs/fragments/7200.yml diff --git a/changelogs/fragments/7200.yml b/changelogs/fragments/7200.yml new file mode 100644 index 00000000000..e4602a49b52 --- /dev/null +++ b/changelogs/fragments/7200.yml @@ -0,0 +1,2 @@ +refactor: +- [Look&Feel] Update Popover Padding Size ([#7200](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7200)) \ No newline at end of file diff --git a/src/core/public/chrome/ui/header/__snapshots__/header.test.tsx.snap b/src/core/public/chrome/ui/header/__snapshots__/header.test.tsx.snap index b1bcadd8919..10a7e07e5c9 100644 --- a/src/core/public/chrome/ui/header/__snapshots__/header.test.tsx.snap +++ b/src/core/public/chrome/ui/header/__snapshots__/header.test.tsx.snap @@ -5781,7 +5781,7 @@ exports[`Header handles visibility and lock changes 1`] = ` id="headerHelpMenu" isOpen={false} ownFocus={true} - panelPaddingSize="m" + panelPaddingSize="s" repositionOnScroll={true} >