-
Notifications
You must be signed in to change notification settings - Fork 145
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
docs update code warining #901
Open
lizzy985
wants to merge
21
commits into
widgetti:master
Choose a base branch
from
lizzy985:docs_update_code_warining
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 10 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
87af964
docs update code warining
lizzy985 b3ef190
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] e62def3
fix code in warning-1
lizzy985 4f543d8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 61a72ef
fix code in warning-2
lizzy985 ca7ada5
Merge branch 'docs_update_code_warining' of https://github.com/lizzy9…
lizzy985 3775f62
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] de7c693
fix code in warning-3
lizzy985 9774107
fix code in warining-3
lizzy985 bc41aec
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 3d2dba6
docs update code warining
lizzy985 de4bf38
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 5763790
fix code in warning-1
lizzy985 afa721e
fix code in warning-2
lizzy985 47aa8e3
fix code in warning-3
lizzy985 0a954c6
update code in warning-4
lizzy985 c1db9e5
Merge branch 'docs_update_code_warining' of https://github.com/lizzy9…
lizzy985 c878529
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 5fd3725
update code in warning-5
lizzy985 c1c5aa0
update code in warning-6
lizzy985 2c822f2
docs_update_code_warining_7
lizzy985 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -17,31 +17,28 @@ | |||||
|
||||||
@solara.component | ||||||
def Page(): | ||||||
icon, set_icon = solara.use_state(True) | ||||||
dense, set_dense = solara.use_state(False) | ||||||
outlined, set_outlined = solara.use_state(True) | ||||||
text, set_text = solara.use_state(True) | ||||||
with solara.VBox() as main: | ||||||
with solara.GridFixed(4): | ||||||
solara.Checkbox(label="Use icon", value=icon, on_value=set_icon) | ||||||
solara.Checkbox(label="Show dense", value=dense, on_value=set_dense) | ||||||
solara.Checkbox(label="Show as text", value=text, on_value=set_text) | ||||||
solara.Checkbox(label="Show outlined", value=outlined, on_value=set_outlined) | ||||||
solara.Warning( | ||||||
f"This is solara.Warning(label='...', text={text}, dense={dense}, outlined={outlined}, icon={icon})", | ||||||
text=text, | ||||||
dense=dense, | ||||||
outlined=outlined, | ||||||
icon=icon, | ||||||
) | ||||||
solara.Warning( | ||||||
f"This is solara.Warning(label='...', text={text}, dense={dense}, outlined={outlined}, icon={icon})", | ||||||
text=text, | ||||||
dense=dense, | ||||||
outlined=outlined, | ||||||
icon=icon, | ||||||
) | ||||||
return main | ||||||
state = solara.use_reactive( | ||||||
{ | ||||||
"icon": True, | ||||||
"dense": False, | ||||||
"outlined": True, | ||||||
"text": True, | ||||||
} | ||||||
) | ||||||
|
||||||
with solara.GridFixed(4): | ||||||
solara.Checkbox(label="Use icon", value=state.value["icon"], on_value=lambda val: state.value.update({"icon": val})) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
solara.Checkbox(label="Show dense", value=state.value["dense"], on_value=lambda val: state.value.update({"dense": val})) | ||||||
solara.Checkbox(label="Show as text", value=state.value["text"], on_value=lambda val: state.value.update({"text": val})) | ||||||
solara.Checkbox(label="Show outlined", value=state.value["outlined"], on_value=lambda val: state.value.update({"outlined": val})) | ||||||
|
||||||
solara.Warning( | ||||||
f"This is solara.Warning(label='...', text={state.value['text']}, dense={state.value['dense']}, outlined={state.value['outlined']}, icon={state.value['icon']})", | ||||||
text=state.value["text"], | ||||||
dense=state.value["dense"], | ||||||
outlined=state.value["outlined"], | ||||||
icon=state.value["icon"], | ||||||
) | ||||||
|
||||||
|
||||||
__doc__ += apidoc(solara.Warning.f) # type: ignore |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.