Skip to content

feat: password toggle, character counters, accordion a11y fixes, dropdown menu component#5

Merged
JosunLP merged 19 commits intomainfrom
copilot/evolve-component-library
Mar 24, 2026
Merged

feat: password toggle, character counters, accordion a11y fixes, dropdown menu component#5
JosunLP merged 19 commits intomainfrom
copilot/evolve-component-library

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 24, 2026

  • Review actionable PR feedback in the requested thread
  • Investigate recent CI/workflow status and logs
  • Reproduce current accordion state locally before changes
    • Run targeted accordion tests
    • Run typecheck
  • Guard accordion transition-end handling so only the panel's own height transition resets to auto
  • Add or update targeted accordion regression tests
  • Re-run full validation
  • Capture a UI screenshot and reply on the PR comment
  • Run final code review and security validation

💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

Copilot AI and others added 4 commits March 23, 2026 22:47
…and dropdown menu component

- BqInput: password visibility toggle with accessible button and i18n labels
- BqInput: character counter with show-counter prop and maxlength
- BqTextarea: character counter with show-counter prop and maxlength
- BqAccordion: replace max-height:2000px hack with JS-driven scrollHeight
- BqAccordion: add aria-labelledby/aria-controls linking trigger to panel
- BqAccordion: add unique IDs via state for proper ARIA relationships
- BqDropdownMenu: new component with keyboard nav, focus management, placement
- Add i18n keys for dropdown menu
- Add tests for all new features (30 new tests)

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bQuery/ui/sessions/5eb3b5ec-065c-425e-8904-40236e068f6f
…ropdown-menu docs

- Input docs: add password toggle and character counter sections
- Textarea docs: add character counter section, CSS parts, accessibility notes
- Accordion docs: add accessibility and animation sections
- Dropdown Menu: new full documentation page
- VitePress config: add all 29 components to sidebar (was only 12)
- Component catalog: add dropdown-menu to overlays category

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bQuery/ui/sessions/5eb3b5ec-065c-425e-8904-40236e068f6f
…n optimization

- Move aria-haspopup/aria-expanded/aria-controls to slotted trigger element (not slot)
- Add updated() hook to BqDropdownMenu for syncing aria-expanded
- Optimize BqAccordion updated() to only recalc height when open state changes
- Update dropdown-menu tests to verify ARIA on slotted trigger

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bQuery/ui/sessions/5eb3b5ec-065c-425e-8904-40236e068f6f
@JosunLP JosunLP marked this pull request as ready for review March 24, 2026 08:45
Copilot AI review requested due to automatic review settings March 24, 2026 08:45
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

This PR completes several partially-implemented UI features (character counters and password visibility toggle), improves bq-accordion accessibility/animation behavior, and introduces a new bq-dropdown-menu overlay component with docs, i18n, and tests.

Changes:

  • Add show-counter + i18n-driven live character counter for bq-input and bq-textarea, plus a password visibility toggle for bq-input.
  • Rework bq-accordion expand/collapse animation to JS-driven height and add ARIA relationships via unique IDs.
  • Introduce bq-dropdown-menu component, register it in the library entrypoints, document it, and add new tests.

Reviewed changes

Copilot reviewed 18 out of 19 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
tests/textarea-enhancements.test.ts Adds coverage for textarea character counter + aria-live/aria-describedby.
tests/input-enhancements.test.ts Adds coverage for password toggle and input character counter behavior.
tests/dropdown-menu.test.ts Adds baseline registration + ARIA attribute tests for dropdown menu.
tests/accordion-enhancements.test.ts Adds coverage for accordion ARIA relationships and height animation behavior.
src/index.ts Registers the new dropdown-menu component entry in the root bundle map.
src/i18n/en.ts Adds English strings for dropdown menu labels.
src/components/textarea/BqTextarea.ts Implements show-counter rendering + aria-describedby wiring for textarea.
src/components/input/BqInput.ts Implements password toggle + show-counter for input, including i18n text.
src/components/index.ts Adds side-effect import to register dropdown menu in the “all components” entry.
src/components/dropdown-menu/index.ts Adds per-component wrapper entry export.
src/components/dropdown-menu/BqDropdownMenu.ts Implements new dropdown menu component (overlay, keyboard handling, click-outside, ARIA).
src/components/accordion/BqAccordion.ts Adds unique IDs + ARIA links; replaces max-height hack with height animation.
docs/components/textarea.md Documents character counter and new CSS parts/accessibility notes.
docs/components/input.md Documents password toggle + character counter and new CSS parts/accessibility notes.
docs/components/index.md Adds dropdown menu to component catalog.
docs/components/dropdown-menu.md Adds full dropdown menu documentation page.
docs/components/accordion.md Documents updated accessibility + animation behavior.
docs/.vitepress/config.ts Expands sidebar to include all components, including dropdown menu.
.gitignore Ignores package-lock.json.

💡 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

…dion height

Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bQuery/ui/sessions/d9b72fd9-b6b1-46cc-9e33-2b9a49d81623
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 24, 2026

@copilot apply changes based on the comments in this thread

Applied the requested review-thread fixes in 3518dab.

Highlights:

  • dropdown menu no longer steals focus back on Tab/outside click, excludes trigger clicks from bq-select, and assigns menu semantics to slotted items
  • password toggle is disabled for disabled/readonly inputs
  • accordion now uses 0px consistently and resets expanded height to auto after transition

Validation passed: npm run lint:types, npx bun test (225 pass), and npm run build.

Screenshot: https://github.com/user-attachments/assets/909837be-2b6d-4900-b4f8-561729ca6cf6

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 18 out of 19 changed files in this pull request and generated 5 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 review fixes in 6daeda0.

Updates:

  • menu items now activate from the keyboard with Enter/Space
  • input and textarea counters now update live while typing
  • input and textarea no longer render an empty footer when there is no hint, error, or counter

Validation passed: npm run lint:types, npx bun test (231 pass), and npm run build. I also checked recent workflow runs; the latest PR workflow was in progress and there were no failed runs to investigate.

Screenshot: https://github.com/user-attachments/assets/34f25e5d-e66e-49c1-9f8e-a9bf365e71be

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 18 out of 19 changed files in this pull request and generated 2 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

@JosunLP
Copy link
Copy Markdown
Contributor

JosunLP commented Mar 24, 2026

@copilot apply changes based on the comments in this thread

Copilot AI and others added 3 commits March 24, 2026 11:37
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 24, 2026

@copilot apply changes based on the comments in this thread

Applied the accordion reduced-motion fix in 04ba24d.

Updates:

  • expanded accordions now restore height: auto even when height transitions are disabled, instead of relying only on transitionend
  • missing computed-style info now falls back to the safer no-transition behavior
  • added a regression test covering the reduced-motion path

Validation passed: npx bun test tests/accordion-enhancements.test.ts, npm run lint:types, npx bun test (239 pass), and npm run build. I also checked the latest workflow run; it was in progress and there were no recent failed runs to investigate.

Screenshot: https://github.com/user-attachments/assets/a604760e-cb72-4b0f-906c-ad350e0e1a92

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 18 out of 19 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

Copilot AI and others added 3 commits March 24, 2026 11:56
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 24, 2026

@copilot apply changes based on the comments in this thread

Applied the latest review-thread fixes in 8079b93.

Updates:

  • dropdown triggers now reflect host disabled state via aria-disabled, and button triggers also use the native disabled state
  • added over-limit counter regressions for both bq-input and bq-textarea
  • added a dropdown regression covering disabled trigger accessibility sync

Validation passed: npx bun test tests/input-enhancements.test.ts tests/textarea-enhancements.test.ts tests/dropdown-menu.test.ts, npm run lint:types, npx bun test (242 pass), and npm run build. I also checked the latest workflow run; it was in progress and there were no recent failed runs to investigate.

Screenshot: https://github.com/user-attachments/assets/68f56558-8570-494c-a285-de837c07a0f8

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 18 out of 19 changed files in this pull request and generated 1 comment.


💡 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/c2c1c6b0-c5b7-40ad-ab69-1dedc9a76ce8
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 24, 2026

@copilot apply changes based on the comments in this thread

Applied the latest accordion review fix in c2a56f2.

Updates:

  • the accordion transitionend handler now ignores bubbled descendant height transitions and only responds to the panel’s own height transition
  • added a regression test covering the bubbled-descendant case

Validation passed: npx bun test tests/accordion-enhancements.test.ts, npm run lint:types, npx bun test (243 pass), and npm run build. I also checked the latest workflow run; it was in progress and the recent completed runs were successful, so there were no failed jobs to investigate.

Screenshot: https://github.com/user-attachments/assets/89432587-d177-4843-b224-eb07acccf9c8

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 18 out of 19 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 db3b1af into main Mar 24, 2026
4 checks passed
@JosunLP JosunLP deleted the copilot/evolve-component-library branch March 24, 2026 12:26
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