feat(explore-popover): Show disabled 'Save' button in explore popover
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:

After:

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
Codecov Report
Merging #21318 (02b2668) into master (4cf40fb) will increase coverage by
1.50%. The diff coverage is66.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
/testenv up
@geido Ephemeral environment spinning up at http://54.202.131.27:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.
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.

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
/testenv up
@geido Ephemeral environment spinning up at http://35.93.39.51:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.
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.

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