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

the original demo would fail after switching to the 3rd tab once, by … #2971

Merged
merged 2 commits into from
Jan 13, 2023

Conversation

TashaSkyUp
Copy link
Contributor

@TashaSkyUp TashaSkyUp commented Jan 12, 2023

Description

the original demo would fail after switching to the 3rd tab once, by not returning to it again when directed to.

It appears that somewhere in tabs, that selected is not being updated when a tabitem is selected.

relevant motivation:

  • to be able to change to and fro any tab I would like programmatically

a summary of the change

  • updates gr.Tabs state to reflect the currently selected tab after gr.Tabs.update(selected)-

which issue is fixed.

  • not being able to activate the tab programmatically again if you select some other tab with the mouse first.

any additional dependencies that are required for this change.

Closes: # (issue)

Checklist:

  • I have performed a self-review of my own code
  • I have added a short summary of my change to the CHANGELOG.md
  • My code follows the style guidelines of this project
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

A note about the CHANGELOG

Hello 👋 and thank you for contributing to Gradio!

All pull requests must update the change log located in CHANGELOG.md, unless the pull request is labeled with the "no-changelog-update" label.

Please add a brief summary of the change to the Upcoming Release > Full Changelog section of the CHANGELOG.md file and include
a link to the PR (formatted in markdown) and a link to your github profile (if you like). For example, "* Added a cool new feature by [@myusername](link-to-your-github-profile) in [PR 11111](https://github.com/gradio-app/gradio/pull/11111)".

If you would like to elaborate on your change further, feel free to include a longer explanation in the other sections.
If you would like an image/gif/video showcasing your feature, it may be best to edit the CHANGELOG file using the
GitHub web UI since that lets you upload files directly via drag-and-drop.

…not returning to it again when directed to.

it appears that somewhere in tabs, that selected is not being updated when a tabitem is selected.
@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented Jan 13, 2023

🎉 The demo notebooks match the run.py files! 🎉

@gradio-pr-bot
Copy link
Collaborator

All the demos for this PR have been deployed at https://huggingface.co/spaces/gradio-pr-deploys/pr-2971-all-demos

@freddyaboulton
Copy link
Collaborator

Hi @TashaSkyUp thank you for the contribution! This looks good to me and I verified it fixes the problem. Can you please add an entry to the changelog and regenerate the demo ipynb files? I will merge afterwards!

@TashaSkyUp
Copy link
Contributor Author

@freddyaboulton Thanks, unfortunately I just don't have the time to setup the full development environment. But I'll try to get around to updating the ipynb files manually

@freddyaboulton
Copy link
Collaborator

No worries @TashaSkyUp ! I made the modifications to your branch. Thanks for the contribution!

@freddyaboulton freddyaboulton merged commit 94c9512 into gradio-app:main Jan 13, 2023
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.

3 participants