Closed hannahblair closed 3 weeks ago
• | Name | Status | URL |
---|---|---|---|
Spaces | Spaces preview | ||
Website | Website preview | ||
Storybook | Storybook preview | ||
:unicorn: | Changes | Details |
Install Gradio from this PR
pip install https://gradio-builds.s3.amazonaws.com/9848219b26d2ea569451bf596992800c41d08d1d/gradio-4.31.4-py3-none-any.whl
Install Gradio Python Client from this PR
pip install "gradio-client @ git+https://github.com/gradio-app/gradio@9848219b26d2ea569451bf596992800c41d08d1d#subdirectory=client/python"
Package | Version |
---|---|
@gradio/accordion |
patch |
gradio |
patch |
Add body color to
gr.Accordion
Maintainers or the PR author can modify the PR title to modify this entry.
This looks good but I think it'll probably break some user defined theme somewhere. Can we make this more tailored to the monochrome theme somehow? What came to my mind:
accordion_text_color
and accordion_text_color_dark
prop to the theme classbutton_primary_text_color
valueaccordion_text_color
is body_text_color
What do you think?
Demo is private @hannahblair
This looks good but I think it'll probably break some user defined theme somewhere. Can we make this more tailored to the monochrome theme somehow? What came to my mind:
- Add a
accordion_text_color
andaccordion_text_color_dark
prop to the theme class- By default, these prop values default to
button_primary_text_color
value- For monochrome,
accordion_text_color
isbody_text_color
What do you think?
thanks for the feedback! that's a good point. i've added a new accordion_text_color
+ -dark
prop but we can't use the button_primary_text_color
else we'll get this in light mode:
I've used body_text_color
as the default, but this still creates a breaking change I think.
Description
We've got a variable
button_primary_text_color="white"
inmonochrome.py
which causes the button text color in the Accordion to be white in monochrome themes. To prevent any breaking changes, I've set the text color inAccordion.svelte
tobody_text_color
to fix this (as opposed to changing the value of that var). I can't see where this is an issue in other components at first glance.Demo here
Closes: #8255
🎯 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
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
You may need to run the linters:
bash scripts/format_backend.sh
andbash scripts/format_frontend.sh