Open
Conversation
for more information, see https://pre-commit.ci
iisakkirotko
requested changes
Dec 6, 2024
Comment on lines
21
to
23
| dense, set_dense = solara.use_state(False) | ||
| outlined, set_outlined = solara.use_state(True) | ||
| text, set_text = solara.use_state(True) |
Collaborator
There was a problem hiding this comment.
We can also replace use_state with use_reactive here.
Comment on lines
37
to
43
| solara.Warning( | ||
| f"This is solara.Warning(label='...', text={text}, dense={dense}, outlined={outlined}, icon={icon})", | ||
| text=text, | ||
| dense=dense, | ||
| outlined=outlined, | ||
| icon=icon, | ||
| ) |
Collaborator
There was a problem hiding this comment.
This is duplicate for some reason. Strange that we never noticed.
Suggested change
| solara.Warning( | |
| f"This is solara.Warning(label='...', text={text}, dense={dense}, outlined={outlined}, icon={icon})", | |
| text=text, | |
| dense=dense, | |
| outlined=outlined, | |
| icon=icon, | |
| ) |
Contributor
Author
There was a problem hiding this comment.
Thank you. I already fix the two issues, if there is still any problem, please let me know.
for more information, see https://pre-commit.ci
…85/solara into docs_update_code_warining
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
maartenbreddels
requested changes
Dec 9, 2024
Contributor
maartenbreddels
left a comment
There was a problem hiding this comment.
I this this style is easier to read, and easier for newcomers
| ) | ||
|
|
||
| with solara.GridFixed(4): | ||
| solara.Checkbox(label="Use icon", value=state.value["icon"], on_value=lambda val: state.value.update({"icon": val})) |
Contributor
There was a problem hiding this comment.
Suggested change
| solara.Checkbox(label="Use icon", value=state.value["icon"], on_value=lambda val: state.value.update({"icon": val})) | |
| solara.Checkbox(label="Use icon", value=icon) |
| icon=icon, | ||
| ) | ||
| return main | ||
| state = solara.use_reactive( |
Contributor
There was a problem hiding this comment.
Suggested change
| state = solara.use_reactive( | |
| icon = solare.use_reactive(True) | |
| state = solara.use_reactive( |
cded5b2 to
32af76f
Compare
for more information, see https://pre-commit.ci
…85/solara into docs_update_code_warining
for more information, see https://pre-commit.ci
iisakkirotko
approved these changes
Jan 6, 2025
This file contains hidden or 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
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.