superset icon indicating copy to clipboard operation
superset copied to clipboard

feat(explore-popover): Show disabled 'Save' button in explore popover

Open agl-developer opened this issue 3 years ago • 4 comments

SUMMARY

In the popover that we show in control panel, if there are no changes made we turn it into secondary button and user is still able to "save" the popover.

If there are no changes made in the popover use primary button in state "disabled"

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before: Clipboard 2022-28-07 at 4 18 57 PM

After: image

TESTING INSTRUCTIONS

  • Click on 'Charts' in the top menu bar
  • Select on option which shows a Popover

ADDITIONAL INFORMATION

  • [ ] Has associated issue:
  • [ ] Required feature flags:
  • [ ] Changes UI
  • [ ] Includes DB Migration (follow approval process in SIP-59)
    • [ ] Migration is atomic, supports rollback & is backwards-compatible
    • [ ] Confirm DB migration upgrade and downgrade tested
    • [ ] Runtime estimates and downtime expectations provided
  • [ ] Introduces new feature or API
  • [ ] Removes existing feature or API

agl-developer avatar Sep 03 '22 02:09 agl-developer

Codecov Report

Merging #21318 (02b2668) into master (4cf40fb) will increase coverage by 1.50%. The diff coverage is 66.66%.

:exclamation: Current head 02b2668 differs from pull request most recent head 2962bde. Consider uploading reports for the commit 2962bde to get more accurate results

@@            Coverage Diff             @@
##           master   #21318      +/-   ##
==========================================
+ Coverage   65.38%   66.88%   +1.50%     
==========================================
  Files        1847     1805      -42     
  Lines       70561    69034    -1527     
  Branches     7737     7368     -369     
==========================================
+ Hits        46137    46175      +38     
+ Misses      22417    20953    -1464     
+ Partials     2007     1906     -101     
Flag Coverage Δ
javascript 53.29% <66.66%> (-0.52%) :arrow_down:

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

Impacted Files Coverage Δ
...ols/DndColumnSelectControl/ColumnSelectPopover.tsx 3.37% <0.00%> (ø)
...ols/FilterControl/AdhocFilterEditPopover/index.jsx 70.21% <100.00%> (-0.63%) :arrow_down:
...ols/MetricControl/AdhocMetricEditPopover/index.jsx 76.59% <100.00%> (+1.06%) :arrow_up:
...trols/DateFilterControl/components/CommonFrame.tsx 0.00% <0.00%> (-57.15%) :arrow_down:
superset-frontend/src/utils/getDatasourceUid.ts 50.00% <0.00%> (-50.00%) :arrow_down:
...s/CRUD/data/dataset/AddDataset/LeftPanel/index.tsx 47.61% <0.00%> (-39.71%) :arrow_down:
...ontrols/DateFilterControl/utils/dateFilterUtils.ts 39.39% <0.00%> (-30.06%) :arrow_down:
...nts/controls/DateFilterControl/DateFilterLabel.tsx 35.71% <0.00%> (-19.61%) :arrow_down:
...-frontend/src/explore/reducers/saveModalReducer.js 30.00% <0.00%> (-15.46%) :arrow_down:
...t-frontend/src/dashboard/actions/dashboardState.js 37.05% <0.00%> (-15.40%) :arrow_down:
... and 448 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar Sep 03 '22 03:09 codecov[bot]

/testenv up

geido avatar Sep 08 '22 11:09 geido

@geido Ephemeral environment spinning up at http://54.202.131.27:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

github-actions[bot] avatar Sep 08 '22 14:09 github-actions[bot]

Hello @agl-developer a few things.

In other controls when the form is ready to be saved the buttons looks like the one in the screenshot. I think we shouldn't introduce inconsistencies unless we are going to change the behaviour for every control. Personally, I think what's shown in the screenshot is a clearer CTA.

Screenshot 2022-09-12 at 14 10 46

One more thing, when editing the SQL the control correctly allows me to save. However, if I revert the changes to the SQL statement to its original state before saving, it will still allow me to save even though there was no actual change compared to the previous state

geido avatar Sep 12 '22 11:09 geido

/testenv up

geido avatar Oct 10 '22 14:10 geido

@geido Ephemeral environment spinning up at http://35.93.39.51:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

github-actions[bot] avatar Oct 10 '22 15:10 github-actions[bot]

On top of the comments above to which I am still looking for an answer, I think there is another problem. When adding a new control the button shows enabled even though I haven't filled any of the required fields.

Screenshot 2022-10-20 at 16 30 20

geido avatar Oct 20 '22 13:10 geido

/testenv up

geido avatar Dec 07 '22 17:12 geido

@geido Ephemeral environment spinning up at http://54.245.47.220:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

github-actions[bot] avatar Dec 07 '22 17:12 github-actions[bot]

Ephemeral environment shutdown and build artifacts deleted.

github-actions[bot] avatar Dec 07 '22 17:12 github-actions[bot]