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

Make try examples button more prominent #2705

Merged
merged 3 commits into from
Nov 23, 2022
Merged

Conversation

aliabd
Copy link
Collaborator

@aliabd aliabd commented Nov 22, 2022

We've gotten feedback from several users that the Try Examples website in the docs is easy to miss. So I've made it more prominent.

  • If the object has an 'Example Usage' section, there will be a button under it named 'More Examples'
  • If the object doesn't have an 'Example Usage' section, there will be a greyed out div of the first demo's code with the button overlayed on top.

Feedback on styling and wording welcome. To see this just checkout the branch and run sh scripts/launch_website.sh

Screen.Recording.2022-11-22.at.3.04.39.PM.mov

@github-actions
Copy link
Contributor

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

@aliabd aliabd requested a review from abidlabs November 22, 2022 23:15
@lewtun
Copy link

lewtun commented Nov 23, 2022

This looks wonderful @aliabd!

Not related to this PR, but I think having an "Example Usage" section for most components would go a long way towards making the docs more intuitive / accessible (kind of how every model in transformers has a little example you can copy-paste and play with)

@aliabd
Copy link
Collaborator Author

aliabd commented Nov 23, 2022

Agreed @lewtun, we support that already on the website side, now just need to add it to the docstrings for the components that don't have it. Will get that in

@aliabd aliabd merged commit a433933 into main Nov 23, 2022
@aliabd aliabd deleted the aliabd/better-examples-view branch November 23, 2022 18:38
@abidlabs
Copy link
Member

Very nice @aliabd!

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