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

[Workspace] Fix fit&finish for workspace overview page #8139

Merged
merged 28 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
3f149c3
fit&finish for workspace overview page
Hailong-am Sep 11, 2024
99f8d9c
Changeset file for PR #8139 created/updated
opensearch-changeset-bot[bot] Sep 11, 2024
9b4667c
revert recent_items.tsx change
Hailong-am Sep 12, 2024
2e685eb
use doclink service to build links
Hailong-am Sep 13, 2024
463b131
remove commented urls
Hailong-am Sep 13, 2024
31dce3a
Merge branch 'main' into fit_finish_overview_page
Hailong-am Sep 14, 2024
e46a84b
Merge branch 'main' into fit_finish_overview_page
Hailong-am Sep 16, 2024
7ae50de
update getting started card title size
Hailong-am Sep 18, 2024
15079c6
Merge remote-tracking branch 'upstream/main' into fit_finish_overview…
Hailong-am Sep 18, 2024
6a725a6
update getting started card title size
Hailong-am Sep 19, 2024
a00e601
recently updated assets
Hailong-am Sep 19, 2024
a8d828c
update card title size
Hailong-am Sep 19, 2024
481ca72
Changeset file for PR #8139 created/updated
opensearch-changeset-bot[bot] Sep 19, 2024
c71eeff
Merge branch 'main' into fit_finish_overview_page
Hailong-am Sep 19, 2024
a58d19a
Merge branch 'main' into fit_finish_overview_page
Hailong-am Sep 20, 2024
f7fe4fa
address review comments
Hailong-am Sep 20, 2024
75a939d
Merge branch 'main' into fit_finish_overview_page
Hailong-am Sep 20, 2024
3407f48
Merge branch 'main' into fit_finish_overview_page
Hailong-am Sep 23, 2024
825916c
fix for search overview page
Hailong-am Sep 25, 2024
0ca41fa
Merge remote-tracking branch 'upstream/main' into fit_finish_overview…
Hailong-am Sep 25, 2024
e043ca0
wrap the card title
Hailong-am Sep 26, 2024
2de8902
make getting started card not collapseable
Hailong-am Sep 27, 2024
9973518
udpate getting started card title size
Hailong-am Sep 27, 2024
981f421
Merge branch 'main' into fit_finish_overview_page
Hailong-am Sep 29, 2024
81ed6cb
address review comments
Hailong-am Sep 29, 2024
14f831a
Merge branch 'main' into fit_finish_overview_page
Hailong-am Sep 29, 2024
7fd15ee
address review comments
Hailong-am Sep 30, 2024
ecf295a
Merge remote-tracking branch 'upstream/main' into fit_finish_overview…
Hailong-am Sep 30, 2024
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/8139.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- Fix fit & finish for workspace overview getting started and assets section ([#8139](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8139))
9 changes: 8 additions & 1 deletion src/core/public/doc_links/doc_links_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,13 @@ export class DocLinksService {
},
visualize: {
// https://opensearch.org/docs/latest/dashboards/visualize/viz-index/
guide: `${OPENSEARCH_WEBSITE_DOCS}visualize/viz-index/`,
guide: `${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}visualize/viz-index/`,
},
dashboards: {
// https://opensearch.org/docs/latest/dashboards/quickstart/
quickStart: `${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}quickstart/`,
// https://opensearch.org/docs/latest/dashboards/dashboard/index/
createDashboards: `${OPENSEARCH_DASHBOARDS_VERSIONED_DOCS}dashboard/index/`,
},
management: {
// https://opensearch.org/docs/latest/dashboards/management/advanced-settings/
Expand Down Expand Up @@ -826,6 +832,7 @@ export interface DocLinksStart {
readonly s3DataSource: string;
};
readonly visualize: Record<string, string>;
readonly dashboards: Record<string, string>;
readonly management: Record<string, string>;
};
readonly noDocumentation: {
Expand Down
6 changes: 3 additions & 3 deletions src/core/utils/default_nav_groups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const defaultNavGroups = {
defaultMessage: 'Observability',
}),
description: i18n.translate('core.ui.group.observability.description', {
defaultMessage: 'Gain visibility into your application and infrastructure',
defaultMessage: 'Gain visibility into your applications and infrastructure.',
}),
order: 4000,
icon: 'wsObservability',
Expand All @@ -63,7 +63,7 @@ const defaultNavGroups = {
defaultMessage: 'Security Analytics',
}),
description: i18n.translate('core.ui.group.security.analytics.description', {
defaultMessage: 'Enhance your security posture with advanced analytics',
defaultMessage: 'Enhance your security posture with advanced analytics.',
}),
order: 5000,
icon: 'wsSecurityAnalytics',
Expand All @@ -86,7 +86,7 @@ const defaultNavGroups = {
defaultMessage: 'Search',
}),
description: i18n.translate('core.ui.group.search.description', {
defaultMessage: 'Discover and query your data with ease',
defaultMessage: 'Discover and query your data with ease.',
}),
order: 6000,
icon: 'wsSearch',
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 @@ -36,7 +36,7 @@ export class CardEmbeddable extends Embeddable<CardEmbeddableInput> {

const cardProps: EuiCardProps = {
...this.input.cardProps,
title: (this.input?.getTitle?.() || this.input?.title) ?? '',
title: this.input?.getTitle?.() || this.input?.title || '',
description: (
<EuiToolTip position="top" content={this.input?.toolTipContent}>
<>{this.input.description}</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import React from 'react';
import { render, screen } from '@testing-library/react';
import { render } from '@testing-library/react';

import { CardList } from './card_list';
import { CardContainer } from './card_container';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const CardListInner = ({ embeddable, input, embeddableServices }: Props) => {
<EuiFlexGroup
wrap={!!input.wrap}
style={input.wrap ? {} : { overflowX: 'auto' }}
gutterSize="s"
gutterSize="m"
>
{cards}
</EuiFlexGroup>
Expand All @@ -65,14 +65,14 @@ const CardListInner = ({ embeddable, input, embeddableServices }: Props) => {

if (input.grid && input.columns) {
return (
<EuiFlexGrid columns={input.columns as FlexGridColumns} gutterSize="s">
<EuiFlexGrid columns={input.columns as FlexGridColumns} gutterSize="m">
{cards}
</EuiFlexGrid>
);
}

return (
<EuiFlexGroup wrap={input.wrap} gutterSize="s">
<EuiFlexGroup wrap={input.wrap} gutterSize="m">
{cards}
</EuiFlexGroup>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,24 +62,27 @@
const factory = embeddable.getEmbeddableFactory(CARD_CONTAINER);

if (section.kind === 'card' && factory && input) {
const isCardCollapsible = section.collapsible;
return (
<>
{section.title ? (
<EuiTitle size="s">
<h2>
<EuiButtonIcon
iconType={isCardVisible ? 'arrowDown' : 'arrowUp'}
onClick={() => setIsCardVisible(!isCardVisible)}
color="text"
aria-label={isCardVisible ? 'Show panel' : 'Hide panel'}
/>
{isCardCollapsible ? (
<EuiButtonIcon
iconType={isCardVisible ? 'arrowDown' : 'arrowRight'}
onClick={() => setIsCardVisible(!isCardVisible)}

Check warning on line 74 in src/plugins/content_management/public/components/section_render.tsx

View check run for this annotation

Codecov / codecov/patch

src/plugins/content_management/public/components/section_render.tsx#L74

Added line #L74 was not covered by tests
color="text"
aria-label={isCardVisible ? 'Show panel' : 'Hide panel'}
/>
) : null}
{section.title}
</h2>
</EuiTitle>
) : null}
{isCardVisible && (
<>
<EuiSpacer size="s" /> <EmbeddableRenderer factory={factory} input={input} />
<EuiSpacer size="m" /> <EmbeddableRenderer factory={factory} input={input} />
</>
)}
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export type Section =
id: string;
order: number;
title?: string;
collapsible?: boolean;
input?: CardContainerExplicitInput;
columns?: number;
wrap?: boolean;
Expand Down
Loading
Loading