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

fix: enforce mandatory chart name on save and edit #10482

Merged
merged 4 commits into from
Jul 31, 2020

Conversation

villebro
Copy link
Member

SUMMARY

Currently it is possible to save charts without names, causing confusion in the React CRUD list view. This PR changes the following:

  • Enforce the required slice name field when editing a chart on the React CRUD view.
  • Migrate the ControlLabel to FormLabel on SaveModal.tsx and add `required props to chart and dashboard and enforce required chart name on both "Save" and "Save & Go To Dashboard".

BEFORE

chart-react-before
Jul-30-2020 13-34-30

AFTER

Jul-30-2020 13-29-02
Jul-30-2020 13-33-21

TEST PLAN

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

@Steejay
Copy link

Steejay commented Jul 30, 2020

@villebro pattern looks good.

can we switch the button order of the Edit Chart Properties modal? Move Save to the right and Cancel to the left. sim to the Save Chart arrangement.

can we also change the color of the active state for the Save button to #20A7C9? right now both active and disabled state are grey.

@villebro
Copy link
Member Author

@Steejay got it; I switched the order of the buttons. I think the colors are off in the animation, here's what they actually look like:
image

@Steejay
Copy link

Steejay commented Jul 30, 2020

@villebro great! thanks Ville.

Copy link
Member

@pkdotson pkdotson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@villebro villebro merged commit 9eab29a into apache:master Jul 31, 2020
@villebro villebro deleted the villebro/empty-chart-name branch August 1, 2020 07:17
JasonD28 pushed a commit to JasonD28/incubator-superset that referenced this pull request Aug 3, 2020
* fix: show empty charts as empty in chart list view

* migrate ControlLabel to FormLabel and enforce requred fields

* lint

* reorder buttons
auxten pushed a commit to auxten/incubator-superset that referenced this pull request Nov 20, 2020
* fix: show empty charts as empty in chart list view

* migrate ControlLabel to FormLabel and enforce requred fields

* lint

* reorder buttons
@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/S 🚢 0.38.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants