This PR introduces significant improvements to the application's state management by implementing StepContext for centralized step tracking and updating components to leverage the new context. Additional improvements include refactoring CsvContext for streamlined file and data management, fixing step navigation bugs, and enhancing the user interface.
Changes
Centralized Step State Management
Added StepContext to manage currentStep, completedSteps, and navigation functions like handleNext and handleBack.
Removed prop drilling for setCurrentStep and setCompletedSteps by using StepContext.
Component Refactoring
UploadPage:
Integrated StepContext for step transitions.
Improved CSV file upload logic with a clear modal flow and file preview using CsvContext.
CleanPage:
Refactored to use StepContext for marking the step as complete.
Added pagination for large datasets.
VisualizePage:
Added checks to ensure data cleaning is completed before proceeding.
Used StepContext for managing step transitions.
Sidebar:
Dynamically controls button states using StepContext.
Removed redundant props and replaced logic with context-based checks.
Ribbon:
Updated to fetch states and actions directly from StepContext and CsvContext.
Code Cleanup
Removed redundant prop passing by leveraging StepContext and CsvContext.
Simplified logic for better readability and maintainability.
closes #38
Summary
This PR introduces significant improvements to the application's state management by implementing StepContext for centralized step tracking and updating components to leverage the new context. Additional improvements include refactoring CsvContext for streamlined file and data management, fixing step navigation bugs, and enhancing the user interface.
Changes
UploadPage:
CleanPage:
VisualizePage:
Sidebar:
Ribbon: