-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Fix the embedded Lite apps in the docs #10488
Conversation
…-js.md to display the embedded Gradio-Lite apps properly
🪼 branch checks and previews
Install Gradio from this PR pip install https://gradio-pypi-previews.s3.amazonaws.com/211698e5d98fcc8ed556c565ae9ff76484e78163/gradio-5.14.0-py3-none-any.whl Install Gradio Python Client from this PR pip install "gradio-client @ git+https://github.com/gradio-app/gradio@211698e5d98fcc8ed556c565ae9ff76484e78163#subdirectory=client/python" Install Gradio JS Client from this PR npm install https://gradio-npm-previews.s3.amazonaws.com/211698e5d98fcc8ed556c565ae9ff76484e78163/gradio-client-1.10.0.tgz Use Lite from this PR <script type="module" src="https://gradio-lite-previews.s3.amazonaws.com/211698e5d98fcc8ed556c565ae9ff76484e78163/dist/lite.js""></script> |
🦄 no changes detectedThis Pull Request does not include changes to any packages.__No changes detected. __
|
I assume this is ready for a review @whitphx? |
You are right, sorry I forgot to switch the state. |
@whitphx 6bb14ca is fine but the other refactoring doesn't work. I think its a race condition and the lite.js gets loaded after the lite element is added to the dom, which makes it miss it somehow. You can see this here: https://eeca3c64.gradio-website.pages.dev/main/docs/gradio/interface#demos (refresh a couple of times) But that's why i did it in the afterNavigate |
@aliabd Thank you! |
This reverts commit 2178f48.
@aliabd Sorry i just reverted the second commit. Plz give a review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM @whitphx, i think you're right that we should eventually fix this so users don't have to deal with it. but fair to do this in the future.
Awesome I'm going to enable auto-merge so we can get this for the release |
Description
The embedded

<gradio-lite>
apps' style is broken as below, and 6bb14ca fixes it.2178f48 is a related refactoring: I found that each component is loading
lite.css
in each Svelte file (and 6bb14ca did the same in the document markdown file), solite.js
should also be loaded by each component, instead of being loaded globally in+layout.svelte
.