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]feat: make parent item unclickable and fix duplicate items in landing page. #7619

Merged
merged 13 commits into from
Aug 9, 2024

Conversation

SuZhou-Joe
Copy link
Member

@SuZhou-Joe SuZhou-Joe commented Aug 5, 2024

Description

This PR mainly address 3 issues related to new left navigation.

  • Make parent item unclickable in left nav.
  • Hide parent item in landing page.
  • Filter out hidden nav group when detecting if current application belongs to only one nav group.

Issues Resolved

Screenshot

Make parent item unclickable

image

Only show parent item in landing page and jump to first sub items.

20240807161147146.mp4

Filter out hidden nav group when doing nav group detection (Before fix).

20240807162518193.mp4

Filter out hidden nav group when doing nav group detection (After fix).

20240807162702215.mp4

Testing the changes

Changelog

  • feat: make parent item unclickable and fix duplicate items in landing 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

Copy link

codecov bot commented Aug 5, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 4 lines in your changes missing coverage. Please review.

Project coverage is 63.68%. Comparing base (ef47b5f) to head (4538674).
Report is 10 commits behind head on main.

Files Patch % Lines
src/core/public/chrome/utils.ts 82.35% 0 Missing and 3 partials ⚠️
src/plugins/workspace/public/plugin.ts 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7619   +/-   ##
=======================================
  Coverage   63.68%   63.68%           
=======================================
  Files        3633     3633           
  Lines       80106    80118   +12     
  Branches    12693    12694    +1     
=======================================
+ Hits        51012    51026   +14     
+ Misses      25986    25984    -2     
  Partials     3108     3108           
Flag Coverage Δ
Linux_1 30.59% <5.55%> (-0.01%) ⬇️
Linux_2 55.62% <91.42%> (+0.03%) ⬆️
Linux_3 40.55% <5.71%> (-0.01%) ⬇️
Linux_4 31.30% <5.71%> (-0.01%) ⬇️
Windows_1 30.61% <5.55%> (-0.01%) ⬇️
Windows_2 55.57% <91.42%> (+0.03%) ⬆️
Windows_3 40.56% <5.71%> (-0.01%) ⬇️
Windows_4 31.30% <5.71%> (-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 <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
@SuZhou-Joe SuZhou-Joe added the bug Something isn't working label Aug 7, 2024
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
@SuZhou-Joe SuZhou-Joe merged commit 389fd28 into opensearch-project:main Aug 9, 2024
66 of 67 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 9, 2024
…s in landing page. (#7619)

* feat: make parent item unclickable

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* Changeset file for PR #7619 created/updated

* feat: do not show parent item in landing page

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* fix: unit test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* temp: save

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: update

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: update

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: update

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: optimize code

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* fix: nav group not reflected when switching to analytics workspace

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: optimize code

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: optimize code based on comment

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: optimize code based on comment

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

---------

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit 389fd28)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
SuZhou-Joe pushed a commit that referenced this pull request Aug 12, 2024
…s in landing page. (#7619) (#7670)

* feat: make parent item unclickable



* Changeset file for PR #7619 created/updated

* feat: do not show parent item in landing page



* fix: unit test



* temp: save



* feat: update



* feat: update



* feat: update



* feat: optimize code



* fix: nav group not reflected when switching to analytics workspace



* feat: optimize code



* feat: optimize code based on comment



* feat: optimize code based on comment



---------



(cherry picked from commit 389fd28)

Signed-off-by: SuZhou-Joe <suzhou@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>
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