-
Notifications
You must be signed in to change notification settings - Fork 118
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
refactor: make theme variant_user_selectable
default to OS theme if not previously set
#495
Closed
iisakkirotko
wants to merge
15
commits into
02-05-feat_support_theming_solara
from
02-05-refactor_make_theme_variant_user_selectable_default_to_OS_theme_if_not_previously_set
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Feb 5, 2024
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @iisakkirotko and the rest of your teammates on Graphite |
iisakkirotko
force-pushed
the
02-05-feat_support_theming_solara
branch
from
February 5, 2024 14:56
0599961
to
f8b0e84
Compare
iisakkirotko
force-pushed
the
02-05-refactor_make_theme_variant_user_selectable_default_to_OS_theme_if_not_previously_set
branch
from
February 5, 2024 14:56
44a4a16
to
b76c207
Compare
iisakkirotko
force-pushed
the
02-05-feat_support_theming_solara
branch
from
February 5, 2024 15:03
f8b0e84
to
5a324e6
Compare
iisakkirotko
force-pushed
the
02-05-refactor_make_theme_variant_user_selectable_default_to_OS_theme_if_not_previously_set
branch
from
February 5, 2024 15:03
b76c207
to
69e5295
Compare
iisakkirotko
force-pushed
the
02-05-feat_support_theming_solara
branch
from
February 5, 2024 15:23
5a324e6
to
c71d5c3
Compare
iisakkirotko
force-pushed
the
02-05-refactor_make_theme_variant_user_selectable_default_to_OS_theme_if_not_previously_set
branch
from
February 5, 2024 15:23
69e5295
to
562911d
Compare
iisakkirotko
force-pushed
the
02-05-feat_support_theming_solara
branch
from
February 8, 2024 16:09
b4d6684
to
10fe4e7
Compare
Creates a reactive variable that is set to the return value of the function. The value will be updated when any of the reactive variables used in the function change. Example: ```solara import solara import solara.lab a = solara.reactive(1) b = solara.reactive(2) @solara.lab.computed def total(): return a.value + b.value def reset(): a.value = 1 b.value = 2 @solara.component def Page(): print(a, b, total) solara.IntSlider("a", value=a) solara.IntSlider("b", value=b) solara.Text(f"a + b = {total.value}") solara.Button("reset", on_click=reset) ``` z.value will be lazily executed the first time, and will be updated when one of the dependencies changes.
Creates a reactive variable that is set to the return value of the function. The value will be updated when any of the reactive variables used in the function change. Example: ```solara import solara import solara.lab a = solara.reactive(1) b = solara.reactive(2) @solara.lab.computed def total(): return a.value + b.value def reset(): a.value = 1 b.value = 2 @solara.component def Page(): print(a, b, total) solara.IntSlider("a", value=a) solara.IntSlider("b", value=b) solara.Text(f"a + b = {total.value}") solara.Button("reset", on_click=reset) ``` z.value will be lazily executed the first time, and will be updated when one of the dependencies changes.
Both are very similar, but Singleton will never re-compute, both are not settable (read-only). Example: ```python from solara.toestand import Computed, Reactive x = Reactive(1) y = Reactive(2) def conditional_add(): if x.value == 0: return 42 else: return x.value + y.value z = Computed(conditional_add) ``` z.value will be lazily executed the first time, and will be updated when one of the dependencies changes.
use_task can replace use_thread, but also support coroutine functions. task is a decorator that creates a top level task that can be executed from any location (e.g. a click handler of a button).
Co-authored-by: Iisakki Rotko <[email protected]>
Co-authored-by: Iisakki Rotko <[email protected]>
Co-authored-by: Iisakki Rotko <[email protected]>
… not previously set
iisakkirotko
force-pushed
the
02-05-feat_support_theming_solara
branch
from
February 8, 2024 16:14
10fe4e7
to
f58e32e
Compare
iisakkirotko
force-pushed
the
02-05-refactor_make_theme_variant_user_selectable_default_to_OS_theme_if_not_previously_set
branch
from
February 8, 2024 16:14
562911d
to
ed0ec10
Compare
iisakkirotko
force-pushed
the
02-05-feat_support_theming_solara
branch
from
February 9, 2024 11:57
f58e32e
to
d03f038
Compare
iisakkirotko
force-pushed
the
02-05-feat_support_theming_solara
branch
3 times, most recently
from
February 21, 2024 08:11
c41779e
to
162cf58
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.