tinacms / tinacms

A fully open-source headless CMS that supports Markdown and Visual Editing
https://tina.io
Apache License 2.0
11.19k stars 564 forks source link

`object` field type with templates should work even when `list: false` #4419

Open tyteen4a03 opened 4 months ago

tyteen4a03 commented 4 months ago

Describe the issue that you're seeing. Any Loom videos or screenshots usually help a lot!

Currently, if you define an object field with list: false then define templates , the field does not render on the CMS, instead saying "Unrecognized field type"

Reproduction

N/A

Steps to reproduce

Define an object field with templates and list: false, then attempt to create a new item in the collection it's in.

System Info

System:
    OS: macOS 14.2.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 22.52 MB / 32.00 GB
    Shell: 5.9 - /opt/homebrew/bin/zsh
  Binaries:
    Node: 18.17.1 - /private/var/folders/cg/srfblk2d7bq2dw2tqjt94qkh0000gn/T/xfs-cfcbfb04/node
    Yarn: 4.0.2 - /private/var/folders/cg/srfblk2d7bq2dw2tqjt94qkh0000gn/T/xfs-cfcbfb04/yarn
    npm: 9.6.7 - ~/Library/Caches/fnm_multishells/25880_1703958751436/bin/npm
    pnpm: 8.11.0 - ~/Library/pnpm/pnpm
    bun: 1.0.15 - ~/.bun/bin/bun
  Browsers:
    Brave Browser: 120.1.61.109
    Chrome: 120.0.6099.129
    Safari: 17.2.1
  npmPackages:
    @tinacms/cli: ^1.5.39 => 1.5.39
    tinacms: ^1.5.28 => 1.5.28

Validations

gsicvj commented 1 month ago

This issue still exists. TinaCMS doesn't have conditional fields, so we're forced to use templates. The problem with templates is that they only work when list is true. Properties like min, max and validation have many bugs or weird constraints which makes it impossible to define a model that editors will not break.