-
Notifications
You must be signed in to change notification settings - Fork 510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
debounce spaces updates to session #4364
base: py-panels-develop
Are you sure you want to change the base?
Conversation
WalkthroughThis update involves removing an obsolete constant from an enum in the operators package and enhancing the performance of the Changes
Poem
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? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (2)
- app/packages/operators/src/constants.ts (1 hunks)
- app/packages/state/src/hooks/useSessionSpaces.ts (2 hunks)
Files skipped from review due to trivial changes (1)
- app/packages/operators/src/constants.ts
Additional Context Used
Path-based Instructions (1)
app/packages/state/src/hooks/useSessionSpaces.ts (1)
Pattern
**/*.{ts,tsx}
: Review the Typescript and React code for conformity with best practices in React, Recoil, Graphql, and Typescript. Highlight any deviations.
Additional comments not posted (5)
app/packages/state/src/hooks/useSessionSpaces.ts (5)
1-2
: Imports are correctly updated to includedebounce
from lodash anduseCallback
from React.
6-6
: The debouncing interval is set to 500 milliseconds, which is a typical value for UI responsiveness.
22-27
: ThesetSessionSpaces
function is correctly wrapped withuseCallback
to optimize performance.
30-35
: The debounced version ofsetSessionSpaces
is correctly implemented usinguseMemo
anddebounce
with both leading and trailing options enabled.
37-41
: Ensure all parts of the application usinguseSessionSpaces
are updated to handle the debounced function.
What changes are proposed in this pull request?
Debounce updating session on spaces layout/state update to avoid per change session mutation requests
How is this patch tested? If it is not, please explain why.
Using a panel with a text input whose state is stored in persistent panel state
Release Notes
Is this a user-facing change that should be mentioned in the release notes?
notes for FiftyOne users.
(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
setSessionSpaces
function.PANEL_LOAD_TIMEOUT
from the codebase.