Skip to content

fix(webui): reset the review dialog when it reopens - #2503

Open
trivikr wants to merge 1 commit into
eclipse-openvsx:mainfrom
trivikr:webui-reset-review-dialog-on-reopen
Open

trivikr wants to merge 1 commit into
eclipse-openvsx:mainfrom
trivikr:webui-reset-review-dialog-on-reopen

Conversation

@trivikr

@trivikr trivikr commented Dec 5, 2026

Copy link
Copy Markdown
Contributor

After Cancel, the review dialog reopened with an empty comment field and one star, but kept the cancelled comment, rating and length error in state. Post Review then sent text and a rating the user could not see.

  • handleOpenButton resets rating, comment and commentError so they match the fields MUI remounts on open.
  • A too-long comment no longer leaves its error, and a disabled Post button, on the empty field after reopening.
  • The setComment('') in onSuccess is dropped, since opening now resets the comment.

The dialog unmounts its fields on close, so after Cancel it reopened
with an empty comment and one star while the component state kept the
old comment, rating and length error. Post Review then sent text and a
rating the user could not see. Reset that state on open so it matches
the fields.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant