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

[Datasource Editor] A few small UI changes in modal to prevent accidental edits #8471

Merged

Conversation

graceguo-supercat
Copy link

CATEGORY

Choose one

  • Bug Fix
  • Enhancement (new features, refinement)
  • Refactor
  • 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:  

Screen Shot 2019-10-29 at 3 10 57 PM

  1. 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:
image-2019-10-15-11-40-17-893

After:
Screen Shot 2019-10-25 at 4 18 11 PM

  1. 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.

  2. 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."

Screen Shot 2019-10-29 at 3 09 22 PM

TEST PLAN

CI and manual tests.

ADDITIONAL INFORMATION

  • Has associated issue:
  • 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

@codecov-io
Copy link

codecov-io commented Oct 29, 2019

Codecov Report

Merging #8471 into master will increase coverage by 0.15%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8471      +/-   ##
==========================================
+ Coverage   66.41%   66.57%   +0.15%     
==========================================
  Files         449      449              
  Lines       22567    22567              
  Branches     2367     2367              
==========================================
+ Hits        14987    15023      +36     
+ Misses       7442     7406      -36     
  Partials      138      138
Impacted Files Coverage Δ
.../explore/components/controls/DatasourceControl.jsx 68.75% <ø> (ø) ⬆️
...uperset/assets/src/datasource/DatasourceEditor.jsx 63.39% <100%> (+1.3%) ⬆️
superset/views/core.py 72.15% <0%> (+0.21%) ⬆️
superset/models/core.py 81.46% <0%> (+0.62%) ⬆️
superset/dataframe.py 94.48% <0%> (+1.57%) ⬆️
superset/db_engine_specs/mysql.py 92.15% <0%> (+49.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1adf742...93af089. Read the comment docs.

@graceguo-supercat graceguo-supercat merged commit 5fb0bcb into apache:master Oct 29, 2019
@dpgaspar dpgaspar added the v0.35 label Dec 20, 2019
villebro pushed a commit that referenced this pull request Jan 4, 2020
@graceguo-supercat graceguo-supercat deleted the gg-FixDatasourceV2 branch February 10, 2020 04:21
@mistercrunch mistercrunch added 🍒 0.35.2 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.36.0 labels Feb 28, 2024
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/M v0.35 🍒 0.35.2 🚢 0.36.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants