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 current nav group into chrome service #7166

Merged
merged 10 commits into from
Jul 12, 2024

Conversation

Hailong-am
Copy link
Contributor

@Hailong-am Hailong-am commented Jul 3, 2024

Description

  1. Add current nav group into chrome service
  2. prepend current nav group to breadcrumbs

Issues Resolved

#7131, #7132

Screenshot

image

Testing the changes

  1. start OpenSearch Dashboards
  2. go to app/management/opensearch-dashboards/settings to enable Use New Home Page (nav group share same configuration)
  3. open dev tools to set current nav group sessionStorage.setItem('core.chrome.currentNavGroupId','analytics')
  4. go to dashboard/visualization page and then refresh page
  5. you will see current nav group has been prepend to current breadcrumb

Changelog

  • feat: 1. Add current nav group into chrome service 2. Prepend current nav group into breadcrumb

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 Hailong-am/OpenSearch-Dashboards that referenced this pull request Jul 3, 2024
@Hailong-am Hailong-am changed the title Add current nav group into chrome service [Navigation-Next] Add current nav group into chrome service Jul 3, 2024
Copy link

codecov bot commented Jul 3, 2024

Codecov Report

Attention: Patch coverage is 77.50000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 67.56%. Comparing base (778a845) to head (b50fa27).

Files Patch % Lines
...ore/public/chrome/ui/header/header_breadcrumbs.tsx 61.53% 4 Missing and 1 partial ⚠️
.../core/public/chrome/nav_group/nav_group_service.ts 91.30% 0 Missing and 2 partials ⚠️
src/core/public/chrome/chrome_service.mock.ts 0.00% 1 Missing ⚠️
src/plugins/workspace/public/plugin.ts 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7166   +/-   ##
=======================================
  Coverage   67.55%   67.56%           
=======================================
  Files        3469     3469           
  Lines       68479    68515   +36     
  Branches    11130    11140   +10     
=======================================
+ Hits        46264    46292   +28     
- Misses      19512    19516    +4     
- Partials     2703     2707    +4     
Flag Coverage Δ
Linux_1 33.11% <5.00%> (-0.03%) ⬇️
Linux_2 55.30% <78.94%> (+0.03%) ⬆️
Linux_3 45.27% <2.63%> (-0.05%) ⬇️
Linux_4 34.68% <2.63%> (-0.03%) ⬇️
Windows_1 33.13% <5.00%> (-0.03%) ⬇️
Windows_2 55.25% <78.94%> (+0.03%) ⬆️
Windows_3 45.27% <2.63%> (-0.05%) ⬇️
Windows_4 34.68% <2.63%> (-0.03%) ⬇️

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.

Hailong-am and others added 7 commits July 3, 2024 16:35
Signed-off-by: Hailong Cui <ihailong@amazon.com>

breadcrumbs

Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
@SuZhou-Joe SuZhou-Joe merged commit 0215e32 into opensearch-project:main Jul 12, 2024
129 of 130 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch-Dashboards/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch-Dashboards/backport-2.x
# Create a new branch
git switch --create backport/backport-7166-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 0215e322d9bd6e6e41015db7770f95df89d6eb0b
# Push it to GitHub
git push --set-upstream origin backport/backport-7166-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-7166-to-2.x.

Hailong-am added a commit to Hailong-am/OpenSearch-Dashboards that referenced this pull request Jul 12, 2024
…ch-project#7166)

* Add current nav group into chrome service

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

breadcrumbs

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

* prepend nav group into breadcrumbs

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

* add unit test

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

* remove lodash import

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

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

* fix bootstrap error

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

* add nav group status check

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

* address review comments

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

* update snapshot

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>
(cherry picked from commit 0215e32)
SuZhou-Joe pushed a commit that referenced this pull request Jul 16, 2024
…7229)

* Add current nav group into chrome service

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

breadcrumbs

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

* prepend nav group into breadcrumbs

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

* add unit test

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

* remove lodash import

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

* Changeset file for PR #7166 created/updated

* fix bootstrap error

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

* add nav group status check

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

* address review comments

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

* update snapshot

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>
(cherry picked from commit 0215e32)
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