-
Notifications
You must be signed in to change notification settings - Fork 557
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
Dashboard edit #4611
Dashboard edit #4611
Conversation
WalkthroughThe recent updates introduce enhanced item management capabilities in the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant DashboardView
participant Item
User->>DashboardView: Click on Edit Button
DashboardView->>Item: Trigger onEditItem
Item->>DashboardView: Send item ID and path
DashboardView->>User: Display edit interface
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 Configuration 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/core/src/plugins/SchemaIO/components/DashboardView.tsx (4 hunks)
- fiftyone/operators/types.py (1 hunks)
Additional context used
Path-based instructions (1)
app/packages/core/src/plugins/SchemaIO/components/DashboardView.tsx (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 (6)
app/packages/core/src/plugins/SchemaIO/components/DashboardView.tsx (4)
74-74
: Addition ofallow_edit
property looks good.The
allow_edit
property is correctly added to the schema view configuration.
82-92
: Addition ofonEditItem
callback looks good.The
onEditItem
callback is correctly defined usinguseCallback
and triggers theon_edit_item
event with the item's ID and path.
172-220
: Changes in the rendering logic ofGridLayout
look good.The edit button is conditionally rendered based on the
allow_edit
flag and is designed to stop event propagation to avoid triggering other click events.
236-244
: Usage ofDynamicIO
component looks good.The
DynamicIO
component is correctly passed the necessary props to render the item content within the grid layout.fiftyone/operators/types.py (2)
2102-2112
: Addition ofallow_edit
property in the constructor looks good.The
allow_edit
property is correctly added to the constructor of theDashboardView
class with a default value ofTrue
.
2119-2119
: Update toto_json
method looks good.The
to_json
method is correctly updated to include theallow_edit
property in the JSON representation of theDashboardView
class.
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.
LGTM
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/core/src/plugins/SchemaIO/components/DashboardView.tsx (3 hunks)
- fiftyone/operators/types.py (1 hunks)
Files skipped from review as they are similar to previous changes (2)
- app/packages/core/src/plugins/SchemaIO/components/DashboardView.tsx
- fiftyone/operators/types.py
What changes are proposed in this pull request?
Allows for configuring a new mode/button for `DashboardView`. This allows a panel to implement `on_edit_item` similarly to `on_remove_item` and `on_add_item`.How is this patch tested? If it is not, please explain why.
With the new custom dashboard plugin.
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
New Features
Enhancements