form-atoms / form-atoms

Atomic form primitives for Jotai

Home Page:https://codesandbox.io/s/getting-started-with-form-atoms-v2-ddhgq2?file=/src/App.tsx

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Debug label completion

MiroslavPetrik opened this issue ยท comments

I've noticed that there are some atoms without labels, so I would make these improvements to debugging:

  1. the baseValueAtom is internal in fieldAtom
    I would mark it as debugPrivate = true

  2. the field itself (fieldAtom return value) is unlabelled
    This can be easily labelled field/${config.name ?? field}, The value displays the structure of the nested atoms, which is good

  3. the formAtom itself is unlabelled
    Like 2. I would label if form/${formAtom}, here we don't have a config.name like in fields, so the key will be useful to distinguish multiple mounted form atoms.

  4. for the internal atoms of formAtoms, we are missing scoping by the atom key
    Currently we have form/values, form/fields labels, but these can be scoped by atom key form/${formAtom}/value to again separate multiple mounted forms.

  5. The labeling of field atoms should be field/{config.name}/${atomName} instead of the current field/${atomName}/${config.name}
    This plays better with the devtools, where you can filter by prefix, so entergin field/username will filter only the internals of the username fieldAtom.

๐ŸŽ‰ This issue has been resolved in version 3.2.5 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€