#183

Cmd+enter hotkey for every

Opengregor-tokarevwants to merge intofrom

Summary

Added hotkey submission for every form in web app

Changes

  • markdown-editor.tsx
  • every place where it's used and can be submitted

Test Plan

  • go to issue(for example) write reply and hit cmd+enter while been focused in textarea

Summary by CodeRabbit

Release Notes

  • New Features
    • Added keyboard shortcut support (Ctrl/Cmd+Enter) to submit forms, comments, replies, and reviews across the dashboard for faster submission without clicking the submit button
    • Enhanced visual feedback with improved cursor styling on interactive elements to clearly indicate clickability

Activity

6
coderabbitai[bot]6mo ago

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: eb321216-edbb-4646-9a9e-d1795bcd8363

📥 Commits

Reviewing files that changed from the base of the PR and between 94ca24080d10dd2e59513db729b3a5135410e51d and 2f54a0a116157e867ee42731a4be38d0f7517ece.

📒 Files selected for processing (10)
  • apps/dashboard/src/components/compare/compare-form.tsx
  • apps/dashboard/src/components/details/comment-reply-form.tsx
  • apps/dashboard/src/components/details/detail-activity.tsx
  • apps/dashboard/src/components/issues/new/new-issue-page.tsx
  • apps/dashboard/src/components/pulls/detail/pull-body-section.tsx
  • apps/dashboard/src/components/pulls/detail/pull-detail-activity.tsx
  • apps/dashboard/src/components/pulls/review/review-file-diff-block.tsx
  • apps/dashboard/src/components/pulls/review/review-submit-popover.tsx
  • packages/ui/src/components/markdown-editor.tsx
  • packages/ui/src/styles/globals.css

📝 Walkthrough

Walkthrough

This PR adds keyboard shortcut support across the dashboard by introducing a new onModEnter callback prop to the MarkdownEditor component and adding Mod+Enter (Ctrl+Enter or Cmd+Enter) handlers to form inputs and editors in nine components. Global CSS styling updates cursor appearance for interactive elements.

Changes

Cohort / File(s)Summary
MarkdownEditor Enhancement
packages/ui/src/components/markdown-editor.tsx
Added onModEnter optional callback prop that triggers when user presses Ctrl/Cmd+Enter, preventing default behavior and stopping propagation.
Content Creation & Editing
apps/dashboard/src/components/compare/compare-form.tsx, apps/dashboard/src/components/issues/new/new-issue-page.tsx, apps/dashboard/src/components/pulls/detail/pull-body-section.tsx
Wired Mod+Enter keyboard shortcuts to title inputs and markdown editors for quick form submission and saving; each includes guards against invalid states (empty input, in-progress operations).
Comment & Reply Submissions
apps/dashboard/src/components/details/comment-reply-form.tsx, apps/dashboard/src/components/details/detail-activity.tsx, apps/dashboard/src/components/pulls/review/review-file-diff-block.tsx, apps/dashboard/src/components/pulls/review/review-submit-popover.tsx
Added Mod+Enter handlers to comment and reply markdown editors with validation guards (non-empty input, no pending uploads, no in-flight requests) to submit comments without using the button.
Pull Request Flows
apps/dashboard/src/components/pulls/detail/pull-detail-activity.tsx
Integrated Mod+Enter support for both merge commit form (title and description inputs) and review reply editor, with appropriate state guards for each operation.
Global Styling
packages/ui/src/styles/globals.css
Added comprehensive CSS rules setting cursor: pointer on interactive elements (buttons, links, inputs, labels, ARIA roles) and cursor: not-allowed on disabled states.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check nameStatusExplanationResolution
Title check⚠️ WarningThe title 'Cmd+enter hotkey for every' is incomplete, vague, and fails to clearly summarize the main change—it cuts off mid-sentence and doesn't explain what feature is being added.Complete the title with a clear, concise summary such as 'Add Cmd+Enter hotkey submission for all forms' to properly convey the changeset's primary purpose.
Docstring Coverage⚠️ WarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check nameStatusExplanation
Description check✅ PassedThe description covers the summary and provides a basic test plan, but it lacks detailed explanation of changes and is missing the required Screenshots section from the template.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

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

stylessh6mo ago

hey, you have changes from https://github.com/stylessh/diffkit/pull/181 in this pr. can you remove them?

gregor-tokarev6mo ago

done