Skip to content

Commit

Permalink
modal panels
Browse files Browse the repository at this point in the history
  • Loading branch information
brimoor committed Sep 26, 2024
1 parent d1e87d6 commit 0bd963e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 12 deletions.
36 changes: 26 additions & 10 deletions docs/source/plugins/developing_plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1773,12 +1773,11 @@ in the App.
Panels can be defined in either Python or JS, and FiftyOne comes with a
number of :ref:`builtin panels <plugins-design-panels>` for common tasks.

Depending on the ``surfaces`` panel config, panels can be scoped to either
the grid or the modal. You can open these panels from the "+" menu, which
is available in both the grid and modal views. Whereas grid panels enable
extensibility at the macro level, allowing you to work with entire datasets,
modal panels provide extensibility at the micro level, focusing on individual
samples and scenarios.
Panels can be scoped to the App's grid view or modal view via their
:ref:`config <panel-config>`. Grid panels enable extensibility at the macro
level, allowing you to work with entire datasets or views, while modal panels
provide extensibility at the micro level, focusing on individual samples and
scenarios.

Panels, like :ref:`operators <developing-operators>`, can make use of the
:mod:`fiftyone.operators.types` module and the
Expand Down Expand Up @@ -1837,10 +1836,9 @@ subsequent sections.
# Whether to allow multiple instances of the panel to be opened
allow_multiple=False,
# Whether the panel should be available in the grid view
# modal view, or both
# Whether the panel should be available in the grid, modal, or both
# Possible values: "grid", "modal", "grid modal"
surfaces="grid modal" # default = "grid"
surfaces="grid", # default = "grid"
# Markdown-formatted text that describes the panel. This is
# rendererd in a tooltip when the help icon in the panel
Expand Down Expand Up @@ -2124,7 +2122,7 @@ Panel config

Every panel must define a
:meth:`config <fiftyone.operators.panel.Panel.config>` property that
defines its name, display name, and other optional metadata about its
defines its name, display name, surfaces, and other optional metadata about its
behavior:

.. code-block:: python
Expand All @@ -2148,8 +2146,26 @@ behavior:
# Whether to allow multiple instances of the panel to be opened
allow_multiple=False,
# Whether the panel should be available in the grid, modal, or both
# Possible values: "grid", "modal", "grid modal"
surfaces="grid", # default = "grid"
# Markdown-formatted text that describes the panel. This is
# rendererd in a tooltip when the help icon in the panel
# title is hovered over
help_markdown="A description of the panel",
)
The ``surfaces`` key defines the panel's scope:

- Grid panels can be accessed from the ``+`` button in the App's
:ref:`grid view <app-fields-sidebar>`, which allows you to build macro
experiences that work with entire datasets or views
- Modal panels can be accessed from the ``+`` button in the App's
:ref:`modal view <app-sample-view>`, which allows you to build interactions
that focus on individual samples and scenarios

.. _panel-execution-context:

Execution context
Expand Down
4 changes: 2 additions & 2 deletions docs/source/release-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ What's New

- The `FiftyOne Brain <https://github.com/voxel51/fiftyone-brain>`_ is now
fully open source. Contributions are welcome!
- Introducing Modal Panels, bringing the ability to develop and use panels in
the App's sample modal
- Added :ref:`Modal Panels <panel-config>`, bringing the ability to develop and
use panels in the App's sample modal
`#4625 <https://github.com/voxel51/fiftyone/pull/4625>`_
- All datasets now have :ref:`automatically populated <default-sample-fields>`
`created_at` and `last_modified_at` fields on their samples and frames
Expand Down

0 comments on commit 0bd963e

Please sign in to comment.