Skip to content

Add segmented control primitive and improve dropdown menu keyboard ergonomics#8

Merged
JosunLP merged 11 commits intomainfrom
copilot/improve-existing-components
Mar 24, 2026
Merged

Add segmented control primitive and improve dropdown menu keyboard ergonomics#8
JosunLP merged 11 commits intomainfrom
copilot/improve-existing-components

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 24, 2026

  • Inspect the new review-thread feedback, current branch state, and relevant component/docs files
  • Update segmented control RTL style lookup to avoid relying on a global getComputedStyle
  • Verify the canonical GitHub repo URL and normalize the docs repository links to match it
  • Run targeted validation for the touched files and re-run the full test suite
  • Run final review/security checks and reply on the PR comment with the addressing commit hash and screenshot

⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bQuery/ui/sessions/7d7afef3-07c2-4fd0-af32-83cb01c37c1e
@JosunLP JosunLP marked this pull request as ready for review March 24, 2026 14:10
Copilot AI review requested due to automatic review settings March 24, 2026 14:10
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new bq-segmented-control form/selection primitive and improves bq-dropdown-menu keyboard ergonomics (typeahead), along with documentation and Storybook coverage to integrate both into the library’s component surface area.

Changes:

  • Introduces bq-segmented-control with radiogroup semantics, roving tab stop behavior, and native form submission via the hidden-input proxy.
  • Adds printable-key typeahead navigation to bq-dropdown-menu, clearing its buffer on close/disconnect.
  • Expands docs/Storybook: new segmented control docs + story, dropdown menu keyboard docs update, new architecture/roadmap page, and docs nav updates.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/segmented-control.test.ts Adds component tests for segmented control accessibility, default selection, events, and roving tabindex.
tests/dropdown-menu.test.ts Adds regression test for dropdown menu printable-key typeahead focus behavior.
stories/segmented-control.stories.ts Adds Storybook stories/controls for segmented control variants (size/full-width).
src/index.ts Registers segmented control in the global component entry map.
src/components/segmented-control/index.ts Adds component entry export for segmented control.
src/components/segmented-control/BqSegmentedControl.ts Implements the segmented control component (a11y, keyboard, form proxy, styling).
src/components/index.ts Ensures segmented control is included in the side-effect component import bundle.
src/components/dropdown-menu/BqDropdownMenu.ts Implements typeahead buffer + matching logic and cleanup.
docs/guide/architecture-roadmap.md Adds architecture/gap-analysis/roadmap guide page.
docs/components/segmented-control.md Adds segmented control documentation (API, a11y, keyboard, theming).
docs/components/index.md Adds segmented control to the component catalog.
docs/components/dropdown-menu.md Documents typeahead keyboard behavior for dropdown menu.
docs/.vitepress/config.ts Updates docs navigation (GitHub link + new guide page + component sidebar entry).

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

@JosunLP
Copy link
Copy Markdown
Contributor

JosunLP commented Mar 24, 2026

@copilot apply changes based on the comments in this thread

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bQuery/ui/sessions/770510b0-8b29-4fa8-97eb-87baea7559ee
Copilot AI and others added 2 commits March 24, 2026 14:27
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bQuery/ui/sessions/770510b0-8b29-4fa8-97eb-87baea7559ee
JosunLP and others added 6 commits March 24, 2026 15:29
…ariable'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
…tion or class'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bQuery/ui/sessions/770510b0-8b29-4fa8-97eb-87baea7559ee
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bQuery/ui/sessions/770510b0-8b29-4fa8-97eb-87baea7559ee
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 24, 2026

@copilot apply changes based on the comments in this thread

Applied the review-thread follow-up in f477e1e. The duplicate host keydown registration is removed, segmented-control keyboard behavior is still covered through the public event path, and the happy-dom test setup now exposes getComputedStyle so that path can be tested reliably. Screenshot: https://github.com/user-attachments/assets/3d4d4c1a-d5ad-448b-853b-036598fbf965

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.


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

@JosunLP
Copy link
Copy Markdown
Contributor

JosunLP commented Mar 24, 2026

@copilot apply changes based on the comments in this thread

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 24, 2026

@copilot apply changes based on the comments in this thread

Applied the follow-up in 334874f. bq-segmented-control now resolves RTL via ownerDocument.defaultView.getComputedStyle(...), and the docs now point the home-page GitHub action to the canonical https://github.com/bQuery/ui repo URL already used by the configured remote and VitePress links. Screenshot: https://github.com/user-attachments/assets/3d4d4c1a-d5ad-448b-853b-036598fbf965

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated no new comments.


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

@JosunLP JosunLP merged commit ed49609 into main Mar 24, 2026
9 checks passed
@JosunLP JosunLP deleted the copilot/improve-existing-components branch March 24, 2026 14:56
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.

3 participants