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] Add workspace overview page #6584

Merged
merged 28 commits into from Apr 25, 2024

Conversation

Hailong-am
Copy link
Contributor

@Hailong-am Hailong-am commented Apr 22, 2024

Description

This PR will implement a simple version of workspace overview page, it includes

  • start working section and getting start modal
  • overview tab - show workspace description
  • library tab - it will redirect to saved objects management page
  • settings tab - that will embed workspace update page
  • add workspace overview into breadcrumb for all pages if in a workspace

Issues Resolved

closes #6583

Screenshot

workspace_overview.mov

Testing the changes

Changelog

  • feat: [Workspace] Add workspace overview page

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Signed-off-by: Hailong Cui <ihailong@amazon.com>

address review comments

Signed-off-by: Hailong Cui <ihailong@amazon.com>

address ux review comments

Signed-off-by: Hailong Cui <ihailong@amazon.com>

Add workspace overview to breadCrumb

Signed-off-by: Hailong Cui <ihailong@amazon.com>

getting start modal & settings tab

Signed-off-by: Hailong Cui <ihailong@amazon.com>

home breadcrumb

Signed-off-by: Hailong Cui <ihailong@amazon.com>

fix rebase issue

Signed-off-by: Hailong Cui <ihailong@amazon.com>

tmp enable management

Signed-off-by: Hailong Cui <ihailong@amazon.com>

add workspace overview collapsed into localStorage

Signed-off-by: Hailong Cui <ihailong@amazon.com>

getting start modal

Signed-off-by: Hailong Cui <ihailong@amazon.com>

page layout

Signed-off-by: Hailong Cui <ihailong@amazon.com>

Add test cases

Signed-off-by: Hailong Cui <ihailong@amazon.com>

fix breadcrumb

Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
@Hailong-am Hailong-am changed the title Workspace overview page [WIP] [Workspace]Workspace overview page Apr 22, 2024
@Hailong-am Hailong-am marked this pull request as draft April 22, 2024 08:51
Copy link
Contributor

❌ Empty Changelog Section

The Changelog section in your PR description is empty. Please add a valid changelog entry or entries. If you did add a changelog entry, check to make sure that it was not accidentally included inside the comment block in the Changelog section.

Copy link
Contributor

❌ Empty Changelog Section

The Changelog section in your PR description is empty. Please add a valid changelog entry or entries. If you did add a changelog entry, check to make sure that it was not accidentally included inside the comment block in the Changelog section.

Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
core.application.navigateToApp('home');
},
};
breadCrumbs.splice(0, 0, homeCrumb, workspaceCrumb);
Copy link
Member

@ruanyl ruanyl Apr 23, 2024

Choose a reason for hiding this comment

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

Should you use slice instead of splice? splice will change the array in place, I guess that's why subscribe to breadcrumb$ not refreshing the breadcrumb, because it returns the same array instance.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed to Promise.resolve().then(() => core.chrome.setBreadcrumbs(breadCrumbs)); as workaround

Copy link
Member

Choose a reason for hiding this comment

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

Just curious why using promise could solve the issue? :D

Copy link
Member

Choose a reason for hiding this comment

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

Just curious why using promise could solve the issue? :D

Yeah, I am looking into it, it does not make sense to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

might be local build cache issue, after clean all build caches and start with a refresh package, it works well.

Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
src/plugins/workspace/public/plugin.ts Outdated Show resolved Hide resolved
src/plugins/workspace/public/plugin.ts Outdated Show resolved Hide resolved
@Hailong-am Hailong-am changed the title [Workspace]Workspace overview page [Workspace] Add workspace overview page Apr 24, 2024
@Hailong-am
Copy link
Contributor Author

Failed CIs are try to get chromedriver version 124 while it doesn't have this version in npm repository yet. https://www.npmjs.com/package/chromedriver

@SuZhou-Joe SuZhou-Joe merged commit 9c884b0 into opensearch-project:main Apr 25, 2024
70 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 25, 2024
* workspace overview page

Signed-off-by: Hailong Cui <ihailong@amazon.com>

address review comments

Signed-off-by: Hailong Cui <ihailong@amazon.com>

address ux review comments

Signed-off-by: Hailong Cui <ihailong@amazon.com>

Add workspace overview to breadCrumb

Signed-off-by: Hailong Cui <ihailong@amazon.com>

getting start modal & settings tab

Signed-off-by: Hailong Cui <ihailong@amazon.com>

home breadcrumb

Signed-off-by: Hailong Cui <ihailong@amazon.com>

fix rebase issue

Signed-off-by: Hailong Cui <ihailong@amazon.com>

tmp enable management

Signed-off-by: Hailong Cui <ihailong@amazon.com>

add workspace overview collapsed into localStorage

Signed-off-by: Hailong Cui <ihailong@amazon.com>

getting start modal

Signed-off-by: Hailong Cui <ihailong@amazon.com>

page layout

Signed-off-by: Hailong Cui <ihailong@amazon.com>

Add test cases

Signed-off-by: Hailong Cui <ihailong@amazon.com>

fix breadcrumb

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* fix merge issue

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* fix wrong dataSourceManagement id

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* Changeset file for PR #6584 created/updated

* update page layout

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* overview tab layout update

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* fix workspace overview page breadcrumb

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* collapsed setting to be workspace level

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* fix workspace_overview_modal unit test

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* Update src/plugins/workspace/public/components/workspace_overview/getting_start_card.tsx

Co-authored-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>

* Update src/plugins/workspace/public/components/workspace_overview/workspace_overview_settings.tsx

Co-authored-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>

* Update src/plugins/workspace/public/components/workspace_overview/getting_start_modal.tsx

Co-authored-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>

* Update src/plugins/workspace/public/components/workspace_overview/getting_start_modal.tsx

Co-authored-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>

* Update src/plugins/workspace/public/components/workspace_overview/getting_start_modal.tsx

Co-authored-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>

* Update src/plugins/workspace/public/components/workspace_overview/getting_start_modal.tsx

Co-authored-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>

* address review comments

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* address review comments

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* fix setBreadcrumbs issue

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* wording change of breadcrumbs

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* udpate breadcrumb subscription to be a better name

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* Add unit test

Signed-off-by: Hailong Cui <ihailong@amazon.com>

---------

Signed-off-by: Hailong Cui <ihailong@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Co-authored-by: SuZhou-Joe <suzhou@amazon.com>
(cherry picked from commit 9c884b0)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
SuZhou-Joe added a commit that referenced this pull request Apr 26, 2024
* workspace overview page



address review comments



address ux review comments



Add workspace overview to breadCrumb



getting start modal & settings tab



home breadcrumb



fix rebase issue



tmp enable management



add workspace overview collapsed into localStorage



getting start modal



page layout



Add test cases



fix breadcrumb



* fix merge issue



* fix wrong dataSourceManagement id



* Changeset file for PR #6584 created/updated

* update page layout



* overview tab layout update



* fix workspace overview page breadcrumb



* collapsed setting to be workspace level



* fix workspace_overview_modal unit test



* Update src/plugins/workspace/public/components/workspace_overview/getting_start_card.tsx




* Update src/plugins/workspace/public/components/workspace_overview/workspace_overview_settings.tsx




* Update src/plugins/workspace/public/components/workspace_overview/getting_start_modal.tsx




* Update src/plugins/workspace/public/components/workspace_overview/getting_start_modal.tsx




* Update src/plugins/workspace/public/components/workspace_overview/getting_start_modal.tsx




* Update src/plugins/workspace/public/components/workspace_overview/getting_start_modal.tsx




* address review comments



* address review comments



* fix setBreadcrumbs issue



* wording change of breadcrumbs



* udpate breadcrumb subscription to be a better name



* Add unit test



---------




(cherry picked from commit 9c884b0)

Signed-off-by: Hailong Cui <ihailong@amazon.com>
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>
Co-authored-by: SuZhou-Joe <suzhou@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Workspace] Workspace overview page
3 participants