Closed imanjra closed 3 months ago
The recent changes introduce a new SetPanelTitle
operator to set panel titles dynamically, enhance existing methods by removing unnecessary parameters, and add flexibility to the setPanelTitle
function by including an optional id
parameter. These updates streamline the code and expand functionality for managing panel operations.
File | Change Summary |
---|---|
app/packages/operators/src/built-in-operators.ts |
Added usePanelTitle import, modified execute and useHooks methods, added SetPanelTitle class, registered operator. |
app/packages/spaces/src/hooks.ts |
Updated setPanelTitle function to accept an optional id parameter. |
fiftyone/operators/operations.py |
Enhanced close_panel method with id parameter, added set_panel_title method. |
fiftyone/operators/panel.py |
Modified close method to include id parameter, added set_title method. |
sequenceDiagram
participant User
participant Panel
participant Operator
participant Hooks
User->>Operator: Call SetPanelTitle
Operator->>Hooks: usePanelTitle(id)
Hooks-->>Operator: Return title setter
Operator->>Panel: Set title using setter
Panel-->>User: Title updated
In fields of code where rabbits play,
A title set, a bright new day.
Panels gleam with names so fine,
Thanks to hooks and operators' design.
Flexibility now in our hand,
With every change, our app will stand.
🐇✨
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?
How is this patch tested? If it is not, please explain why.
Using python panel operator:
Release Notes
Is this a user-facing change that should be mentioned in the release notes?
Part of a larger feature
What areas of FiftyOne does this PR affect?
fiftyone
Python library changesSummary by CodeRabbit
New Features
id
parameter for more flexible title management.Enhancements
close_panel
method to accept anid
parameter for better panel identification.usePanelTitle
hook to support setting titles based on an optionalid
.Bug Fixes