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

Fix the behavior of gr.LoginButton locally and on Spaces #9659

Merged
merged 15 commits into from
Oct 16, 2024
Merged

Conversation

abidlabs
Copy link
Member

@abidlabs abidlabs commented Oct 10, 2024

Closes: #9650

Also changes the fixes the styling of the gr.LoginButton as it was not showing up correctly

Test here: https://huggingface.co/spaces/abidlabs/login5?logs=build

@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented Oct 10, 2024

🪼 branch checks and previews

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

Install Gradio from this PR

pip install https://gradio-pypi-previews.s3.amazonaws.com/21a46dd3f0fa4ecb5646cc22eba90439f5cf99c9/gradio-5.1.0-py3-none-any.whl

Install Gradio Python Client from this PR

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

Install Gradio JS Client from this PR

npm install https://gradio-npm-previews.s3.amazonaws.com/21a46dd3f0fa4ecb5646cc22eba90439f5cf99c9/gradio-client-1.6.0.tgz

Use Lite from this PR

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

@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented Oct 10, 2024

🦄 change detected

This Pull Request includes changes to the following packages.

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

With the following changelog entry.

Fix the behavior of gr.LoginButton locally and on Spaces

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.

@abidlabs abidlabs changed the title Fix gr.LoginButotn Fix gr.LoginButton Oct 10, 2024
@hannahblair hannahblair self-requested a review October 11, 2024 23:01
@davidberenstein1957
Copy link
Contributor

@abidlabs , does this also cover non-space logins? The login does not seem to work locally either.

@abidlabs
Copy link
Member Author

Hi @davidberenstein1957 yup it will

@abidlabs abidlabs changed the title Fix gr.LoginButton Fix the behavior of gr.LoginButton locally and on Spaces Oct 15, 2024
border: var(--button-border-width) solid
var(--button-secondary-border-color);
background: var(--background-fill-primary);
background: black;
Copy link
Member Author

Choose a reason for hiding this comment

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

The "huggingface" variant should not change depending on the theme, in order to preserve the Hugging Face branding

@abidlabs abidlabs marked this pull request as ready for review October 15, 2024 17:23
@abidlabs
Copy link
Member Author

Should be ready for review, cc @apolinario

Copy link
Collaborator

@freddyaboulton freddyaboulton left a comment

Choose a reason for hiding this comment

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

Python changes look good!

Though the white button on dark mode looks off to me

image

@abidlabs
Copy link
Member Author

Thanks for the review @freddyaboulton, update the style, see screenshots here.

@freddyaboulton
Copy link
Collaborator

Thanks for the fix!

Copy link
Collaborator

@hysts hysts left a comment

Choose a reason for hiding this comment

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

LGTM!

@abidlabs
Copy link
Member Author

Thanks @freddyaboulton @hysts @aliabid94 for the review and feedback!

@abidlabs abidlabs merged commit b1a0f6d into main Oct 16, 2024
19 of 23 checks passed
@abidlabs abidlabs deleted the fix-login branch October 16, 2024 05:13
Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

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

Much more robust, thanks @abidlabs for fixing this!

@CISC CISC mentioned this pull request Oct 23, 2024
1 task
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.

gr.LoginButton not working with Gradio 5 on HF Spaces
6 participants