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

param types vs panel widgets #620

Closed
poplarShift opened this issue Aug 25, 2019 · 4 comments · Fixed by #3173
Closed

param types vs panel widgets #620

poplarShift opened this issue Aug 25, 2019 · 4 comments · Fixed by #3173
Assignees
Labels
type: docs Related to the Panel documentation and examples

Comments

@poplarShift
Copy link
Contributor

The docs (https://panel.pyviz.org/user_guide/Param.html) tell us that

internally Panel maintains a mapping between parameter types and widget types.

I think it would be helpful if we could explicitly list this mapping in the docs, i.e. which widget a given param type is translated to.

@poplarShift poplarShift added the TRIAGE Default label for untriaged issues label Aug 25, 2019
@philippjfr philippjfr added type: docs Related to the Panel documentation and examples and removed TRIAGE Default label for untriaged issues labels Aug 26, 2019
@jbednar
Copy link
Member

jbednar commented Aug 29, 2019

Sounds like a good idea. Rather than list the actual mapping, which would probably quickly go out of date, we should probably just explain how to list what the mapping is. E.g. this would currently work from the command line:

python -c 'from panel.param import Param ; print(Param._mapping)'

But that's accessing a private class attribute, so maybe we should provide a public method for showing the current mapping.

@maximlt maximlt self-assigned this Apr 29, 2020
@maximlt
Copy link
Member

maximlt commented May 1, 2020

Hi!
I believe that it'd be indeed useful to have access to this private mapping and to document how to access it. I've had to dig the code a few times to try to understand why I was getting such that widget for that type of parameter.

Could it be as simple as panel.param.mapping() returning _mapping ?

@philippjfr
Copy link
Member

philippjfr commented May 3, 2020

Yeah, making panel.Param.mapping public is fine with me.

@MarcSkovMadsen
Copy link
Collaborator

Just fyi. When i have a package of material widgets i would really like to be able to also Update the mapping.

I think that would be a future use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: docs Related to the Panel documentation and examples
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants