graceguo-supercat opened a new pull request #8471: [Datasource Editor] A few small UI changes in modal to prevent accidental edits URL: https://github.com/apache/incubator-superset/pull/8471 ### CATEGORY Choose one - [ ] Bug Fix - [X] Enhancement (new features, refinement) - [ ] Refactor - [x] Add tests - [ ] Build / Development Environment - [ ] Documentation ### SUMMARY In airbnb there are a few users reported that they accidentally edit datasources, but their original ideal is just change datasource. But it caused other charts that used the datasource became invalid. 1. Don't open the Datasource Editor modal on clicking the data source name. Several people have accidentally edited the datasource when they really mean to change (swap) datasources. Now will show change datasources modal: <img width="463" alt="Screen Shot 2019-10-29 at 3 10 57 PM" src="https://user-images.githubusercontent.com/27990562/67813255-56b3bb00-fa5e-11e9-9ae8-0aef6390ad32.png"> 2. Change the order of options in the drop-down menu so that "Change datasource" is the first option (instead of Edit Datasource). Similar reasoning to the above; we want to prioritize Change Datasource over Edit Datasource. **Before:**  **After:** <img width="439" alt="Screen Shot 2019-10-25 at 4 18 11 PM" src="https://user-images.githubusercontent.com/27990562/67609958-6a041500-f744-11e9-97eb-82d85f5ac9cc.png"> 3. Land the user on the Metrics tab when they get to the Edit Datasource modal (instead of Settings). Adding Metrics is likely the most common reason people would want to edit the datasource from the Explore view. It makes it easier for people to do the most frequent action, and moves people away from the Settings which is the most risky and the least frequent use case. 4. Add a warning to the Settings tab (that is always there) that communicates that changes to this could break all charts, not just your own, so be careful. e.g. "Be careful. Changes to these settings can break all charts, including charts owned by other people." <img width="903" alt="Screen Shot 2019-10-29 at 3 09 22 PM" src="https://user-images.githubusercontent.com/27990562/67813177-1c4a1e00-fa5e-11e9-95fb-c27e3eddc5ff.png"> ### TEST PLAN CI and manual tests. ### ADDITIONAL INFORMATION <!--- Check any relevant boxes with "x" --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> - [ ] Has associated issue: - [x] Changes UI - [ ] Requires DB Migration. - [ ] Confirm DB Migration upgrade and downgrade tested. - [ ] Introduces new feature or API - [ ] Removes existing feature or API ### REVIEWERS @michellethomas @etr2460 @mistercrunch
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
