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

Add a settings link to the footer with i18n options & pwa instructions #10254

Merged
merged 33 commits into from
Dec 30, 2024

Conversation

abidlabs
Copy link
Member

@abidlabs abidlabs commented Dec 25, 2024

Adds a new Settings link in the footer:

image

Clicking on the Settings link opens up a page that allows toggling the theme, localization, and pwa installation instructions:

image

While I was at it, I also went through and filled in many of the missing entries in our i18n translation files (thanks Claude!) in 35f8706.

Closes: #655, Closes: #785

@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented Dec 25, 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/21aa7172558d2278428bf1cf38517eca3ce1b1dd/gradio-5.9.1-py3-none-any.whl

Install Gradio Python Client from this PR

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

Install Gradio JS Client from this PR

npm install https://gradio-npm-previews.s3.amazonaws.com/21aa7172558d2278428bf1cf38517eca3ce1b1dd/gradio-client-1.8.0.tgz

Use Lite from this PR

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

@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented Dec 25, 2024

🦄 change detected

This Pull Request includes changes to the following packages.

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

With the following changelog entry.

Add a settings link to the footer with i18n options & pwa instructions

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 Add a settings link to the footer Add a settings link to the footer with i18n options & pwa instructions Dec 25, 2024
Copy link
Member

@whitphx whitphx left a comment

Choose a reason for hiding this comment

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

I tested it locally and it LGTM, thanks!

@aliabid94
Copy link
Collaborator

where are all the json language changes coming from?

@aliabid94
Copy link
Collaborator

Visual feedback:

  • Setting icon looks strange. I think the whole icon should just be gray, and lighter in tone.
  • The footer gets bunch up on phone-size screens. Consider hiding on smaller screen?
Screenshot 2024-12-30 at 12 04 58 PM
  • Think we can remove the language text, its self explanatory and takes up space. "Gradio automatically detects the language of your browser. You can also choose a language manually:

Copy link
Collaborator

@aliabid94 aliabid94 left a comment

Choose a reason for hiding this comment

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

lgtm! left some visual comments

@abidlabs
Copy link
Member Author

Setting icon looks strange. I think the whole icon should just be gray, and lighter in tone.

Made it entirely gray. Lighter looked off to me, so kept the same shade of gray though.

The footer gets bunch up on phone-size screens. Consider hiding on smaller screen?

Good catch. I actually think it makes more sense to hide the API link on mobile. Here's what it looks like now on mobile:

image

@abidlabs
Copy link
Member Author

Think we can remove the language text, its self explanatory and takes up space. "Gradio automatically detects the language of your browser. You can also choose a language manually

Done!

@abidlabs abidlabs enabled auto-merge (squash) December 30, 2024 21:02
@abidlabs abidlabs merged commit da07707 into main Dec 30, 2024
23 checks passed
@abidlabs abidlabs deleted the expand-footer branch December 30, 2024 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants