Skip to content
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

Find better name for the Panel classes #1

Closed
philippjfr opened this issue Aug 27, 2018 · 3 comments
Closed

Find better name for the Panel classes #1

philippjfr opened this issue Aug 27, 2018 · 3 comments

Comments

@philippjfr
Copy link
Member

After discussing the organization of the panel library we decided that the PanelBase class and its subclass are misnamed. This is because we all agreed that the concept of a panel more accurately describes the combination of several components, e.g. a set of widgets with some associated plot.

The class name for the classes that currently inherit from PanelBase should convey the idea that it is a viewable and reactive object that wraps some other object and displays it as part of some larger panel.

Names that we have considered (and so far rejected):

  • SubPanel

CC: @jbednar @ceball @jlstevens

@jbednar
Copy link
Member

jbednar commented Aug 27, 2018

The class name for the classes that currently inherit from PanelBase should convey the idea that it is a viewable and reactive object that wraps some other object and displays it as part of some larger panel

I agree with all this, except that "displays it as part of some larger panel" is not a defining feature; it's something that can be done, but is in no way required. Just wrapping up an mpl figure as something that displays itself is already a meaningful action, whether or not the result ends up in a panel. That's why I don't like SubPanel.

How about Pane?

@jlstevens
Copy link
Contributor

Pane seems to be the best suggestion so far though View and Viewport were also suggested.

@jbednar
Copy link
Member

jbednar commented Aug 31, 2018

I'm happy with Pane or View, with a slight preference for Pane because it is not as heavily overloaded as View (even though "view" is quite accurate).

I vote for @philippjfr just choosing one of the options, renaming panels.py to e.g. pane.py, and then removing "Panel" from all of the class names. That way I can do:

from panel import pane

pane.Matplotlib(fig)
pane.HTML(df.head(), height=200)

These classes don't always have to be used, but I do finding myself having to import them fairly often, and names like HTMLPanel aren't particularly readable...

maximlt added a commit that referenced this issue Oct 1, 2022
philippjfr pushed a commit that referenced this issue Oct 3, 2022
philippjfr added a commit that referenced this issue Oct 4, 2022
* attempt #1

* Install doc requirements manually

* Pin myst-nb

* Pin myst-parser

* Pin older myst-parser

Co-authored-by: Philipp Rudiger <prudiger@anaconda.com>
MarcSkovMadsen added a commit that referenced this issue Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants