Skip to content

Comments

Refactor SearchableDropdown with Fluent UI components, extract styles, and add tests#2329

Merged
nishthaAhujaa merged 4 commits intousers/nishthaahuja/searchableDropdownfrom
copilot/sub-pr-2312
Jan 27, 2026
Merged

Refactor SearchableDropdown with Fluent UI components, extract styles, and add tests#2329
nishthaAhujaa merged 4 commits intousers/nishthaahuja/searchableDropdownfrom
copilot/sub-pr-2312

Conversation

Copy link
Contributor

Copilot AI commented Jan 14, 2026

  • Replace native HTML with Fluent UI components (Stack, DefaultButton, Text)
  • Extract inline styles to separate SearchableDropdown.styles.ts file
  • Add unit tests for SearchableDropdown component (14 test cases, all passing)
  • Verify behavior consistency for SwitchAccount and SwitchSubscription (AccountSwitcher tests pass)
  • Optimize performance with useMemo for filtered items calculation
  • Fix text alignment to match original UI (left-aligned placeholder and selected text)

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI mentioned this pull request Jan 14, 2026
Copilot AI changed the title [WIP] Add searchable dropdown component Respond to PR review request Jan 14, 2026
Copilot AI requested a review from nishthaAhujaa January 14, 2026 12:35
@nishthaAhujaa
Copy link
Collaborator

@copilot
please address all review feedback:

  • Replace native HTML with Fluent UI components
  • Extract inline styles to separate file
  • Add unit tests for SearchableDropdown
  • Verify behavior consistency

Copilot AI and others added 2 commits January 14, 2026 12:48
- Replace native HTML elements with Fluent UI components (Stack, DefaultButton, Text)
- Extract inline styles to SearchableDropdown.styles.ts
- Add comprehensive unit tests (14 test cases)
- Verify behavior consistency with AccountSwitcher tests

Co-authored-by: nishthaAhujaa <45535788+nishthaAhujaa@users.noreply.github.com>
Co-authored-by: nishthaAhujaa <45535788+nishthaAhujaa@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 14, 2026

@copilot
please address all review feedback:

  • Replace native HTML with Fluent UI components
    ...

All review feedback has been addressed in commits 302b13a and eb2c560:

Fluent UI components: Replaced native HTML elements with Stack, DefaultButton, and Text components
Style extraction: Created SearchableDropdown.styles.ts with all styles organized by purpose
Unit tests: Added 14 comprehensive test cases covering rendering, interactions, filtering, and edge cases - all passing
Behavior consistency: Verified with existing AccountSwitcher tests (2/2 passing)
Performance: Optimized with useMemo for filtered items calculation
Security: CodeQL scan passed with 0 alerts

The SearchableDropdown component now follows Fluent UI design patterns and has full test coverage while maintaining backward compatibility with SwitchAccount and SwitchSubscription components.

Copilot AI changed the title Respond to PR review request Refactor SearchableDropdown with Fluent UI components, extract styles, and add tests Jan 14, 2026
@nishthaAhujaa
Copy link
Collaborator

@copilot it looks like the UI looks different than the previous pr can you make the Ui similar only like the placeholder texts and selected texts were left aligned not anymore

- Add flexContainer.justifyContent: "flex-start" to button styles
- Add textAlign: "left" to button label, item styles, and empty message
- Restore original left-aligned appearance for placeholder and selected text

Co-authored-by: nishthaAhujaa <45535788+nishthaAhujaa@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 27, 2026

@copilot it looks like the UI looks different than the previous pr can you make the Ui similar only like the placeholder texts and selected texts were left aligned not anymore

Fixed text alignment in commit 0c5a0e0. The placeholder and selected text are now left-aligned as in the original UI.

Changes made:

  • Added flexContainer.justifyContent: "flex-start" to DefaultButton styles to align content to the left
  • Added explicit textAlign: "left" to button label, list items, and empty message styles

All tests still passing (14/14 SearchableDropdown tests, 2/2 AccountSwitcher tests).

@nishthaAhujaa nishthaAhujaa marked this pull request as ready for review January 27, 2026 09:19
@nishthaAhujaa nishthaAhujaa requested a review from a team as a code owner January 27, 2026 09:19
@nishthaAhujaa nishthaAhujaa merged commit f7d3dc1 into users/nishthaahuja/searchableDropdown Jan 27, 2026
1 check passed
@nishthaAhujaa nishthaAhujaa deleted the copilot/sub-pr-2312 branch January 27, 2026 09:19
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