Skip to content

fix: custom field types settings#16

Open
tiagorochaB wants to merge 1 commit into
mainfrom
fix/custom-fields-types
Open

fix: custom field types settings#16
tiagorochaB wants to merge 1 commit into
mainfrom
fix/custom-fields-types

Conversation

@tiagorochaB

Copy link
Copy Markdown
Contributor

Summary

Adds a per-type settings panel to the custom-field create/edit form. Selecting a
field type (text, number, date, list, file) now reveals only the settings relevant
to that type, and switching types resets the type-specific values cleanly. Also
includes layout fixes so the inputs lay out on a single row without overlapping.

Closes #15

Changes

  • New CustomFieldSettings component rendering type-specific inputs: label,
    placeholder, mask (with help link), number/date format, list selection + render
    type, list options (drag-reorderable), file formats multi-select, character
    limit / decimal length steppers, and attribution type.
  • Replaced the plain type <Select> with a card/icon type picker in
    custom-field-form.tsx; type is locked when editing an existing field.
  • Switching type clears the type-specific fields (TYPE_SPECIFIC_FIELDS) while
    preserving title/description/attribution; list seeds one empty option.
  • Extended custom-field-schema.ts with the new optional settings fields and
    their option sets (NUMBER_FORMATS, DATE_FORMATS, LIST_SELECTION_TYPES,
    LIST_RENDER_TYPES, FILE_FORMATS, ATTRIBUTION_TYPES) and max-length consts.
  • Responsive grid layout: text uses 4 columns, number 5 columns, others 3; fixed
    row/column gaps and forced w-full on the format select so it no longer shrinks
    when a value is selected.
  • Added i18n strings for the new settings across en-US, es-ES, and pt-BR.
  • Updated custom-field-form.test.tsx to cover the new behavior.

Type of change

  • Bug fix (fix:)
  • New feature (feat:)
  • Refactor (refactor:)
  • Docs only (docs:)
  • Tooling / chore (chore:)
  • Breaking change

Testing

  • pnpm type-check passes
  • pnpm lint passes
  • pnpm test passes
  • Manually verified the change end-to-end: Created each custom field and checked its settings

Screenshots

Notes for reviewers

  • Type is intentionally immutable when editing — it changes how data is stored.
  • Option-set string values must match what the backend stores (see the schema
    comments).
  • The branch is named fix/... and the commit uses fix:, but the change adds a
    feature; flagging in case the squash-merge title should be adjusted.

@tiagorochaB tiagorochaB self-assigned this Jun 16, 2026
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.

[Bug] Custom Fields types are not editable

1 participant