Skip to content

Improve CSS token documentation in Storybook #6399

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

Merged
merged 28 commits into from
Dec 8, 2023
Merged

Conversation

hannahblair
Copy link
Collaborator

@hannahblair hannahblair commented Nov 13, 2023

Description

This PR adds a few more stories with the css variables we use. It also removes hardcoded widths and heights for any icons and moves that sizing to their respective component. This improves the icons story a bit more.

🎯 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
Collaborator

gradio-pr-bot commented Nov 13, 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

Install Gradio from this PR

pip install https://gradio-builds.s3.amazonaws.com/19c5c408c7de4add1e46385ab492eb1eac4e7dd8/gradio-4.8.0-py3-none-any.whl

Install Gradio Python Client from this PR

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

@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented Nov 13, 2023

🦄 change detected

This Pull Request includes changes to the following packages.

Package Version
@gradio/chatbot patch
@gradio/dropdown patch
@gradio/icons patch
@gradio/image patch
@gradio/row patch
gradio patch
  • Maintainers can select this checkbox to manually select packages to update.

With the following changelog entry.

Improve CSS token documentation in Storybook

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.

@hannahblair hannahblair self-assigned this Nov 13, 2023
@hannahblair hannahblair changed the title Improve CSS var documentation in Storybook Improve CSS token documentation in Storybook Nov 13, 2023
@hannahblair hannahblair marked this pull request as ready for review December 7, 2023 17:33
@abidlabs abidlabs added the v: patch A change that requires a patch release label Dec 7, 2023
@abidlabs
Copy link
Member

abidlabs commented Dec 7, 2023

@hannahblair can you explain the addition of the ShadowRow and TokenRow -- what do they achieve?

A few things I was unsure about:

  1. In the Shadows section, there's a box with "Gradio" written in it. Clicking on it copies the token, but that's not super intuitive to me:
image
  1. In the Row Layout, I think there should be two images side by side, but none show up:
image

@hannahblair
Copy link
Collaborator Author

@hannahblair can you explain the addition of the ShadowRow and TokenRow -- what do they achieve?

A few things I was unsure about:

  1. In the Shadows section, there's a box with "Gradio" written in it. Clicking on it copies the token, but that's not super intuitive to me:
image 2. In the Row Layout, I think there should be two images side by side, but none show up: image

Ah the trusty groot file is broken now! I've replaced the broken link with an image from our AWS bucket in the Row story and a couple others. I also meant to remove the Shadows story and the TokenRow component; they're not needed now as we'll take a more user friendly approach to documenting these css vars.

@hannahblair hannahblair merged commit 053bec9 into main Dec 8, 2023
@hannahblair hannahblair deleted the storybook-icons branch December 8, 2023 15:23
@pngwn pngwn mentioned this pull request Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v: patch A change that requires a patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants