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-next] Add register nav group updater to nav group service #7117

Merged

Conversation

wanglam
Copy link
Contributor

@wanglam wanglam commented Jun 27, 2024

Description

In #7029, we introduce a new concept of nav group. When user enter a workspace, the nav group in the left navigation should be shrink according the specific workspace setting. In order to update the nav group, add a registerNavGroupUpdater in the chrome service. The plugin can register their updaters by using the new function.

  1. Add register nav group updater to chrome group service
  2. Register nav group updater in workspace plugin

Issues Resolved

#7147

Screenshot

Testing the changes

For chrome service changes, can reference src/core/public/chrome/chrome_service.test.ts.
For workspace plugin changes, can reference src/plugins/workspace/public/plugin.test.ts.

Changelog

  • feat: [Navigation-next] Add register nav group updater in chrome service

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 wanglam/OpenSearch-Dashboards that referenced this pull request Jun 27, 2024
Copy link

codecov bot commented Jun 27, 2024

Codecov Report

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

Project coverage is 67.50%. Comparing base (0cc2b99) to head (d4f37a9).

Files Patch % Lines
src/plugins/workspace/public/plugin.ts 57.14% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7117      +/-   ##
==========================================
+ Coverage   67.48%   67.50%   +0.01%     
==========================================
  Files        3468     3468              
  Lines       68381    68402      +21     
  Branches    11114    11117       +3     
==========================================
+ Hits        46150    46172      +22     
+ Misses      19534    19533       -1     
  Partials     2697     2697              
Flag Coverage Δ
Linux_1 33.05% <27.27%> (+<0.01%) ⬆️
Linux_2 55.21% <100.00%> (+0.02%) ⬆️
Linux_3 45.33% <0.00%> (-0.02%) ⬇️
Linux_4 34.74% <0.00%> (-0.02%) ⬇️
Windows_1 33.07% <27.27%> (+<0.01%) ⬆️
Windows_2 55.16% <100.00%> (+0.02%) ⬆️
Windows_3 45.35% <0.00%> (-0.02%) ⬇️
Windows_4 34.74% <0.00%> (-0.02%) ⬇️

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.

@SuZhou-Joe SuZhou-Joe force-pushed the feature/navigation-next branch 2 times, most recently from b56b057 to ac790af Compare July 1, 2024 07:59
@wanglam wanglam force-pushed the add-register-nav-group-updater branch from 9fad488 to d1821b5 Compare July 1, 2024 08:08
@wanglam wanglam changed the title [Navigation-next] Add register nav group updater to chrome service [Navigation-next] Add register nav group updater to nav group service Jul 1, 2024
opensearch-changeset-bot bot added a commit to wanglam/OpenSearch-Dashboards that referenced this pull request Jul 1, 2024
@wanglam wanglam force-pushed the add-register-nav-group-updater branch 2 times, most recently from d1821b5 to 1466493 Compare July 1, 2024 08:24
@SuZhou-Joe SuZhou-Joe force-pushed the feature/navigation-next branch from ac790af to 8481ba5 Compare July 1, 2024 09:48
@wanglam wanglam force-pushed the add-register-nav-group-updater branch from 1466493 to 4e02312 Compare July 1, 2024 10:05
@wanglam wanglam force-pushed the add-register-nav-group-updater branch from 4e02312 to 69bac44 Compare July 2, 2024 02:39
@wanglam wanglam changed the base branch from feature/navigation-next to main July 2, 2024 02:44
@SuZhou-Joe SuZhou-Joe merged commit 417246b into opensearch-project:main Jul 3, 2024
67 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 3, 2024
…#7117)

* Add registerNavGroupUpdater to nav group service

Signed-off-by: Lin Wang <[email protected]>

* Register navGroupUpdater in workspace plugin

Signed-off-by: Lin Wang <[email protected]>

* Changeset file for PR #7117 created/updated

---------

Signed-off-by: Lin Wang <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Co-authored-by: ZilongX <[email protected]>
(cherry picked from commit 417246b)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
SuZhou-Joe pushed a commit that referenced this pull request Jul 4, 2024
…#7117) (#7167)

* Add registerNavGroupUpdater to nav group service



* Register navGroupUpdater in workspace plugin



* Changeset file for PR #7117 created/updated

---------




(cherry picked from commit 417246b)

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>
Co-authored-by: ZilongX <[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.

4 participants