Create Rule Flow Core Infrastructure #41
Reference in New Issue
Block a user
Delete Branch "adilallo/feature/CreateRuleFlowCoreInfrastructure"
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?
Create Rule Flow Infrastructure, Navigation Components, and Logo Reconfiguration
Overview
This PR implements the foundational infrastructure for the create rule flow (CR-49), creates the shared TopNav and Footer components (CR-50), and reconfigures the Logo component with responsive sizing. The create flow provides a full-screen experience separate from the main site navigation, with its own navigation and footer components.
Changes
CR-49: Create Rule Flow Infrastructure
Routing Structure: Created route group
(create)with dynamic routing/create/[step]app/create/layout.tsx- Full-screen layout wrapper with CreateFlowProviderapp/create/[step]/page.tsx- Dynamic route handler for all flow stepsapp/create/types.ts- Type definitions for flow steps, state, and contextapp/create/context/CreateFlowContext.tsx- Context provider for flow state managementConditional Navigation: Updated root layout to hide main navigation/footer for create flow
app/components/navigation/ConditionalNavigation.tsx- Hides TopNav for/create/*routesapp/components/navigation/ConditionalFooter.tsx- Hides Footer for/create/*routesCR-50: CreateFlowTopNav and CreateFlowFooter Components
CreateFlowTopNav (
app/components/utility/CreateFlowTopNav/)hasShare,hasExport,hasEdit,loggedIn, and callback handlersloggedInprop ("Exit" vs "Save & Exit")createFlowresponsive sizeCreateFlowFooter (
app/components/utility/CreateFlowFooter/)secondButton(ReactNode),progressBar(boolean)ProportionBarcomponent (set to "1-0" state)Logo Component Reconfiguration
Responsive Sizing: Added new responsive size configurations
createFlow- Responsive sizing for create flow (adapts at md breakpoint)topNavFolderTop- Responsive sizing for TopNav with folderTop=truetopNavHeader- Responsive sizing for TopNav with folderTop=falsefooter- Updated to be fully responsive (adapts at sm and lg breakpoints)Simplified Implementation: Consolidated all responsive sizing logic into Logo component
hidden/blockpattern in favor of responsive Tailwind classeshidden sm:blockfor topNav sizes)Testing & Documentation
Tests Created:
tests/components/CreateFlowTopNav.test.tsx(12 tests)tests/components/CreateFlowFooter.test.tsx(8 tests)tests/components/Logo.test.tsxfor new responsive sizesStories Created:
stories/utility/CreateFlowTopNav.stories.js(3 stories)stories/utility/CreateFlowFooter.stories.js(3 stories)stories/icons/Logo.stories.jsfor responsive sizesScreenshots
How to Test
Create Flow Infrastructure:
/create/informational(or any valid step)CreateFlowTopNav:
loggedInpropstories/utility/CreateFlowTopNav.stories.jsCreateFlowFooter:
progressBarpropsecondButtonpropstories/utility/CreateFlowFooter.stories.jsLogo Component:
createFlow,topNavFolderTop,topNavHeader,footernpm run test:component -- tests/components/Logo.test.tsxstories/icons/Logo.stories.jsRun All Tests:h
npm run test:component