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

[navigation]fix: redirect user to home in global when workspace is enabled #7551

Merged
merged 9 commits into from
Jul 30, 2024

Conversation

SuZhou-Joe
Copy link
Member

@SuZhou-Joe SuZhou-Joe commented Jul 29, 2024

Description

When workspace is enabled, users are not supposed to create any objects in global, thus the new left navigation need to redirect users to home, and in home, user won't be able to expand the left navigation.

  • Change the back to home when user is in settings and setup / data administration nav groups.
  • Change the navGroup to dataAdministration when navigate to devTools.

Issues Resolved

Screenshot

Before fix

Before the fix, you can see users is able to go into all use case and create objects in global.

20240729183432978.mp4

After fix

User will be redirect to home.

20240729183633650.mp4

Testing the changes

  • Enable workspace feature flag
  • Goes to settings and setup
  • Expand the left navigation

Changelog

  • fix: [navigation]feat: redirect user to home in global when workspace is enabled

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

opensearch-changeset-bot bot added a commit to SuZhou-Joe/OpenSearch-Dashboards that referenced this pull request Jul 29, 2024
@SuZhou-Joe SuZhou-Joe changed the title [navigation]feat: redirect user to home in global when workspace is enabled [navigation]fix: redirect user to home in global when workspace is enabled Jul 29, 2024
opensearch-changeset-bot bot added a commit to SuZhou-Joe/OpenSearch-Dashboards that referenced this pull request Jul 29, 2024
@opensearch-project opensearch-project deleted a comment from github-actions bot Jul 29, 2024
@opensearch-project opensearch-project deleted a comment from github-actions bot Jul 29, 2024
Copy link

codecov bot commented Jul 29, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 3 lines in your changes missing coverage. Please review.

Project coverage is 63.64%. Comparing base (5f19c37) to head (30b375b).
Report is 491 commits behind head on main.

Files with missing lines Patch % Lines
...me/ui/header/collapsible_nav_group_enabled_top.tsx 76.92% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7551   +/-   ##
=======================================
  Coverage   63.64%   63.64%           
=======================================
  Files        3629     3630    +1     
  Lines       79522    79535   +13     
  Branches    12604    12608    +4     
=======================================
+ Hits        50611    50620    +9     
- Misses      25842    25844    +2     
- Partials     3069     3071    +2     
Flag Coverage Δ
Linux_1 30.75% <0.00%> (-0.01%) ⬇️
Linux_2 55.58% <81.25%> (+<0.01%) ⬆️
Linux_3 40.21% <11.11%> (-0.01%) ⬇️
Linux_4 31.56% <0.00%> (-0.01%) ⬇️
Windows_1 30.77% <0.00%> (-0.01%) ⬇️
Windows_2 55.53% <81.25%> (+<0.01%) ⬆️
Windows_3 40.22% <11.11%> (-0.01%) ⬇️
Windows_4 31.56% <0.00%> (-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: SuZhou-Joe <[email protected]>
@SuZhou-Joe SuZhou-Joe requested a review from joshuali925 as a code owner July 29, 2024 21:38
import { DEFAULT_NAV_GROUPS } from '../../../core/public';

describe('<DevToolsIcon />', () => {
it('should call some methods from core service when click', () => {
Copy link
Member

Choose a reason for hiding this comment

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

Nit: better to elaborate what's the some methods

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, updated.

ruanyl
ruanyl previously approved these changes Jul 30, 2024
Signed-off-by: SuZhou-Joe <[email protected]>
@ananzh ananzh merged commit 96936f3 into opensearch-project:main Jul 30, 2024
67 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 30, 2024
…abled (#7551)

* feat: redirect user to home when in global

Signed-off-by: SuZhou-Joe <[email protected]>

* Changeset file for PR #7551 created/updated

* Changeset file for PR #7551 created/updated

* feat: add some comment

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: remove useless change

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimize comment

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimize description and variable naming

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: update

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: SuZhou-Joe <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Co-authored-by: Anan Zhuang <[email protected]>
(cherry picked from commit 96936f3)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 30, 2024
…abled (#7551)

* feat: redirect user to home when in global

Signed-off-by: SuZhou-Joe <[email protected]>

* Changeset file for PR #7551 created/updated

* Changeset file for PR #7551 created/updated

* feat: add some comment

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: remove useless change

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimize comment

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimize description and variable naming

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: update

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: SuZhou-Joe <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Co-authored-by: Anan Zhuang <[email protected]>
(cherry picked from commit 96936f3)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
SuZhou-Joe pushed a commit that referenced this pull request Jul 30, 2024
…abled (#7551) (#7572)

* feat: redirect user to home when in global



* Changeset file for PR #7551 created/updated

* Changeset file for PR #7551 created/updated

* feat: add some comment



* feat: remove useless change



* feat: optimize comment



* feat: optimize description and variable naming



* feat: update



---------




(cherry picked from commit 96936f3)

Signed-off-by: SuZhou-Joe <[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>
Co-authored-by: Anan Zhuang <[email protected]>
Qxisylolo pushed a commit to Qxisylolo/OpenSearch-Dashboards that referenced this pull request Aug 1, 2024
…abled (opensearch-project#7551)

* feat: redirect user to home when in global

Signed-off-by: SuZhou-Joe <[email protected]>

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

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

* feat: add some comment

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: remove useless change

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimize comment

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: optimize description and variable naming

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: update

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: SuZhou-Joe <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Co-authored-by: Anan Zhuang <[email protected]>
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.

3 participants