Theme builder fixes (#4080)

* theme-builder-fixes

* theme-builder-fixes

* fix expand issue

* changes

* Update gradio/themes/builder_app.py

* changelog

---------

Co-authored-by: Ali Abid <aabid94@gmail.com>
This commit is contained in:
Abubakar Abid 2023-05-06 08:15:41 -05:00 committed by GitHub
parent 4c314c3d88
commit de7b35adfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -6,6 +6,7 @@
## Bug Fixes:
- Fixes the gradio theme builder error that appeared on launch by [@aliabid94](https://github.com/aliabid94) and [@abidlabs](https://github.com/abidlabs) in [PR 4080](https://github.com/gradio-app/gradio/pull/4080)
- Keep Accordion content in DOM by [@aliabid94](https://github.com/aliabid94) in [PR 4070](https://github.com/gradio-app/gradio/pull/4073)
- Fixed bug where type hints in functions caused the event handler to crash by [@freddyaboulton](https://github.com/freddyaboulton) in [PR 4068](https://github.com/gradio-app/gradio/pull/4068)
- Fix dropdown default value not appearing by [@aliabid94](https://github.com/aliabid94) in [PR 4072](https://github.com/gradio-app/gradio/pull/4072).

View File

@ -25,6 +25,6 @@ __all__ = [
def builder(*args, **kwargs):
from gradio.themes.builder import demo
from gradio.themes.builder_app import demo
return demo.launch(*args, **kwargs)

View File

@ -537,7 +537,7 @@ with gr.Blocks( # noqa: SIM117
+ radius_size.expand()
+ pad_to_4([f.name for f in font])
+ pad_to_4(font_is_google)
+ pad_to_4(font_mono)
+ pad_to_4([f.name for f in font_mono])
+ pad_to_4(font_mono_is_google)
+ var_output
)
@ -610,7 +610,7 @@ with gr.Blocks( # noqa: SIM117
final_attr_values = {}
diff = False
for attr in dir(source_obj):
if attr in ["all", "name"] or attr.startswith("_"):
if attr in ["all", "name", "expand"] or attr.startswith("_"):
continue
final_theme_attr = (
value_name.split("_")[0]