Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: only allow submitting form if changes have been made#14602

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

DanielleMaywood
Copy link
Contributor

Fixes#14320

This disables the submit button if the form is not dirty, meaning the button can only be enabled if the form has had changes to it.

Screen.Recording.2024-09-09.at.09.38.04.mp4

@DanielleMaywoodDanielleMaywood changed the titlefix: only allow submitting form if dirtyfix: only allow submitting form if changes have been madeSep 9, 2024
@DanielleMaywoodDanielleMaywood marked this pull request as ready for reviewSeptember 9, 2024 09:13
@dannykopping
Copy link
Contributor

dannykopping commentedSep 9, 2024
edited
Loading

I'm not sure this solution will be very clear for users.

IMHO we'd probably want to change thebehaviour of the button, not whether it's enabled or not:

  • no changes:noop behaviour, and indicate as such in the button text
  • with changes: change the color/text to indicate that a restart will happen with the new settings

WDYT@stirby?

@DanielleMaywood
Copy link
ContributorAuthor

  • no changes:noop behaviour, and indicate as such in the button text

I'm not sure I understand the reasoning for having a 'submit' button that we know (and communicate) to do nothing.

  • with changes: change the color/text to indicate that a restart will happen with the new settings

I think this might be overlapping with a separate issue#14319

@dannykopping
Copy link
Contributor

I'm not sure I understand the reasoning for having a 'submit' button that we know (and communicate) to do nothing.

Agreed. I'm motivating for a change to the naming of the button as well.

@DanielleMaywood
Copy link
ContributorAuthor

Agreed. I'm motivating for a change to the naming of the button as well.

Okay. And just for confirmation: You'd want the button to be submittable but act as a no-op?

@dannykopping
Copy link
Contributor

Yup. I'm no UX designer but that would at least be the most obvious to the user IMHO.

If I saw a button that said "Submit without changes", I'd know exactly what that meant.

If I made changes and the button turned orange and said "Restart with changes" with a little notice that said that the workspace would be restarted and any non-persistent data would be destroyed, there would similarly be no possibility for confusion, I feel.

@DanielleMaywood
Copy link
ContributorAuthor

DanielleMaywood commentedSep 9, 2024
edited
Loading

If I saw a button that said "Submit without changes", I'd know exactly what that meant.

I can only speak for myself but I'd expect the behaviour of this to dosomething. In this scenario, would the "Cancel" button and the "Submit without change" button have any difference in behaviour?

If I made changes and the button turned orange and said "Restart with changes" with a little notice that said that the workspace would be restarted and any non-persistent data would be destroyed, there would similarly be no possibility for confusion, I feel.

I think this is more related to the other issue#14319 (I agree it should be more obvious but I think that's out of scope for this issue)

@DanielleMaywood
Copy link
ContributorAuthor

@BrunoQuaresma Do you have any opinions on what the design should be here?

@BrunoQuaresma
Copy link
Collaborator

@DanielleMaywood disabling the button when there are no changes is a broad use pattern and I also agree we could rename the button to make what will happen clearer. Maybe we could change to "Submit and restart" or "Apply and restart"?

DanielleMaywood reacted with thumbs up emoji

@@ -73,3 +73,58 @@ test("Submit the workspace settings page successfully", async () => {
});
});
});

test("Submit button is only enabled when changes are made", async () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think for now, having a test for this in Jest is ok, but in the future, you can try to usestorybook and interaction tests :)

DanielleMaywood reacted with thumbs up emoji
Copy link
Collaborator

@BrunoQuaresmaBrunoQuaresma left a comment

Choose a reason for hiding this comment

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

I will leave up to you to decide to change or not the button label

@DanielleMaywoodDanielleMaywoodforce-pushed thedm-disable-submit-button-for-workspace-params-when-no-changes branch from0d4b625 to230de7fCompareSeptember 13, 2024 14:40
@DanielleMaywoodDanielleMaywood merged commit9006b21 intomainSep 13, 2024
25 of 27 checks passed
@DanielleMaywoodDanielleMaywood deleted the dm-disable-submit-button-for-workspace-params-when-no-changes branchSeptember 13, 2024 15:19
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsSep 13, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@BrunoQuaresmaBrunoQuaresmaBrunoQuaresma approved these changes

Assignees

@DanielleMaywoodDanielleMaywood

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Disable submit button for editing workspace parameters when no changes are made
3 participants
@DanielleMaywood@dannykopping@BrunoQuaresma

[8]ページ先頭

©2009-2025 Movatter.jp