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

Progress Bar Styling Not Rendering due to CORS #6924

Open
contang0 opened this issue Jun 14, 2024 · 0 comments
Open

Progress Bar Styling Not Rendering due to CORS #6924

contang0 opened this issue Jun 14, 2024 · 0 comments

Comments

@contang0
Copy link

I am having the same issue described here. Basically in some environments we cannot access external resources necessary to style some components, such as the Progress bar. Without styling it appears so narrow that I can barely see it, and nothing worked until I manually fed the 4 CSS files as strings to the stylesheets argument.

loading = # contents of "https://cdn.holoviz.org/panel/1.2.0/dist/css/loading.css" as string
progress = # contents of "https://cdn.holoviz.org/panel/1.2.0/dist/css/progress.css" as string
default = # contents of "https://cdn.holoviz.org/panel/1.2.0/dist/bundled/theme/default.css" as string
native = # contents of "https://cdn.holoviz.org/panel/1.2.0/dist/bundled/theme/native.css" as string

progress= pn.indicators.Progress(
          name="Progress",
          width=500,
          active=False,
          stylesheets=[loading, progress, default, native],
      )

ALL software version info

(this library, plus any other relevant software, e.g. bokeh, python, notebook, OS, browser, etc)

panel v1.4.4
python v3.12
chrome
windows 11

Description of expected behavior and the observed behavior

Please see the screenshots

Complete, minimal, self-contained example code that reproduces the issue

import panel as pn
from bokeh import resources
from bokeh.io import output_notebook

r = resources.Resources(mode='inline')

output_notebook(r)
pn.extension()

pn.indicators.Progress(name='Progress', value=20, width=200)

Screenshots or screencasts of the bug in action

With CSS styling added manually:

image

Without styling:

image

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

1 participant