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

[Multiple Datasource] Allow top nav menu to mount data source menu for use case when both menus are mounted #6268

Merged
merged 5 commits into from
Mar 26, 2024

Conversation

BionIT
Copy link
Collaborator

@BionIT BionIT commented Mar 26, 2024

Description

This change allows top nav menu to mount data source menu for use case when both menus are mounted.

Issues Resolved

Fixes #6229

Screenshot

topnavmenu.mp4

Testing the changes

The following steps were performed in the recording above:

  1. enable data source plugin
  2. go to maps and click on a map page and will see save button and data source menu mounted to navigation bar

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

Signed-off-by: Lu Yu <nluyu@amazon.com>
Signed-off-by: Lu Yu <nluyu@amazon.com>
Copy link

codecov bot commented Mar 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.44%. Comparing base (74e0df3) to head (aaf7262).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6268      +/-   ##
==========================================
+ Coverage   67.42%   67.44%   +0.02%     
==========================================
  Files        3362     3362              
  Lines       65258    65261       +3     
  Branches    10524    10526       +2     
==========================================
+ Hits        43999    44017      +18     
+ Misses      18701    18688      -13     
+ Partials     2558     2556       -2     
Flag Coverage Δ
Linux_1 32.06% <ø> (ø)
Linux_2 55.57% <ø> (ø)
Linux_3 44.82% <16.66%> (-0.02%) ⬇️
Linux_4 35.04% <100.00%> (+<0.01%) ⬆️
Windows_1 32.11% <ø> (+0.02%) ⬆️
Windows_2 55.53% <ø> (ø)
Windows_3 44.83% <16.66%> (-0.01%) ⬇️
Windows_4 35.04% <100.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.

@@ -97,10 +110,12 @@ export function TopNavMenu(props: TopNavMenuProps): ReactElement | null {
}

function renderMenu(className: string): ReactElement | null {
if (!config || config.length === 0) return null;
if ((!config || config.length === 0) && (!showDataSourceMenu || !dataSourceMenuConfig))
Copy link
Member

Choose a reason for hiding this comment

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

There is typo in this file with line#124 // Validate presense of all required fields, presense should be presence

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, fixed the comment

Flyingliuhub
Flyingliuhub previously approved these changes Mar 26, 2024
Signed-off-by: Lu Yu <nluyu@amazon.com>
BionIT added 2 commits March 25, 2024 20:32
Signed-off-by: Lu Yu <nluyu@amazon.com>
Signed-off-by: Lu Yu <nluyu@amazon.com>
@BionIT BionIT merged commit e84582c into opensearch-project:main Mar 26, 2024
68 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 26, 2024
…r use case when both menus are mounted (#6268)

* allow top nav menu to mount data source menu

Signed-off-by: Lu Yu <nluyu@amazon.com>

* add change log

Signed-off-by: Lu Yu <nluyu@amazon.com>

* update snapshots

Signed-off-by: Lu Yu <nluyu@amazon.com>

* update snapshot

Signed-off-by: Lu Yu <nluyu@amazon.com>

---------

Signed-off-by: Lu Yu <nluyu@amazon.com>
(cherry picked from commit e84582c)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
BionIT pushed a commit that referenced this pull request Mar 29, 2024
…r use case when both menus are mounted (#6268) (#6273)

* allow top nav menu to mount data source menu

Signed-off-by: Lu Yu <nluyu@amazon.com>

* add change log

Signed-off-by: Lu Yu <nluyu@amazon.com>

* update snapshots

Signed-off-by: Lu Yu <nluyu@amazon.com>

* update snapshot

Signed-off-by: Lu Yu <nluyu@amazon.com>

---------

Signed-off-by: Lu Yu <nluyu@amazon.com>
(cherry picked from commit e84582c)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md

Co-authored-by: github-actions[bot] <github-actions[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.

[Multiple Datasource] Allow to mount other top nav menu when mounting data source menu
3 participants