Skip to content

Stricter form submissions - #394

Open
jzgom067 wants to merge 21 commits into
v0.5.0from
stricter-form-submissions
Open

Stricter form submissions#394
jzgom067 wants to merge 21 commits into
v0.5.0from
stricter-form-submissions

Conversation

@jzgom067

Copy link
Copy Markdown
Member

This PR introduces stricter form submissions to the many "forms" we have on the site.

Submission Restriction

On each "form" (listed below), the frontend will check that all the fields are filled and that there are no errors before allowing submission.

The submit button will be disabled and have a relevant tooltip on desktop. The behavior remains the same on mobile, where it shows toasts on submission if anything is wrong.

Affected forms:

  • All auth pages (forgot password, login, register, reset password)
  • Event editor (new and edit)
  • Painting page
  • Authed password change/reset flow
  • Account deletion

Submit Disabling on Form Dialog

New props were added to allow adding tooltips and a disabled state to the submit button on form dialogs.

@jzgom067 jzgom067 added the enhancement New feature or request label Aug 13, 2026
@jzgom067 jzgom067 added this to the v0.5.0 milestone Aug 13, 2026
@jzgom067 jzgom067 added cleanup Involves refactoring or small changes frontend Related to frontend stuff labels Aug 13, 2026
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The change adds memoized form validation across authentication, account, painting, and event editor forms. Desktop submit buttons are disabled when forms are invalid and show validation tooltips. Mobile submit buttons remain enabled. FormDialog now supports submit-button disabled and tooltip props. Painting errors now use centralized error handling. Shared validation messages were added.

Mergeability Score: 🟡 Moderate · up to dd1b1

The stricter submission behavior currently has cases that can permanently block retries, enable submission despite mismatched passwords, keep corrected password forms disabled, or allow a painting name with an existing availability error to proceed on mobile. These are concrete correctness and availability issues, so the PR is not merge-ready until they are addressed.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 8

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
frontend/src/app/(event)/[event-code]/painting/page-client.tsx (1)

125-135: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use the trimmed-name rule while editing.

validateAvailabilityData treats whitespace-only input as missing, but handleNameChange checks only value === "". For " ", the handler clears errors.displayName and starts checkNameAvailability. Use !value.trim() so field validation and submit validation use the same rule.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 2507e117-2dc6-4ae7-929a-0236766e56df

📥 Commits

Reviewing files that changed from the base of the PR and between 53ec3d7 and dd1b181.

📒 Files selected for processing (12)
  • frontend/src/app/(auth)/forgot-password/page.tsx
  • frontend/src/app/(auth)/login/page.tsx
  • frontend/src/app/(auth)/register/page.tsx
  • frontend/src/app/(auth)/reset-password/page.tsx
  • frontend/src/app/(event)/[event-code]/painting/page-client.tsx
  • frontend/src/features/account/setting-dialogs/change-password/main-dialog.tsx
  • frontend/src/features/account/setting-dialogs/change-password/use-change-password.ts
  • frontend/src/features/account/setting-dialogs/delete-account.tsx
  • frontend/src/features/event/editor/editor.tsx
  • frontend/src/features/system-feedback/dialog/components/form.tsx
  • frontend/src/features/system-feedback/dialog/props.ts
  • frontend/src/lib/messages.ts

Comment thread frontend/src/app/(auth)/forgot-password/page.tsx
Comment thread frontend/src/app/(auth)/register/page.tsx
Comment thread frontend/src/app/(event)/[event-code]/painting/page-client.tsx
Comment thread frontend/src/app/(event)/[event-code]/painting/page-client.tsx
Comment thread frontend/src/features/event/editor/editor.tsx Outdated
Comment thread frontend/src/features/system-feedback/dialog/components/form.tsx
@jzgom067
jzgom067 requested a review from mirmirmirr August 13, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup Involves refactoring or small changes enhancement New feature or request frontend Related to frontend stuff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants