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 to mount other top nav menu when mounting data source menu #6229

Closed
Tracked by #5872
BionIT opened this issue Mar 20, 2024 · 2 comments · Fixed by #6268
Closed
Tracked by #5872
Assignees
Labels
enhancement New feature or request multiple datasource multiple datasource project v2.14.0

Comments

@BionIT
Copy link
Collaborator

BionIT commented Mar 20, 2024

Is your feature request related to a problem? Please describe.
In #6082, we introduced a new component which takes advantage of setMountPoint exposed by MountPointPortal to mount it to the navigation bar - big thanks to @ashwin-pc for providing the suggestions. The problem we found is in the Maps plugin, it will override the TopNavMenu if there is any since it uses the same mount point.

Describe the solution you'd like
We should keep the TopNavMenu while mount the data source menu into the navigation bar, there are 2 options:

Option 1:

Option 2:

  • use TopNavMenu as the top component for all data source components, and drawback is then it needs to expose properties that is only meaningful for data source components

Option 3:

  • mount both topNavMenu and data source menu for Maps, and topNavMenu will still render the search bars, while data source menu will render the menu buttons to be mount by topNavMenu

Describe alternatives you've considered

Additional context

Add any other context or screenshots about the feature request here.

@BionIT BionIT added the enhancement New feature or request label Mar 20, 2024
@BionIT BionIT added multiple datasource multiple datasource project v2.14.0 labels Mar 20, 2024
@ashwin-pc
Copy link
Member

ashwin-pc commented Mar 21, 2024

If they are already using the TopNavMenu component, then they can just add a new menu item to its config prop. the suggestion to use setMountPoint was for plugins that dont already use the TopNavMenu component :)

Ref: how discover does it https://github.com/ashwin-pc/OpenSearch-Dashboards/blob/16f1b35b971066c0f2f20d7bb01a2563c8da25dc/src/plugins/discover/public/application/view_components/canvas/top_nav.tsx#L85

@BionIT BionIT self-assigned this Mar 26, 2024
@BionIT BionIT removed the untriaged label Mar 26, 2024
@BionIT
Copy link
Collaborator Author

BionIT commented Mar 26, 2024

Based on discussion on 3/21/2024 with @ashwin-pc @Flyingliuhub @ZilongX @yujin-emma , we will add a boolean in TopNavMenu and a top level data source menu props in the TopNavMenu component to allow rendering data source menu together with top nav menu. This will allow Maps plugin that already uses top nav menu to mount both menu at the same navigation bar without overriding each other.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request multiple datasource multiple datasource project v2.14.0
Projects
None yet
2 participants