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(tag): update state to clear form on success #25934

Merged
merged 2 commits into from
Nov 15, 2023

Conversation

hughhhh
Copy link
Member

@hughhhh hughhhh commented Nov 9, 2023

SUMMARY

Currently the state in the tags form isn't being cleared. So the values from a previous entry are staying whenever a user wants to create a new tag. To fix this I refactored the component to have a clearForm function that will clear the state in the component whenever called.

Screen.Recording.2023-11-09.at.10.06.06.AM.mov

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

  1. Goto Tags Page
  2. Create a new tag (enter name + description)
  3. Click Save
  4. Click + Tag form should be empty

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

Copy link
Member

@john-bodley john-bodley left a comment

Choose a reason for hiding this comment

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

@hughhhh would you mind adding some testing instructions and unit tests (if possible). I've also added @justinpark as a reviewer as it seems unclear why we need to clear the form, i.e., this seems like an atypical pattern.

@hughhhh
Copy link
Member Author

hughhhh commented Nov 13, 2023

@hughhhh would you mind adding some testing instructions and unit tests (if possible). I've also added @justinpark as a reviewer as it seems unclear why we need to clear the form, i.e., this seems like an atypical pattern.

Added test instructions, but the problem is when users are creating a Tag and save the form. The values are kept on the next instantiation of the modal, when they should it should be cleared for new data.

@john-bodley
Copy link
Member

@justinpark would you mind reviewing this as I'm somewhat naive when it comes to frontend.

@hughhhh hughhhh merged commit aee94b3 into apache:master Nov 15, 2023
28 checks passed
@hughhhh hughhhh deleted the tags-clear-form branch November 15, 2023 23:05
josedev-union pushed a commit to Ortege-xyz/studio that referenced this pull request Jan 22, 2024
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.1.0 labels Mar 8, 2024
sfirke pushed a commit to sfirke/superset that referenced this pull request Mar 22, 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 🚢 3.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants