-
Notifications
You must be signed in to change notification settings - Fork 208
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
Radix Form Docs #382
Radix Form Docs #382
Conversation
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.
Docs are very thorough, we just need to make a few sections more digestible. I think most people will use the high level form component so we can make those docs more simple.
docs/library/forms/form.md
Outdated
), | ||
name="email", | ||
), | ||
on_submit=lambda _: rx.window_alert("Submitted!"), |
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.
We should window alert the form submission: lambda content: rx.window_alert(content.to_string())
docs/library/forms/form.md
Outdated
The current version of Radix Forms does not support composing `form_control` with other Radix form primitives such as `checkbox`, `select`, etc. | ||
``` | ||
|
||
The `form_message` is a validation message which is automatically wired (functionality and accessibility). When `form_control` determines the input is invalid, the `form_message` is shown. You set the `match` prop to enable [client side validation](#client-side-validation). You can set the `force_match` prop of `form_message` and `server_invalid` prop of `form_field` together to perform [server side validation](#server-side-validation). |
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.
This whole section feels very dense and hard to read. It may be okay for now, I think @masenf is going through for voice, but we should simplify this
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.
is it the excessive use of code
? I rewrote some of the content by using the proper nouns instead of the code. Also did a first pass using the documentation voice tips from Masen. I feel some of the stuff probably requires a short discussion: the tips are somewhat still up to interpretation. We can do another pass when we scrub the docs
import reflex.components.radix.themes as rdxt | ||
import reflex.components.radix.primitives as rdxp | ||
|
||
class RadixFormSubmissionState(rx.State): |
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.
This whole code can be simplified. We only need one dict
var for the form data, and can render that.
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.
rewrote using the dict and foreach now.
Summary