Closed imanjra closed 2 weeks ago
The changes introduce a new force
parameter across relevant methods in both built-in-operators.ts
and operations.py
. This parameter allows for forcing an action—like opening a panel—without performing the usual existence checks. The default value for force
is false
, maintaining current behavior unless explicitly overridden.
Files | Change Summary |
---|---|
app/.../built-in-operators.ts |
Added a force input to OpenPanel class to bypass panel existence check in execute method. |
fiftyone/.../operations.py |
Updated open_panel method to include a force parameter, enabling forced panel opening. |
sequenceDiagram
participant Client
participant OpenPanel
participant PanelManager
Client->>OpenPanel: execute({name, isActive, layout, force})
OpenPanel->>PanelManager: checkPanelExists(name)
alt force is false
PanelManager-->>OpenPanel: panelExists
alt panelExists
OpenPanel-->>Client: Panel already exists
else
OpenPanel->>PanelManager: createPanel(name, isActive, layout)
PanelManager-->>OpenPanel: panelCreated
OpenPanel-->>Client: Panel opened
end
else force is true
OpenPanel->>PanelManager: createPanel(name, isActive, layout)
PanelManager-->>OpenPanel: panelCreated
OpenPanel-->>Client: Panel opened (forced)
end
In code's vast garden, a change so neat, A forceful push, no checks repeat. Panels spring open, at your command, A magic touch, your wish in hand. With
false
the norm,true
the might, Open your panels, day or night! 🌙
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 an option to force open a panel even if a panel by name is not yet registered. This is useful for launching panel which may be registered later
How is this patch tested? If it is not, please explain why.
Using an operator with
on_startup
set to true: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