Page MenuHomePhabricator

Error or success message from "Add an edit to this event" dialog should not persist
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • On the Contribution tab, click the Add edit to this event
  • Enter a value
  • Click "Add edit"
  • Click "Cancel" in the same dialog OR click the close button in the top right OR press esc on the keyboard
  • Click the "Add edit to this event" button again

What happens?:
The same ID and error or success message persists, even after closing the dialog

What should have happened instead?:
When reopening the dialog, the previously entered id and its associated error/success message should be cleared.

Other information (browser name/version, screenshots, etc.):

Screen Recording 2025-12-22 at 4.40.46 PM.gif (1×1 px, 1 MB)

Event Timeline

I have tested this, but note that it is not only the error/success message that persists, but also the ID in the input field. I don't think we should clear the message alone without also clearing the field. So, maybe we should clear both the message and the field when the dialog is closed, regardless of whether submission was attempted?

Or in other words: I'm not sure if the current behaviour qualifies as a bug, because you can see the state (success/failure) of the last submission you attempted, including what was the ID you tried to add. Clearing everything upon close probably makes sense, but I'd be inclined towards considering it a UX change.

ifried subscribed.

@Daimona, I agree! We should clear both the message and the field when the dialog is closed. I can update the AC.

Daimona updated the task description. (Show Details)

Change #1251581 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/extensions/CampaignEvents@master] AddContributionDialog: clear revision and message when closing

https://gerrit.wikimedia.org/r/1251581

Change #1251581 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] AddContributionDialog: clear revision and message when closing

https://gerrit.wikimedia.org/r/1251581

All tests passed:

✅ Test done adding id 999 them close the model, then reopen and confirm input/message are cleared (Cancel)
✅ Test done adding id 999 them close the model, then reopen and confirm input/message are cleared (Close button)
✅ Test done adding id 999 them close the model, then reopen and confirm input/message are cleared (Esc)

This is now working as expected.