Closed imanjra closed 1 month ago
The recent changes streamline the imports and exports of state management functions within the application. Notably, the useUnboundState
hook has been relocated to a new module, enhancing its accessibility. Import adjustments in various components aim to improve clarity and maintainability without altering core logic. These modifications collectively optimize the handling of component state and lifecycle methods across the application, fostering better responsiveness and organization.
Files | Change Summary |
---|---|
.../SchemaIO/components/DynamicIO.tsx |
Import of useUnboundState moved to @fiftyone/state , and removal of direct React import for improved clarity. |
.../SchemaIO/hooks/index.ts |
Removed export of useUnboundState , altering module's export interface. |
.../operators/src/useCustomPanelHooks.ts |
Added useUnboundState import; modified logic for more dynamic panel state management. |
.../state/src/hooks/index.ts |
New export added for useUnboundState , enhancing module functionality. |
.../state/src/hooks/useUnboundState.ts |
Changed from named export to default export for useUnboundState , affecting import methods. |
sequenceDiagram
participant A as Component
participant B as useCustomPanelHooks
participant C as useUnboundState
A->>B: Call useCustomPanelHooks
B->>C: Use useUnboundState
C->>B: Return lazyState
B->>A: Return currentPanelState
š In fields of code, we hop and play,
With imports tidy, bright as day.
State flows freely, smooth like cream,
Dynamic changes, a rabbit's dream!
So here's to hooks, both fresh and new,
A hop, a skip, we dance for you! šæāØ
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?
What changes are proposed in this pull request?
fix missing state in panel events issue
How is this patch tested? If it is not, please explain why.
(Details)
Using an example panel which sets arbitrary key in state
Is this a user-facing change that should be mentioned in the release notes?
(Details in 1-2 sentences. You can just refer to another PR with a description if this PR is part of a larger change.)
What areas of FiftyOne does this PR affect?
fiftyone
Python library changesSummary by CodeRabbit
New Features
useUnboundState
hook for improved state management across the application.Bug Fixes
Documentation