Skip to content

Commit

Permalink
[Workspace]Fix workspace assets page UI bugs (#8265) (#8378)
Browse files Browse the repository at this point in the history
* Update the gap between search bar and table



* Update to target workspace and remove description



* Add bottom Close button for copy result flyout



* Update "Objects" to "Assets" in the export modal



* Hide workspace column and filter when in a workspace



* Add tooltip for table refresh button



* Update objects to assets in top right buttons



* Update objects to assets in flyout



* Changeset file for PR #8265 created/updated

* Reduce page content padding for new updated UX



* Update meta title



* Update object to asset



---------



(cherry picked from commit 3ef1e09)

Signed-off-by: Lin Wang <[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 Sep 30, 2024
1 parent c0a7185 commit 16fbc1e
Show file tree
Hide file tree
Showing 19 changed files with 350 additions and 140 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/8265.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- [Workspace]Fix workspace assets page UI bugs ([#8265](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8265))
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,15 @@ interface MountParams {

let allowedObjectTypes: string[] | undefined;

const title = i18n.translate('savedObjectsManagement.objects.savedObjectsTitle', {
const savedObjectsTitle = i18n.translate('savedObjectsManagement.objects.savedObjectsTitle', {
defaultMessage: 'Saved Objects',
});
const workspaceAssetsTitle = i18n.translate('savedObjectsManagement.objects.workspaceAssetsTitle', {
defaultMessage: 'Workspace assets',
});
const assetsTitle = i18n.translate('savedObjectsManagement.objects.assetsTitle', {
defaultMessage: 'Assets',
});

const SavedObjectsEditionPage = lazy(() => import('./saved_objects_edition_page'));
const SavedObjectsTablePage = lazy(() => import('./saved_objects_table_page'));
Expand All @@ -75,7 +81,19 @@ export const mountManagementSection = async ({
? allowedObjectTypes
: allowedObjectTypes.filter((type) => type !== 'data-source');

coreStart.chrome.docTitle.change(title);
const useUpdatedUX = coreStart.uiSettings.get('home:useNewHomePage');
const currentWorkspaceId = coreStart.workspaces.currentWorkspaceId$.getValue();
const getDocTitle = () => {
if (currentWorkspaceId) {
return workspaceAssetsTitle;
}
if (useUpdatedUX) {
return assetsTitle;
}
return savedObjectsTitle;
};

coreStart.chrome.docTitle.change(getDocTitle());

const capabilities = coreStart.application.capabilities;

Expand All @@ -89,8 +107,6 @@ export const mountManagementSection = async ({
return children! as React.ReactElement;
};

const useUpdatedUX = coreStart.uiSettings.get('home:useNewHomePage');

const content = (
<Router history={history}>
<Switch>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 16fbc1e

Please sign in to comment.