Create Modal #34
Reference in New Issue
Block a user
Delete Branch "adilallo/component/ModalCreate"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implement Create Modal Component with Supporting Subcomponents (CR-45)
Overview
This PR implements the Create modal component and its supporting subcomponents based on the Figma design specifications. The Create component provides a reusable modal dialog for multi-step creation flows (e.g., creating community policies). It includes portal rendering, keyboard navigation, focus management, and accessibility features.
The implementation follows the container/presentation pattern and includes reusable utility components (
ModalHeader,ModalFooter,InputWithCounter) that can be used independently or with other modal-like components.Changes
New Components
Create Component (
app/components/Create/)ModalHeader Component (
app/components/ModalHeader/)Icon_Close.svgassetModalFooter Component (
app/components/ModalFooter/)InputWithCounter Component (
app/components/InputWithCounter/)Icon_Help.svgwith brand colorModified Components
ContentLockup Component
modalvariant for modal header stylingStepper Component
StepperActivetype from1 | 2 | 3 | 4 | 5tonumberto support any number of stepsOther Changes
Internationalization
messages/en/common.json:buttons.back: "Back"buttons.next: "Next"buttons.finish: "Finish"Component Preview Page
InputWithCounterintegrationESLint Configuration
.types.tsfiles to disable unused-vars ruleTesting
renderWithProvidersto support i18n contextStorybook
Screenshots
How to Test
View in Component Preview Page
/components-previewView in Storybook
npm run storybookRun Tests
./scripts/test-local.shto execute full test suiteAccessibility Testing
Responsive Testing
Notes
InputWithCountercomponent is designed to be reusable across different modals with varying character limitsModalFooteris localized using the i18n systemvariant="default"(white background) and is disabled until input has contentvariant="outlined"(outline style).types.tsfilesStepperActivetype was generalized to support any number of steps, not just 1-5Future Enhancements