Skip to content

Add autofocus attribute to submit button (mark as seen)#1726

Merged
IgnisDa merged 2 commits intoIgnisDa:mainfrom
dimon222:patch-1
Mar 21, 2026
Merged

Add autofocus attribute to submit button (mark as seen)#1726
IgnisDa merged 2 commits intoIgnisDa:mainfrom
dimon222:patch-1

Conversation

@dimon222
Copy link
Copy Markdown
Contributor

@dimon222 dimon222 commented Mar 20, 2026

In "mark as seen" modal focus is not explicitly defined, and because of that the browser picks the first focusable element as default. From user standpoint it looks like if first element is dropdown (it usually is a season), it immediately opens. Very annoying considering mark as seen for TV shows almost always implies the currently selected episode not the different season's episode.

This fixes it by shifting focus explicitly to submit button.

Before:
image

After:
image

Summary by CodeRabbit

  • Style
    • Progress update form submit button now receives autofocus when the form loads, improving keyboard navigation and reducing the number of interactions required to submit updates. This enhances accessibility and speeds up the workflow for users who rely on keyboard input or assistive technologies.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3267a492-4e53-4bb1-877c-9a2a92f59bc6

📥 Commits

Reviewing files that changed from the base of the PR and between 2ea39a4 and f6ad7ce.

📒 Files selected for processing (1)
  • apps/frontend/app/components/routes/dashboard/forms/metadata-progress-update/new-progress-form.tsx

Walkthrough

A submit button in the metadata progress update form component now includes the data-autofocus attribute. No logic, control flow, validation, or mutation handling was modified.

Changes

Cohort / File(s) Summary
Submit Button Enhancement
apps/frontend/app/components/routes/dashboard/forms/metadata-progress-update/new-progress-form.tsx
Added data-autofocus attribute to the submit button element.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding the autofocus attribute to a submit button in the progress update form, which directly addresses the stated objective of preventing unwanted dropdown focus behavior.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

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 and usage tips.

Tip

CodeRabbit can use TruffleHog to scan for secrets in your code with verification capabilities.

Add a TruffleHog config file (e.g. trufflehog-config.yml, trufflehog.yml) to your project to customize detectors and scanning behavior. The tool runs only when a config file is present.

@IgnisDa
Copy link
Copy Markdown
Owner

IgnisDa commented Mar 20, 2026

Could you move the line you added one line up 😅?

image

@dimon222
Copy link
Copy Markdown
Contributor Author

Haha. Done.

@IgnisDa
Copy link
Copy Markdown
Owner

IgnisDa commented Mar 20, 2026

Thanks! I will merge and release it this weekend!

@IgnisDa IgnisDa merged commit 5eb0667 into IgnisDa:main Mar 21, 2026
10 checks passed
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