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

[MD] Changing data source in data source picker should result in a modal based warning message requesting for confirmation #6196

Open
RamakrishnaChilaka opened this issue Mar 19, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@RamakrishnaChilaka
Copy link

Is your feature request related to a problem? Please describe.
In #6035, Lu has implemented a data source picker. To summarise, the data source picker sits in the top right position of the page, i.e., in the nav bar, user will select a data source based on the requirement. In create workflows, user will interact by entering data and also have the option to change the data source. Based on the proposed requirement, we need to show a warning modal asking the user if he is sure to change the data source.

Describe the solution you'd like

Data source picker will expose showModalOnDataSourceChange prop, of boolean type. This shall control if we will show a warning modal in case of data source changes. In the warning modal, If the user selects "Switch data source" (affirmative button), the function dataSourceCallBackFunc will be called. If the user selects "Cancel", the data source picker state won't change and dataSourceCallBackFunc won't be invoked.

Describe alternatives you've considered
Instead of Opensearch core implementing the modal, Plugins will show the warning modal based on the datasourceid changes from the data source picker. The drawback is the repetitive code changes across different plugins.

Additional context
#6035
#6082

@RamakrishnaChilaka RamakrishnaChilaka added the enhancement New feature or request label Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants