Skip to content

Fix pending question form keyboard focus spacing - #5106

Merged
ymichael merged 2 commits into
mainfrom
bb/soften-the-question-form-focus-outline-thr_ezjejbrqpb
Oct 7, 2026
Merged

ymichael merged 2 commits into
mainfrom
bb/soften-the-question-form-focus-outline-thr_ezjejbrqpb

Conversation

@ymichael

@ymichael ymichael commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

Option number shortcuts focus the pending question form so Enter can advance or submit. The container inherited the global 2px outline with no padding, placing the outline against the question text and Submit button on desktop and phones.

What changed

Give the shared question form a rounded 1px inset focus-visible ring using bb's existing ring token. Add 4px padding with matching negative margins to separate the ring from content while preserving content layout. Regenerate the plugin registry entry from that component so vendored plugin forms receive the same style. Keyboard selection, Tab navigation, and Enter behavior remain intact.

How you verified

  • Reviewed before/after screenshots of the existing pending-question Ladle story at 390×640 and 1280×600 with real number-key input. Temporary story setup was restored before committing.
  • Confirmed visible keyboard focus, the padded inset ring, no horizontal overflow, option switching, Tab focus, and Enter's selected-answer request, intercepted locally without submitting to a server.
  • pnpm exec turbo run typecheck lint --filter=@bb/shared-ui --filter=@bb/app passed; app lint reported existing warnings and no errors.
  • pnpm exec turbo run lint --filter=@bb/shared-ui and pnpm exec turbo run lint --filter=@bb/shared-ui --filter=@bb/thread-view exited 0. These packages have no lint scripts, so those two commands executed zero tasks. Direct Oxlint on the touched file exited 0 with an existing warning.
  • pnpm exec turbo run typecheck lint test --filter=@bb/plugin-registry --filter=@bb/shared-ui passed, including registry freshness and the all-items plugin build test. These packages have no lint scripts.
  • git diff --check passed. Browser verification used Chromium; iOS Safari was not tested.

AGENT GENERATED

ymichael and others added 2 commits October 7, 2026 00:59
## What was wrong

Option number shortcuts focus the question form so Enter can advance or
submit. The unstyled container inherited the global 2px outline, leaving
it flush against the question text and Submit button on desktop and phones.

## What changed

Give the shared question form a rounded 1px inset focus-visible ring using
the existing ring token. Add 4px padding with matching negative margins to
separate the ring from content while preserving content layout and keyboard
selection, tab navigation, and Enter behavior. The fix is one class change.

## How you verified

- Captured and reviewed before/after Ladle screenshots at 1280x600 and
  390x640 with real number-key input. Used temporary command bindings and
  isolated the existing single-question story; restored the fixtures.
- Confirmed visible keyboard focus, inset ring, padding, and no horizontal
  overflow. Checked option switching, Tab focus, and Enter's selected-answer
  request, intercepted locally without submitting to a server.
- pnpm exec turbo run typecheck lint --filter=@bb/shared-ui --filter=@bb/app
  passed; app lint reported existing warnings and no errors.
- pnpm exec turbo run lint --filter=@bb/shared-ui --filter=@bb/thread-view
  exited 0, as did pnpm exec turbo run lint --filter=@bb/shared-ui for the
  only touched package. Both runs executed zero tasks because these packages
  have no lint scripts. The earlier direct Oxlint diagnostics came from an
  additional check outside the configured Turbo lint tasks; the original
  code produced identical diagnostics. Direct Oxlint on the touched file
  exited 0 with an existing warning.
- git diff --check passed. Browser verification used Chromium; iOS Safari
  was not tested.

> AGENT GENERATED
## What was wrong

The shared question form focus style changed while its generated plugin
registry entry retained the old source, causing CI registry checks to fail.

## What changed

Regenerate r/question-form.json from the shared UI component so vendored
plugin question forms receive the same padded inset focus ring.

## How you verified

pnpm exec turbo run typecheck lint test --filter=@bb/plugin-registry
--filter=@bb/shared-ui passed, including the registry freshness check and
all-items plugin build test. These packages have no lint scripts.
git diff --check passed.

> AGENT GENERATED
@ymichael
ymichael merged commit 1673047 into main Oct 7, 2026
47 checks passed
@ymichael
ymichael deleted the bb/soften-the-question-form-focus-outline-thr_ezjejbrqpb branch October 7, 2026 18:02
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.

1 participant