Skip to content

fix(tags): clear draft on cancel - #46586

Open
dmunozv04 wants to merge 1 commit into
apache:masterfrom
dmunozv04:fix-tag-cancel-reset
Open

dmunozv04 wants to merge 1 commit into
apache:masterfrom
dmunozv04:fix-tag-cancel-reset

Conversation

@dmunozv04

Copy link
Copy Markdown
Contributor

SUMMARY

Canceling the Create Tag modal left the form data filled. Reopening the modal could carry those chart assignments into the next tag.

This PR reuses the same clear-on-hide handler that was present on the top X button.
It also adds a regression test that enters a name, selects a chart, cancels, and verifies that both fields are empty after reopening. Since it was missing, the test also covers clicking the X and Save buttons.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

BEFORE: pressing cancel does not clear the modal fields

before.mp4

AFTER: pressing cancel clears the modal fields, just like when clicking the X

after.mp4

TESTING INSTRUCTIONS

  1. Go to settings -> Tags and create a new Tag
  2. Fill in any of the values
  3. Click the Cancel button
  4. Create a new tag and confirm that the previously filled values are now 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

I found this issue while testing #46569

@codeant-ai-for-open-source

codeant-ai-for-open-source Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

CodeAnt  CodeAnt PR Risk

🟢  Low Risk

  • The PR appears safe to merge; no actionable issues were identified in the review.

Assessed commit: d1ad7cc296f4

@codecov

codecov Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.43%. Comparing base (a6662b6) to head (d1ad7cc).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #46586      +/-   ##
==========================================
+ Coverage   86.42%   86.43%   +0.01%     
==========================================
  Files        3183     3183              
  Lines      222606   222606              
  Branches    52996    52996              
==========================================
+ Hits       192378   192411      +33     
+ Misses      26758    26725      -33     
  Partials     3470     3470              
Flag Coverage Δ
javascript 83.44% <100.00%> (+0.03%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rusackas
rusackas self-requested a review November 28, 2026 00:01
@dmunozv04
dmunozv04 force-pushed the fix-tag-cancel-reset branch from 770a84c to d1ad7cc Compare November 28, 2026 10:33

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant