-
Notifications
You must be signed in to change notification settings - Fork 139
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
WithTheme doesn't seem to change the theme #100
Comments
Thanks so much for reporting this issue @dfalgout, I will take a look. |
@dfalgout I had the same issue and workaround was to define the form myself, set form theme then add the widget to the form |
Off the cuff, I'd guess that this is only happening on one-off elements, i.e. huh.NewMultiSelect().
WithTheme(customTheme()).
Run() Whereas the following works in my testing: huh.NewForm().
WithTheme(customTheme()).
Run() |
my guess its a similar problem to #97 |
This is indeed semi-specific to using fields directly, but it's only because they use the global In order from call site: Line 425 in 355812c
Line 6 in 9cd22a8
Lines 72 to 84 in 9cd22a8
Lines 225 to 227 in 9cd22a8
Lines 95 to 97 in 9cd22a8
|
I believe this issue should be solved if we simply check if the theme or keymap is already set on the field before overriding it. This will make things work individually and allow changing themes / keymaps for individual fields as part of a larger form as well. |
This should be fixed by #123, let us know if this works for you! If it doesn't please feel free to re-open this issue or create a new one! |
@maaslalani Can this be re-opened? It seems #123 was reverted by commit 51377e6, so this is still an issue. |
Can confirm with 0.30.0 it's still an issue, please re-open. |
Apologies! Thanks for letting us know, re-opened the issue for now. |
Okay after a bunch of testing I believe I have solved it correctly this time, please do try it out and let me know if everything works correctly. |
First, thank you all for the incredible hard work and nice design of the charm.sh suite. I'm hella diggin' it!
When I attempt to change the theme of a huh Form with .WithTheme() the form style is unchanged from the default theme.
Not only colors not changing, but also any block formatting, etc.
In the example screenshot below, I am also printing out the theme items and see changes in those elements, but no change in the actual form theme.
The text was updated successfully, but these errors were encountered: