8000 enh: Add option to disable FileDropper previews by hoxbro · Pull Request #7944 · holoviz/panel · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

enh: Add option to disable FileDropper previews #7944

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

Merged
merged 3 commits into from
May 28, 2025

Conversation

hoxbro
Copy link
Member
@hoxbro hoxbro commented May 26, 2025

I had a case where I did not want to show a PDF after a file upload.

image

import panel as pn

pn.widgets.FileDropper(plugins=["image", "validate"], sizing_mode="stretch_width").servable()

Copy link
codecov bot commented May 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.08%. Comparing base (dec3707) to head (ce9b047).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7944      +/-   ##
==========================================
- Coverage   87.12%   87.08%   -0.04%     
==========================================
  Files         346      346              
  Lines       53225    53227       +2     
==========================================
- Hits        46372    46355      -17     
- Misses       6853     6872      +19     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hoxbro hoxbro force-pushed the enh_add_option_to_disable_plugins branch from 288ddbf to 0c466b6 Compare May 28, 2025 07:21
@hoxbro hoxbro requested a review from maximlt May 28, 2025 07:22
@hoxbro hoxbro force-pushed the enh_add_option_to_disable_plugins branch from 0c466b6 to de5b03f Compare May 28, 2025 07:22
@hoxbro hoxbro force-pushed the enh_add_option_to_disable_plugins branch from de5b03f to 013373a Compare May 28, 2025 07:25
@hoxbro hoxbro added this to the v1.7.1 milestone May 28, 2025
Copy link
Member
@maximlt maximlt left a comment

Choose a reason for hiding this comment

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

I know I've wanted that functionality at some point 👍

Just wondering if exposing it with plugins isn't leaking too much implementation details? How about calling it previews instead?

Also noting that disabling the plugins doesn't disable loading their front-end artifacts. I guess they need to be loaded up-front anyway in case you want to display another widget with these plugins.

@hoxbro
Copy link
Member Author
hoxbro commented May 28, 2025

Just wondering if exposing it with plugins isn't leaking too much implementation details? How about calling it previews instead?

100% agree. Will update.

@hoxbro hoxbro changed the title enh: Add option to disable FileDropper plugins enh: Add option to disable FileDropper previews May 28, 2025
@hoxbro hoxbro force-pushed the enh_add_option_to_disable_plugins branch from 458c9c6 to 7b9dd11 Compare May 28, 2025 07:52
@hoxbro hoxbro force-pushed the enh_add_option_to_disable_plugins branch from 7b9dd11 to ce9b047 Compare May 28, 2025 07:54
@hoxbro hoxbro requested a review from maximlt May 28, 2025 07:57
Copy link
Member
@maximlt maximlt left a comment

Choose a reason for hiding this comment

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

LGTM

@hoxbro hoxbro merged commit 1fd2573 into main May 28, 2025
14 of 18 checks passed
@hoxbro hoxbro deleted the enh_add_option_to_disable_plugins branch May 28, 2025 08:06
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.

2 participants
0