Skip to content

Commit

Permalink
[Workspace] Fix fit&finish for workspace overview page (opensearch-pr…
Browse files Browse the repository at this point in the history
…oject#8139) (opensearch-project#8386)

* fit&finish for workspace overview page



* Changeset file for PR opensearch-project#8139 created/updated

* revert recent_items.tsx change



* use doclink service to build links



* remove commented urls



* update getting started card title size



* update getting started card title size



* recently updated assets



* update card title size



* Changeset file for PR opensearch-project#8139 created/updated

* address review comments



* fix for search overview page



* wrap the card title



* make getting started card not collapseable



* udpate getting started card title size



* address review comments



* address review comments



---------



(cherry picked from commit 69ec279)

Signed-off-by: Hailong Cui <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored and SuZhou-Joe committed Oct 3, 2024
1 parent 83064aa commit 17f08f8
Show file tree
Hide file tree
Showing 28 changed files with 604 additions and 213 deletions.
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 CardSection = ({ section, embeddable, contents$ }: Props) => {
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)}
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

0 comments on commit 17f08f8

Please sign in to comment.