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

Add alphabetical and custom sort to Param #2986

Merged
merged 5 commits into from Dec 23, 2021
Merged

Add alphabetical and custom sort to Param #2986

merged 5 commits into from Dec 23, 2021

Conversation

MarcSkovMadsen
Copy link
Collaborator

Addresses #2985

image

panel/param.py Outdated Show resolved Hide resolved
@MarcSkovMadsen
Copy link
Collaborator Author

MarcSkovMadsen commented Dec 7, 2021

Example from issue

Much easier to find something 😄

image

import panel as pn
import numpy as np
import holoviews as hv

pn.extension(sizing_mode="stretch_width")

template = pn.template.FastListTemplate(
    site="Awesome Panel", title="New Accent Color",
    main=[pn.widgets.Button(name="Click Me", button_type="primary")],
)
pn.Param(template, sorted=True).servable()

panel/param.py Outdated Show resolved Hide resolved
panel/param.py Outdated Show resolved Hide resolved
panel/param.py Outdated Show resolved Hide resolved
Copy link
Member

@philippjfr philippjfr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, I requested a few changes but overall I'll be very happy with this.

@MarcSkovMadsen
Copy link
Collaborator Author

Thanks for your comments @philippjfr . I've fixed and pushed.

There is one test failure. But I cannot see it should be related to these changes.

image

Please let know if I should do more. Thanks.

Copy link
Member

@jbednar jbednar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool, thanks!

@maximlt
Copy link
Member

maximlt commented Dec 23, 2021

The failed test was due to a corrupted dev release of holoviews (my bad!). This had been fixed very quickly. @MarcSkovMadsen feel free to push an empty commit to rerun the test suite.

@philippjfr
Copy link
Member

I've just restarted the test suite.

@codecov
Copy link

codecov bot commented Dec 23, 2021

Codecov Report

Merging #2986 (d87cb73) into master (09bab95) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2986      +/-   ##
==========================================
+ Coverage   83.25%   83.27%   +0.02%     
==========================================
  Files         190      190              
  Lines       24971    25001      +30     
==========================================
+ Hits        20789    20819      +30     
  Misses       4182     4182              
Impacted Files Coverage Δ
panel/param.py 87.01% <100.00%> (+0.17%) ⬆️
panel/tests/test_param.py 99.88% <100.00%> (+<0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 09bab95...d87cb73. Read the comment docs.

@maximlt
Copy link
Member

maximlt commented Dec 23, 2021

Thanks @philippjfr, I always forget that the CI can be rerun (there should be a more obvious button but maybe that's intentional).

@philippjfr philippjfr merged commit f698aeb into master Dec 23, 2021
@philippjfr philippjfr deleted the sorted-param branch December 23, 2021 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants