-
Notifications
You must be signed in to change notification settings - Fork 417
feat(gnoweb): form - input md extension #4061
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
feat(gnoweb): form - input md extension #4061
Conversation
🛠 PR Checks SummaryAll Automated Checks passed. ✅ Manual Checks (for Reviewers):
Read More🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers. ✅ Automated Checks (for Contributors):🟢 Maintainers must be able to edit this pull request (more info) ☑️ Contributor Actions:
☑️ Reviewer Actions:
📚 Resources:Debug
|
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
gno.land/pkg/gnoweb/markdown/golden/ext_forms/form_input_types.md.txtar
Outdated
Show resolved
Hide resolved
## Description Adds more features to the realm, such as a full balance page, an option to search with a cosmos address that gets converted to a `g1..` automatically. dep on: #4325, #4326 todo: - [x] fix realm-issued coin denom case ie `/gno.land/r/gnoland/coins:zeoncoin` - [x] add tests - [ ] when #4061 is merged, add the form to the convert page
@alexiscolin checking 🙏 |
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.
Looks good 💯
I think you can provide the best feedback on this in the future (out of the scope for the PR), but this parser design we use for the tokens feels like it could use a bit of love. I'm not a huge fan of the current API, maybe we can improve it in the future -- just something to keep in mind 🙏 |
This PR introduces secure and interactive form handling capabilities to Gno realms, enabling user input through markdown-based forms with built-in security measures.
Technical Implementation
HTTP Handler Enhancements
mux
package for internal realm argument modificationMarkdown Extensions
<gno-form>
: Container for form elements<gno-input>
: Text input fields (text only)name
attribute for input identificationplaceholder
for user guidanceSecurity & UX Features
Validation Rules
name
attribute enforcementExample Implementation
When submitted, the form data is automatically transformed into query parameters and redirected as a GET request. The realm must implement the necessary logic to handle these parameters and update its state accordingly.
Security Considerations