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
Convert Docs Demos to Lite #7661
Conversation
🪼 branch checks and previews
Install Gradio from this PR pip install https://gradio-builds.s3.amazonaws.com/6133642fee8330a87fb12029d556a7867e55512d/gradio-4.22.0-py3-none-any.whl Install Gradio Python Client from this PR pip install "gradio-client @ git+https://github.com/gradio-app/gradio@6133642fee8330a87fb12029d556a7867e55512d#subdirectory=client/python" |
🦄 change detectedThis Pull Request includes changes to the following packages.
With the following changelog entry.
Maintainers or the PR author can modify the PR title to modify this entry.
|
This looks awesome @aliabd! Thanks for through and updating the demos as well I just noticed two small issues:
Ideally, we include both the copy and download buttons that are present in the regular Neither of these are blockers. In particular, for the 2nd one, perhaps it'd be good to have a separate PR that updates the If so, I'd also suggest a few other things I noticed:
|
Thanks @abidlabs for the detailed feedback!
I agree with all your suggestions, and had thought about some independently while I was making the PR. Def wanna change the design a bit more. Anyway will make a PR that:
|
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.
🔥🔥🔥🔥
Dope! What was the fix for (1)?
shared-worker mode! cc @whitphx |
Converts the demos on the docs to use the lite playground element instead of embedding from spaces.
This is what it looks like:
lite-docs.mp4
I removed/replaced the demos that won't work with lite. Please test them out on the preview (make sure you're on main!)
I also overided some small styling on the playground element, for example i don't think side by side works with this amount of space, so I used css to force code editor to be on top of preview (where it normally does that at <md breakpoint). I can clean this up on the Playground element in the future once i'm sure about the styling. I actually have a few other things i'd like to change as well.
There are still a lot of demos on the website that embed from spaces (guides, landing page, embedded components in docs, etc) but this is a good place to start.
Also so that there aren't any broken demos on /docs when this is merged, I kept those embedding from spaces for now. So only /main/docs uses lite. This is because some of the demos on the released version don't work with lite. Right before the next release I can undo the changes in this commit and those will be lite too.