open-formulieren / formio-builder Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://open-formulieren.github.io/formio-builder/
Home Page: https://open-formulieren.github.io/formio-builder/
Formio email component
This is relevant for the choices with the select
, radio
, checkboxes
components, amongst others
The current tooltip solution is quick and dirty and has some issues:
title
HTML attribute.A proper implementation would be to use https://floating-ui.com/docs/react, which we already use in the SDK for date pickers. It would also solve some other issues in the SDK/renderer eventually by not having to use the tooltip library of formio itself.
input type="date"
Hooks like useManageTranslations
would definitely benefit from typescript information to know which keys are translatable (string type and present in the FormioTypeSchema
)
We'd then be able to do something like:
Translations.useManageTranslations<EmailSchema>(['label', 'bad']);
hasAnyError<EmailSchema>(...)
-> compiler should then warn about 'bad' not being a valid name.
This would also be useful to combine in a higher order EditForm component with generics, so you can do something like:
<EditForm<EmailSchema> manageTranslations={['label', 'description']} manageValidatorTranslations={['required']}>
{({hasAnyError}) => (
<Tabs>
<TabList>...</TabList>
<TabPanel>...</TabPanel>
</Tabs>
)}
</EditForm>
The content of index.ts
is now resulting in our own index.d.ts
being overwritten
Line 6 in 13385d1
One reason is for native promise support: https://stackoverflow.com/questions/47995484/whats-the-purpose-of-typescripts-awaiter
Nice to have?
open-formulieren/open-forms#3079 adds a warning when you try to add a second Co-sign component to a form, as it doesn't make sense. We think it's nice UX when having a Co-sign component in one of the form steps, "greys out"/disables the draggable (perhaps with the warning, changed to an info when you do try to drag it).
The preview currently shows the JSON schema
Instead, this should show the component preview (and strip out/ignore certain attributes, like 'hidden' etc.).
All texts/literals are now provided via react-intl components, however we need to either or both:
component.validate
-> requires order/mapping with component typecomponent.type -> (component) => ZodSchema
)useFormikContext().errors
instead (see #29 (comment))These should ensure the component preview gets updated appropriately
Essentially, the Formik initialValues
should be sourced from this value
Tangentially related - the defaultValues now behaves incorrectly in the builder form when toggling multiple true/false.
defaultValue
i.c.w. multiple
Run the tests and build all in CI
This executes the play function, or if those are missing, ensures each story renders.
See if we can use TinyMCE and feed it the config from the main project, instead of Formio's own editor.
Managing translations also requires special attention.
Due to the ref/effect being scoped to the Key
component, when you switch tabs and the Basic tab content gets unmounted, this resets upon switching back to the basic tab.
A hook useDerivedKey
is probably a better approach which can run on the entire for component.
See: #34 (comment)
In the story with path /story/builder-components-textfield--preview-initial-values, the interaction tests fail because clicking on the checkbox 'multiple values' doesn't seem to actually check the checkbox.
Builder edit form and preview for the number
Form.io component type.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.