refactor(SDK-561): rename SelectPolicyType to PolicyTypeSelector pattern#1505
Merged
krisxcrash merged 5 commits intomainfrom Apr 8, 2026
Merged
refactor(SDK-561): rename SelectPolicyType to PolicyTypeSelector pattern#1505krisxcrash merged 5 commits intomainfrom
krisxcrash merged 5 commits intomainfrom
Conversation
Merged
3 tasks
jeffredodd
approved these changes
Apr 8, 2026
Stateless UI for the holiday selection step in the time-off policy creation flow. Renders a multi-select DataView table with Holiday, Observed date, and Next observation columns, plus Back/Continue actions via ActionsLayout. - SelectHolidaysTypes.ts: HolidayItem and props interfaces - SelectHolidaysPresentation.tsx: component using DataView, i18n, ComponentsContext - Storybook stories: AllSelected, PartialSelection, EditMode variants - Vitest + RTL tests for rendering and interactions - i18n: added nextObservation, backCta, tableLabel keys
- Fix DataTable to support isItemSelected for controlled checkboxes (previously only DataCards used isItemSelected, causing desktop checkboxes to always render unchecked) - Add mode prop to SelectHolidaysPresentation: 'select' (default) shows checkboxes + header + Back/Continue actions; 'view' renders a read-only table with no checkboxes or actions - Add ViewMode Storybook story and 3 view mode tests
Move SelectHolidays logic into HolidaySelectionForm and rename presentation/types/tests/stories to follow SDK naming conventions (HolidaySelectionForm* pattern, co-located under HolidaySelectionForm/).
Move presentation, types, test, and stories files from TimeOffManagement/SelectPolicyType/ into PolicyTypeSelector/ and rename to follow SDK naming conventions (PolicyTypeSelectorPresentation, etc.).
eb4301f to
e565077
Compare
Rebase left behind imports pointing to the old TimeOffManagement/SelectPolicyType path. Updated index.ts and TimeOffFlowComponents.tsx to use the new PolicyTypeSelector path and regenerated the endpoint inventory.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SelectPolicyTypePresentation, types, test, and stories fromTimeOffManagement/SelectPolicyType/intoPolicyTypeSelector/and rename to follow SDK naming conventions (PolicyTypeSelectorPresentation,PolicyTypeSelectorTypes, etc.)SelectPolicyTypetype toPolicyTypeandSelectPolicyTypePresentationPropstoPolicyTypeSelectorPresentationPropsfor consistencyPolicyTypeSelector.tsxto import from co-located files instead of cross-referencingTimeOffManagement/TimeOffManagement/SelectPolicyType/directoryStacks on #1497.
Test plan
npm run test -- --run src/components/UNSTABLE_TimeOff/PolicyTypeSelector/(17 tests pass)npm run buildpassesPolicyTypeSelectorContextual→PolicyTypeSelector→PolicyTypeSelectorPresentation