-
Notifications
You must be signed in to change notification settings - Fork 2
Feat/persistent combobox updates #1193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 adds loading state support for the persistent combobox component and improves test coverage. The implementation introduces skeleton loading indicators and enhances the existing test suite with comprehensive interaction tests for various scenarios.
Key Changes:
- Added
SelectItemSkeletoncomponent for loading state visualization - Implemented loading state handling in persistent mode of Select component
- Enhanced Storybook stories with extensive interaction tests using the
playfunction - Improved test structure for custom value component functionality
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/molecules/Select/SelectItemSkeleton.tsx |
New skeleton loading component with test-id for loading indication |
src/molecules/Select/Select.tsx |
Added loading state support to persistent mode with conditional skeleton rendering |
src/molecules/Select/Select.test.tsx |
Added test for SingleSelect error validation in persistent mode |
src/molecules/Select/PersistentComboBox/PersistentComboBox.stories.tsx |
Enhanced stories with deterministic fake data generation and comprehensive play functions for interaction testing |
src/molecules/Select/ComboBox/ComboBox.test.tsx |
Restructured custom value component tests into a describe block with separate removal test cases |
public/mockServiceWorker.js |
Updated MSW version from 2.12.1 to 2.12.4 |
bun.lock |
Updated multiple dependencies including rolldown, tiptap, tanstack, and typescript-eslint packages |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this 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 9 out of 10 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
src/molecules/Select/SelectMenuItem.utils.ts:42
- The removal of the early return guard for items without children could lead to incorrect behavior. When an item has no children, flattenOptions will return an array containing only the parent item. This means the function will incorrectly calculate the parent state for items without children. Consider keeping the early return or ensuring the logic properly handles items without children.
export function getParentState<T extends SelectOptionRequired>(
item: SelectOption<T>,
values: SelectOption<T>[]
): SelectedState {
const isSelected = values.some((value) => value.value === item.value);
const selectedValues = values.map(({ value }) => value);
const allOptions = flattenOptions([item])?.map(({ value }) => value);
if (isSelected) {
return 'selected';
} else if (allOptions.some((option) => selectedValues.includes(option))) {
return 'indeterminate';
}
return 'none';
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
# Conflicts: # bun.lock
There was a problem hiding this 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 8 out of 9 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this 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 13 out of 14 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this 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 16 out of 17 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Azure DevOps links
Description
Test setup for persistent combobox
Tests for new env toggle functionality