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] feat: Add workspace navigation for default route #7785

Merged

Conversation

yubonluo
Copy link
Contributor

@yubonluo yubonluo commented Aug 21, 2024

Description

Add workspace navigation for default route to handle the following cases:

  • If user has a default workspace configured, go to overview page of that workspace
  • If user only has one workspace, go to overview page of that workspace
  • If user has more than one workspaces, go to homepage
  • If user has no workspaces, go to initial page (initial is a new page)

Issues Resolved

#7783

Screenshot

2024-08-21.17.49.34.mp4

Testing the changes

Changelog

  • feat: [Workspace] Add workspace navigation for default route

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

Copy link
Contributor

❌ Changelog Entry Missing Hyphen

Changelog entries must begin with a hyphen (-).

Copy link

codecov bot commented Aug 21, 2024

Codecov Report

Attention: Patch coverage is 61.29032% with 12 lines in your changes missing coverage. Please review.

Project coverage is 63.83%. Comparing base (a59f8ab) to head (2f23970).
Report is 163 commits behind head on main.

Files with missing lines Patch % Lines
src/plugins/workspace/public/plugin.ts 15.38% 11 Missing ⚠️
...onents/workspace_detail/workspace_detail_panel.tsx 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7785      +/-   ##
==========================================
- Coverage   63.83%   63.83%   -0.01%     
==========================================
  Files        3658     3658              
  Lines       81284    81311      +27     
  Branches    12972    12978       +6     
==========================================
+ Hits        51884    51901      +17     
- Misses      26216    26226      +10     
  Partials     3184     3184              
Flag Coverage Δ
Linux_1 30.17% <61.29%> (+0.01%) ⬆️
Linux_2 55.87% <ø> (ø)
Linux_3 40.42% <ø> (ø)
Linux_4 31.29% <ø> (+<0.01%) ⬆️
Windows_1 30.19% <61.29%> (+0.01%) ⬆️
Windows_2 55.82% <ø> (ø)
Windows_3 40.42% <ø> (ø)
Windows_4 31.29% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: yubonluo <[email protected]>
…enSearch-Dashboards into 2.17/workspace-default-route
Signed-off-by: yubonluo <[email protected]>
@@ -375,6 +377,32 @@ export class WorkspacePlugin
workspaceAvailability: WorkspaceAvailability.outsideWorkspace,
});

const registeredUseCases$ = this.registeredUseCases$;
// register workspace navigation
Copy link
Member

Choose a reason for hiding this comment

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

Would be nice to have a more context about this change

@SuZhou-Joe SuZhou-Joe merged commit e1e8169 into opensearch-project:main Aug 23, 2024
66 of 67 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 23, 2024
* add workspace navigation

Signed-off-by: yubonluo <[email protected]>

* Changeset file for PR #7785 created/updated

* optimize the code

Signed-off-by: yubonluo <[email protected]>

* optimize the code

Signed-off-by: yubonluo <[email protected]>

* optimize the test code and add newHomePage check

Signed-off-by: yubonluo <[email protected]>

* delete useless code

Signed-off-by: yubonluo <[email protected]>

---------

Signed-off-by: yubonluo <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit e1e8169)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
ruanyl pushed a commit that referenced this pull request Aug 26, 2024
…7824)

* add workspace navigation



* Changeset file for PR #7785 created/updated

* optimize the code



* optimize the code



* optimize the test code and add newHomePage check



* delete useless code



---------



(cherry picked from commit e1e8169)

Signed-off-by: yubonluo <[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>
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.

5 participants