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

Independent scrolling of the code editor in an embedded Lite app in the playground mode #10575

Merged
merged 12 commits into from
Feb 20, 2025

Conversation

whitphx
Copy link
Member

@whitphx whitphx commented Feb 12, 2025

Description

When the editor is scrolled, the app is also moved, which is annoying.

main This PR

Still WIP as there are some cases where it doesn't work as expected. Done

@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented Feb 12, 2025

🪼 branch checks and previews

Name Status URL
Spaces ready! Spaces preview
Storybook ready! Storybook preview
🦄 Changes detected! Details

Install Gradio from this PR

pip install https://gradio-pypi-previews.s3.amazonaws.com/86b3719433c1221d427ef499f8c7833a559e58b4/gradio-5.16.2-py3-none-any.whl

Install Gradio Python Client from this PR

pip install "gradio-client @ git+https://github.com/gradio-app/gradio@86b3719433c1221d427ef499f8c7833a559e58b4#subdirectory=client/python"

Install Gradio JS Client from this PR

npm install https://gradio-npm-previews.s3.amazonaws.com/86b3719433c1221d427ef499f8c7833a559e58b4/gradio-client-1.12.0.tgz

Use Lite from this PR

<script type="module" src="https://gradio-lite-previews.s3.amazonaws.com/86b3719433c1221d427ef499f8c7833a559e58b4/dist/lite.js""></script>

@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented Feb 12, 2025

🦄 change detected

This Pull Request includes changes to the following packages.

Package Version
@gradio/lite minor
  • Maintainers can select this checkbox to manually select packages to update.

With the following changelog entry.

Independent scrolling of the code editor in an embedded Lite app in the playground mode

Maintainers or the PR author can modify the PR title to modify this entry.

Something isn't right?

  • Maintainers can change the version label to modify the version bump.
  • If the bot has failed to detect any changes, or if this pull request needs to update multiple packages to different versions or requires a more comprehensive changelog entry, maintainers can update the changelog file directly.

@whitphx whitphx changed the title Lite playground independent scroll Independent scrolling of the code editor in an embedded Lite app in the playground mode Feb 17, 2025
@whitphx whitphx marked this pull request as ready for review February 17, 2025 16:38
@whitphx whitphx requested review from aliabid94 and aliabd February 17, 2025 16:38
Copy link
Collaborator

@aliabd aliabd left a comment

Choose a reason for hiding this comment

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

Thanks @whitphx, this makes sense and is a good idea. Right now though the changes only seem to work if the layout is explicitly set to "horizontal". and not when no layout is set.

Not a big deal though would just have to change the layout variable in Playground.svelte to default to "horizontal" instead of null

@whitphx
Copy link
Member Author

whitphx commented Feb 20, 2025

Thanks I didn't care that case, I pushed a fix.

@abidlabs
Copy link
Member

Cool merging in for the release!

@abidlabs abidlabs merged commit 866780a into main Feb 20, 2025
24 checks passed
@abidlabs abidlabs deleted the lite-playground-independent-scroll branch February 20, 2025 20:14
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.

6 participants