Comments (4)
After taking a look around, I don't think we need to provide our own Form component.
AFAIK, the design language we're leading with in our own apps has all forms inside the sidepanel (as forms are "actionable"). In these sidebars, there's no additional styling needed to signify there's a form; placing input fields is enough. All a form provides is a state container and some validation logic for these inputs.
I'm a fan of formik, in comparison to other form helpers like react-form and formsy, because of its simplicity and familiar API. It's closely based on the native form
and input
components and allows you to easily plug in your own custom input
s (rather than forcing you to adhere to their own API or make vendor-specific custom inputs
). Our own input components, like those in #67, will work transparently with formik
.
I don't see much point in re-exporting it from this package; we can just include formik
(or even another form implementation) whenever an app needs a form in its sidepanel. For other app developers, we can add a suggestion in a "tips and tricks" wiki or app tutorial later.
Thoughts @bpierre?
from ui.
Agree, <form>
is behavioral and shouldn’t be provided by Aragon UI if possible.
Our own input components, like those in #67, will work transparently with formik.
formik sounds good! I never tried it, but I remember having some difficulties to make styled components work with react-formal on a project.
If formik becomes our recommended solution to manage forms, maybe we should rename our Field
component to something else (e.g. FieldBlock
, FieldSection
)?
from ui.
If formik becomes our recommended solution to manage forms, maybe we should rename our
Field
component to something else (e.g.FieldBlock
,FieldSection
)?
Maybe LabelledField
? The other two sound too "style-derived". Names are hard D:
from ui.
Closing this, as we're not providing our own form element. Renaming can happen later, if we see the need to recommend formik.
from ui.
Related Issues (20)
- Document more constants
- TokenAmount as a standalone library HOT 1
- Split: add `invert="both"` mode
- v2: wishlist HOT 1
- Add Oasis to the "Projects using ..." list HOT 2
- Box: Heading should possibly inherit custom padding HOT 2
- Modal: Vertical centering not applied in Safari
- Upgrade Popper.js to v2
- Remove deprecated features HOT 1
- Box: Decouple padding
- Modal: EscapeOutside causing premature modal closing with internal interactions
- Modal: Provide onClosed callback
- Document TokenBadge
- Layout: Expose provider independently of container
- Modal: Dropdown interactions trigger a close HOT 4
- Fundraiser template launch timed out before transaction processed HOT 1
- How to use css properties (needed for Spacing, Text Styles, etc) in Typescript? HOT 4
- Depency update to react 17 HOT 1
- Output is huge HOT 1
- Change position for sidebar to left or right directly with true option HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ui.