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 scroll options to permanently toggle on scrollbar #6266

Merged
merged 10 commits into from
Feb 5, 2024

Conversation

ahuang11
Copy link
Contributor

@ahuang11 ahuang11 commented Jan 23, 2024

Adds option to permanently turn on scroll in direction(s), like for use in pn.Feed to prevent the layout from bouncing around if objects are added / removed.

import panel as pn

col = pn.Column(
    pn.Spacer(styles=dict(background='red'), width=200, height=200),
    pn.Spacer(styles=dict(background='green'), width=200, height=200),
    pn.Spacer(styles=dict(background='blue'), width=200, height=200),
    scroll="y", height=1000
)
col.servable()
image

@ahuang11 ahuang11 changed the title Add scroll options Add scroll options to permanently toggle on scrollbar Jan 23, 2024
panel/layout/base.py Outdated Show resolved Hide resolved
panel/layout/base.py Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jan 24, 2024

Codecov Report

Attention: 23 lines in your changes are missing coverage. Please review.

Comparison is base (4689f9f) 82.66% compared to head (c83f297) 71.63%.

Files Patch % Lines
panel/layout/base.py 29.41% 12 Missing ⚠️
panel/tests/ui/layout/test_column.py 0.00% 11 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #6266       +/-   ##
===========================================
- Coverage   82.66%   71.63%   -11.04%     
===========================================
  Files         305      305               
  Lines       45429    45440       +11     
===========================================
- Hits        37552    32549     -5003     
- Misses       7877    12891     +5014     
Flag Coverage Δ
ui-tests ?
unitexamples-tests 71.63% <17.85%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@philippjfr philippjfr merged commit ed34b1c into main Feb 5, 2024
12 of 15 checks passed
@philippjfr philippjfr deleted the add_scroll_options branch February 5, 2024 19:26
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

Successfully merging this pull request may close these issues.

3 participants