Closed chesterkmr closed 1 month ago
Latest commit: bd79d7ad834d11c8a54bca6861c56cad7cd20aca
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
The recent changes enhance the StateManager
component and related hooks by introducing an isPluginLoading
state, improving the management of asynchronous operations. This new property allows components to track the loading status of plugins, ensuring a better user experience by preventing interactions during loading. The SubmitButton
component has been updated to reflect this state, making it more responsive. Overall, the updates facilitate a more comprehensive state management approach across the application.
Files | Change Summary |
---|---|
apps/kyb-app/src/components/organisms/DynamicUI/StateManager/... |
Enhanced StateManager to include isPluginLoading , improving state management and responsiveness. Updated useMemo dependencies accordingly. |
apps/kyb-app/src/components/organisms/DynamicUI/StateManager/hooks/... |
Updated useStateLogic hook to track isPluginLoading , modifying the state structure and return value for better asynchronous operation management. |
apps/kyb-app/src/components/organisms/DynamicUI/StateManager/types.ts |
Added isPluginLoading to StateManagerContext interface, expanding context capabilities for UI state management. |
apps/kyb-app/src/components/organisms/UIRenderer/elements/SubmitButton/... |
Modified SubmitButton to use isPluginLoading for its disabled state, enhancing button responsiveness during plugin loading. |
sequenceDiagram
participant User
participant SubmitButton
participant StateManager
participant Plugin
User->>SubmitButton: Clicks Submit
SubmitButton->>StateManager: Checks isPluginLoading
StateManager-->>SubmitButton: Returns isPluginLoading
alt Plugin is loading
SubmitButton->>User: Disabled
else Plugin is not loading
SubmitButton->>Plugin: Initiate Plugin
Plugin-->>StateManager: Updates isPluginLoading to true
end
🐇 In the land of code where rabbits play,
We’ve added new states to brighten the day!
With plugins loading, we’ll keep things clear,
Buttons won’t budge when the path isn't near.
Hopping along, our UI shines bright,
Thank you, dear coders, for this fine byte! 🎉
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
StateManager
component to track plugin loading states.SubmitButton
component to prevent user interactions during loading periods.Bug Fixes
Documentation
isPluginLoading
state across relevant components.