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

Improve final-form submit-button and submission-error consistency #4222

Merged
merged 2 commits into from Oct 22, 2023

Conversation

eikhr
Copy link
Member

@eikhr eikhr commented Oct 21, 2023

Note: this PR builds on #4220 because I created the <SubmitButton>-component there, only 59a86e1 is relevant.

The <SubmitButton>-component just reduces some boilerplate, with the bonus that it enforces consistency in submit-buttons.

<SubmissionError> shows any errors that arise when submitting the form, meaning that the forms that were missing this would simply not show the error message.

I also did a bit of refactoring in CompanySemesterGUI because the previous structure made no sense.

Result

Some forms had green or grey submit-buttons, now they are all black.

The login-form had a custom error-component which was simply red text, it now uses <SubmissionError>:

Before After
Screenshot 2023-10-21 at 14 20 38 Screenshot 2023-10-21 at 14 19 42

Testing

  • I have thoroughly tested my changes.

Please describe what and how the changes have been tested, and provide instructions to reproduce if necessary.


Resolves ... (either GitHub issue or Linear task)

@eikhr eikhr added enhancement Pull requests that make enhancements, instead of just purely new features small-fix Pull requests that fix something small technical-debt Pull requests that reduces technical debt labels Oct 21, 2023
@github-actions github-actions bot added the review-needed Pull requests that need review label Oct 21, 2023
Copy link
Member

@norbye norbye left a comment

Choose a reason for hiding this comment

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

beautiful stuff

Copy link
Member

@danielyanghansen danielyanghansen left a comment

Choose a reason for hiding this comment

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

Looks good

@eikhr eikhr merged commit 41c6f26 into master Oct 22, 2023
4 checks passed
@eikhr eikhr deleted the use-submit-button-in-forms branch October 22, 2023 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Pull requests that make enhancements, instead of just purely new features review-needed Pull requests that need review small-fix Pull requests that fix something small technical-debt Pull requests that reduces technical debt
Projects
None yet
3 participants