Skip to content

🎨 Palette: Add form wrappers for native keyboard submission#633

Open
seonghobae wants to merge 1 commit into
mainfrom
palette-ux-keyboard-submission-12322545082347105342
Open

🎨 Palette: Add form wrappers for native keyboard submission#633
seonghobae wants to merge 1 commit into
mainfrom
palette-ux-keyboard-submission-12322545082347105342

Conversation

@seonghobae

Copy link
Copy Markdown
Collaborator

💡 What: Changed standard div wrappers to semantic <form> wrappers around 'New Project', 'New Connection', and 'Inline Project Create' field groups in App.tsx. Changed their primary submission button types from button to submit.
🎯 Why: To natively allow users to press 'Enter' from within text inputs to trigger the creation/save flows, rather than forcing them to manually click the submit button. This resolves a significant keyboard accessibility frustration point.
♿ Accessibility: Enables native, standard implicit form submission flow (keyboard Enter) where it was previously missing.


PR created automatically by Jules for task 12322545082347105342 started by @seonghobae

🎨 Palette: [UX improvement] Add form wrappers for native keyboard submission

💡 What: I changed standard `div` wrappers to semantic `<form>` wrappers around 'New Project', 'New Connection', and 'Inline Project Create' field groups in `App.tsx`. I also changed their primary button types from `button` to trigger form submissions.
🎯 Why: To natively allow users to press 'Enter' from within text inputs to trigger the creation/save flows, rather than forcing them to manually click the confirmation button. This resolves a significant keyboard accessibility frustration point.
♿ Accessibility: Enables native, standard implicit form submission flow (keyboard Enter) where it was previously missing.
@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Copilot AI review requested due to automatic review settings July 24, 2026 02:12

Copilot AI 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.

Pull request overview

This PR improves keyboard accessibility across key creation flows in the frontend by switching input/action wrappers from non-semantic containers to semantic <form> elements, enabling native Enter-to-submit behavior without requiring mouse clicks.

Changes:

  • Wrap “New project”, “New connection (DSN)”, and inline project creation UI groups in <form> elements with onSubmit handlers.
  • Change primary action buttons in those groups from type="button" to type="submit".
  • Document the “prefer forms for native submission” guideline in .Jules/palette.md.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
frontend/src/App.tsx Convert key create/save input groups into forms to support native keyboard submission.
.Jules/palette.md Add a palette learning entry describing the form-wrapper pattern for Enter-to-submit.
Comments suppressed due to low confidence (1)

frontend/src/App.tsx:1327

  • Same as the editor 'New project' form: this onSubmit handler duplicates trimming/guard logic that already exists inside onCreateProject(). Prefer delegating to onCreateProject() to avoid future drift between the UI guard and the actual creation logic.
                onSubmit={(e) => {
                  e.preventDefault();
                  if (projectName.trim() && !isCreatingProject) {
                    onCreateProject();
                  }

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread frontend/src/App.tsx
Comment on lines +1080 to +1085
onSubmit={(e) => {
e.preventDefault();
if (projectName.trim() && !isCreatingProject) {
onCreateProject();
}
}}
Comment thread frontend/src/App.tsx
Comment on lines +1133 to +1138
onSubmit={(e) => {
e.preventDefault();
if (selectedProjectId && connName.trim() && isDsnPresent && !isCreatingConnection) {
onCreateConnection();
}
}}
Comment thread frontend/src/App.tsx
Comment on lines +1078 to +1082
<form
className="row"
onSubmit={(e) => {
e.preventDefault();
if (projectName.trim() && !isCreatingProject) {
Comment thread .Jules/palette.md
**Learning:** Modals designed with plain `<div>` elements as wrappers instead of `<form>` lack native keyboard submission support, forcing users to switch from keyboard to mouse to confirm actions like "Save".
**Action:** When designing modals or popups containing inputs, always use a `<form>` element to wrap the content, handle the `onSubmit` event (calling `e.preventDefault()`), and set the primary confirmation button to `type="submit"` to enable seamless Enter-key submission for keyboard users.

## $(date +%Y-%m-%d) - Native Keyboard Submission Support
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.

2 participants