Closed imanjra closed 1 month ago
The recent changes enhance the CustomPanel
and related components by introducing new hooks for managing loading states and active event counts. The usePanelLoading
and useActivePanelEventsCount
hooks improve interactivity and responsiveness, ensuring that the UI reflects the current loading status. Additionally, the implementation of an atom for tracking event counts strengthens state management capabilities, enriching the overall user experience within the application.
Files | Change Summary |
---|---|
app/packages/operators/src/CustomPanel.tsx , app/packages/operators/src/hooks.ts , app/packages/operators/src/state.ts |
Introduced usePanelLoading and useActivePanelEventsCount hooks, enhancing loading state management and event counting. Added activePanelsEventCountAtom to track event counts using Recoil's state management. |
app/packages/operators/src/usePanelEvent.ts |
Modified usePanelEvent to integrate the new hooks for better event tracking and refined type definitions. |
app/packages/spaces/src/components/PanelTab.tsx , app/packages/spaces/src/hooks.ts , app/packages/spaces/src/state.ts |
Added loading state management with usePanelLoading hook and panelsLoadingStateAtom . Updated the PanelTab component to conditionally render loading indicators. |
sequenceDiagram
participant User
participant PanelTab
participant CustomPanel
participant usePanelLoading
participant useActivePanelEventsCount
User->>PanelTab: Interacts with panel
PanelTab->>usePanelLoading: Check loading state
usePanelLoading-->>PanelTab: Returns loading status
PanelTab->>CustomPanel: Render based on loading state
CustomPanel->>useActivePanelEventsCount: Get active event count
useActivePanelEventsCount-->>CustomPanel: Returns event count
CustomPanel->>PanelTab: Updates UI accordingly
🐇 In a panel so sleek,
Events dance and peek,
Loading states now shine bright,
With hooks that bring delight!
A rabbit’s hop through code,
Makes the user experience explode! 🌟
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?
Add panel loading state indicator support
Preview
https://github.com/user-attachments/assets/cec856ab-5b28-4434-a325-16c09e71e551
How is this patch tested? If it is not, please explain why.
Using python panel with events
Release Notes
Is this a user-facing change that should be mentioned in the release notes?
See above
What areas of FiftyOne does this PR affect?
fiftyone
Python library changesSummary by CodeRabbit
Summary by CodeRabbit
New Features
PanelTab
component when loading panels.Bug Fixes
DashboardView
component.