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

feat: SIP-34 explore save modal #10355

Merged
merged 12 commits into from
Jul 23, 2020
Merged

Conversation

mistercrunch
Copy link
Member

@mistercrunch mistercrunch commented Jul 17, 2020

Getting the explore save modal closer to SIP-34

RFC: SIP-34 doesn't really offer the "Create a new dashboard and add this chart into it" option and I wanted to preserve that. I did it with a checkbox + leaving the select empty, but unclear what the best way would be.

After (updated to latest commit)

Screen Shot 2020-07-22 at 2 23 15 PM

Before

Screen Shot 2020-07-16 at 10 50 24 PM

SIP-34

Screen Shot 2020-07-16 at 10 49 23 PM

@Steejay
Copy link

Steejay commented Jul 17, 2020

@mistercrunch see north star design for add chart to new dashboard

For the After image: The text field under radio buttons would benefit by adding a title so that its clear what the field is for. See SIP-34 screenshot you posted. Also I think "Save Chart" is more direct than "Save a Chart". "Save a Chart" implies unnecessary ambiguity in the statement.

Screen Shot 2020-07-17 at 7 50 44 AM

@mistercrunch
Copy link
Member Author

mistercrunch commented Jul 18, 2020

@Steejay , I decided to use the "CreatableSelect" component feature from react-select to avoid having to build the select box.
Screen Shot 2020-07-18 at 4 47 53 PM

Screen Shot 2020-07-18 at 4 51 03 PM

I also improved the e2e cypress tests quite a bit, fixed and re-enabled tests that had been disabled.

@mistercrunch mistercrunch marked this pull request as ready for review July 19, 2020 00:20
@codecov-commenter
Copy link

codecov-commenter commented Jul 19, 2020

Codecov Report

Merging #10355 into master will decrease coverage by 4.28%.
The diff coverage is 95.83%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10355      +/-   ##
==========================================
- Coverage   69.70%   65.42%   -4.29%     
==========================================
  Files         196      603     +407     
  Lines       18950    32393   +13443     
  Branches        0     3287    +3287     
==========================================
+ Hits        13210    21194    +7984     
- Misses       5740    11015    +5275     
- Partials        0      184     +184     
Flag Coverage Δ
#javascript 59.26% <95.00%> (?)
#python 69.75% <100.00%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...rset-frontend/src/explore/components/SaveModal.jsx 90.90% <95.00%> (ø)
superset/views/core.py 74.58% <100.00%> (+0.18%) ⬆️
superset/utils/pandas_postprocessing.py 76.96% <0.00%> (-12.98%) ⬇️
superset/errors.py 93.75% <0.00%> (-6.25%) ⬇️
superset/exceptions.py 95.12% <0.00%> (-4.88%) ⬇️
superset/views/sql_lab.py 58.62% <0.00%> (-3.96%) ⬇️
superset/models/sql_lab.py 91.12% <0.00%> (-1.62%) ⬇️
superset/views/base.py 72.50% <0.00%> (-0.92%) ⬇️
superset/viz.py 57.04% <0.00%> (-0.34%) ⬇️
superset/app.py 80.95% <0.00%> (-0.08%) ⬇️
... and 424 more

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 1a41ea4...32b0f52. Read the comment docs.

@rusackas
Copy link
Member

@Steejay , I decided to use the "CreatableSelect" component feature from react-select to avoid having to build the select box.
Screen Shot 2020-07-18 at 4 47 53 PM

Screen Shot 2020-07-18 at 4 51 03 PM

I also improved the e2e cypress tests quite a bit, fixed and re-enabled tests that had been disabled.

The more I look at this the more I'm agonizing over the 🔘 Save (overwrite) 🔘 Save As choice.

Could it just be:

Save as:
[SomeChartame         ]
⚠️ Warning: This will overwrite the current *SomeChartame* chart

^ Just displaying an overwrite warning, rather than forcing a choice?

@ktmud
Copy link
Member

ktmud commented Jul 21, 2020

Save as:
[SomeChartame         ]
⚠️ Warning: This will overwrite the current *SomeChartame* chart

^ Just displaying an overwrite warning, rather than forcing a choice?

I don't think this works as two charts can have the same title. Sometimes users just want to save a new copy of a chart and play with it.

I also feel CreatableSelect is not quite clear as the original radio buttons. Maybe keep it as is before we implement the SIP-34 design?

@mistercrunch
Copy link
Member Author

mistercrunch commented Jul 21, 2020

@ktmud I don't have data to back this up, but the "save AND create a new dashboard" is not super common, it's still very much possible and discoverable IMHO.

I think the previous modal looks awful and is super confusing. I'd hate to shelf this because it's not 100% SIP-34. This PR also re-enables/improves many unit tests and removes a lot of unneeded complexity.

@ktmud if the concern is the "create dashboard" is not discoverable enough, I can think of ways to improve that, like bolding the words "Create" and "Select" in the placeholder of the dashboard dropdown

@mistercrunch
Copy link
Member Author

mistercrunch commented Jul 21, 2020

Proposing two options:

  • Bolded

Screen Shot 2020-07-21 at 10 03 20 AM

  • Capitalized and bolded

Screen Shot 2020-07-21 at 10 02 44 AM

@Steejay
Copy link

Steejay commented Jul 21, 2020

I prefer option 1. All caps is a little too aggressive/dominating. Additionally, the header should read "Save Chart" not "Save A Chart". Can we add the title "Chart Name*" above the text field as well?

see comments in #10355 (comment)

@mistercrunch
Copy link
Member Author

Latest:
Screen Shot 2020-07-21 at 11 33 58 AM

@mistercrunch
Copy link
Member Author

@ktmud I'd love your blessing on this, but I think this is solid mergeable progress and a good checkpoint in the right direction

@mistercrunch
Copy link
Member Author

Latest, with the new control-label
Screen Shot 2020-07-22 at 2 23 15 PM

@ktmud
Copy link
Member

ktmud commented Jul 23, 2020

This design is definitely much cleaner than the existing layout. I'm OK with merging as is but would love to see the new iteration soon. A placeholder text still doesn't look as discoverable as the inline input in SIP-34 or the radio buttons in old design.

Another problem with current CreatableSelect is that it blocks users from creating a new dashboard with the same name as some existing dashboards.

@mistercrunch mistercrunch merged commit ea53916 into apache:master Jul 23, 2020
@rusackas
Copy link
Member

Impacts #8976

@rusackas rusackas deleted the remove-unused branch August 24, 2020 18:28
auxten pushed a commit to auxten/incubator-superset that referenced this pull request Nov 20, 2020
* feat: SIP-34 explore save modal

* using a const for the session storage key

* backend changes

* minor tweaks

* more tweaks

* radio cosmetics

* styles

* fix tests

* CreatableSelect\!

* Fix cypress & lint

* fix unit

* lint
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.38.0 labels Mar 12, 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/L 🚢 0.38.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants