Skip to content
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

Merged
merged 7 commits into from
Jan 29, 2024
Merged

Radix Form Docs #382

merged 7 commits into from
Jan 29, 2024

Conversation

martinxu9
Copy link
Contributor

Summary

Copy link
Contributor

@picklelo picklelo left a 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.

),
name="email",
),
on_submit=lambda _: rx.window_alert("Submitted!"),
Copy link
Contributor

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())

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).
Copy link
Contributor

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

Copy link
Contributor Author

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):
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@picklelo picklelo merged commit 07c8c23 into main Jan 29, 2024
1 check passed
@picklelo picklelo deleted the martinxu9/radix-form-docs branch January 30, 2024 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants