[MD] Changing data source in data source picker should result in a modal based warning message requesting for confirmation #6196
Labels
enhancement
New feature or request
ux / ui
Improvements or additions to user experience, flows, components, UI elements
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 functiondataSourceCallBackFunc
will be called. If the user selects "Cancel", the data source picker state won't change anddataSourceCallBackFunc
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
The text was updated successfully, but these errors were encountered: