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

ensure gr.Dataframe updates as expected #6290

Merged
merged 5 commits into from Nov 3, 2023
Merged

ensure gr.Dataframe updates as expected #6290

merged 5 commits into from Nov 3, 2023

Conversation

pngwn
Copy link
Member

@pngwn pngwn commented Nov 3, 2023

Description

Closes #6252.

Silly omissions when refactoring. Also fixed a weird bug that didn't really make sense to me but seems to work ok now.

Closes: #(issue)

🎯 PRs Should Target Issues

Before your create a PR, please check to see if there is an existing issue for this change. If not, please create an issue before you create this PR, unless the fix is very small.

Not adhering to this guideline will result in the PR being closed.

Tests

  1. PRs will only be merged if tests pass on CI. To run the tests locally, please set up your Gradio environment locally and run the tests: bash scripts/run_all_tests.sh

  2. You may need to run the linters: bash scripts/format_backend.sh and bash scripts/format_frontend.sh

@gradio-pr-bot
Copy link
Contributor

gradio-pr-bot commented Nov 3, 2023

🪼 branch checks and previews

Name Status URL
Spaces ready! Spaces preview
Website ready! Website preview
Storybook ready! Storybook preview
Visual tests all good! Build review
🦄 Changes detected! Details
📓 Notebooks matching!

Install Gradio from this PR

pip install https://gradio-builds.s3.amazonaws.com/89510ec549e9320cef9043d7c18360660cab29dd/gradio-4.1.0-py3-none-any.whl

Install Gradio Python Client from this PR

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

@pngwn
Copy link
Member Author

pngwn commented Nov 3, 2023

unit test would have caught this, i don't have time to write one now but i'll add it to the list.

@gradio-pr-bot
Copy link
Contributor

gradio-pr-bot commented Nov 3, 2023

🦄 change detected

This Pull Request includes changes to the following packages.

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

With the following changelog entry.

ensure gr.Dataframe updates as expected

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.

@@ -99,6 +99,7 @@
{col_count}
{value}
{headers}
on:change={(e) => (value = e.detail)}
Copy link
Member

Choose a reason for hiding this comment

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

Ah!!!

Copy link
Member Author

Choose a reason for hiding this comment

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

yeee

Copy link
Member Author

Choose a reason for hiding this comment

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

very upsetting that it took me so long to find it tbh. i guess you often miss the obvious stuff.

Copy link
Member

Choose a reason for hiding this comment

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

I spent a couple hours trying different things so I feel like you got it pretty fast 😄

@pngwn pngwn changed the title ensure Dataframe updates as expected ensure gr.Dataframe updates as expected Nov 3, 2023
@abidlabs
Copy link
Member

abidlabs commented Nov 3, 2023

Wait hmm I'm not sure if this fixed it for me

@pngwn
Copy link
Member Author

pngwn commented Nov 3, 2023

hmmmm

@abidlabs
Copy link
Member

abidlabs commented Nov 3, 2023

The issue I'm seeing is that if I change the value of a cell and blur, it reverts to the original value

@pngwn
Copy link
Member Author

pngwn commented Nov 3, 2023

well

@pngwn
Copy link
Member Author

pngwn commented Nov 3, 2023

i wonder if i broke that with my fix

@abidlabs
Copy link
Member

abidlabs commented Nov 3, 2023

Well in one sense the original bug is now fixed since you can't change the value of the dataframe at all 😆

@abidlabs
Copy link
Member

abidlabs commented Nov 3, 2023

But yeah I think the blur changes are breaking something

@pngwn
Copy link
Member Author

pngwn commented Nov 3, 2023

yeh, i broke it sec.

@pngwn
Copy link
Member Author

pngwn commented Nov 3, 2023

okay that should do it, there is a small bug around clicking but i think we should get this out now and fix the click bug later. It isn't too awful.

@pngwn
Copy link
Member Author

pngwn commented Nov 3, 2023

Filed an issue: #6291

@abidlabs
Copy link
Member

abidlabs commented Nov 3, 2023

LGTM @pngwn!

@pngwn pngwn merged commit e8216be into main Nov 3, 2023
21 of 22 checks passed
@pngwn pngwn deleted the 6252-df branch November 3, 2023 22:33
@pngwn pngwn mentioned this pull request Nov 3, 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.

Gradio.Dataframe does no longer properly pass values updated in the GUI when used as input from version 4
3 participants