Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autoscaffold DataObject in CMS 6 #262

Closed
6 tasks done
maxime-rainville opened this issue Jun 3, 2024 · 0 comments
Closed
6 tasks done

Autoscaffold DataObject in CMS 6 #262

maxime-rainville opened this issue Jun 3, 2024 · 0 comments

Comments

@maxime-rainville
Copy link
Contributor

maxime-rainville commented Jun 3, 2024

We'll add the ability to auto-scaffold field in CMS 5.3. However no native DataObjects will be using it.

Acceptance criteria

  • Link autoscaffold to LinkField and MultiLinkField
  • When asset-admin is installed, File autoscaffold to UploadField for has_many and many_many, with multi-upload set to true
  • SiteTree autoscaffold to TreeDropdownField and TreeMultiDropdownField
  • ElementalArea HAS_ONE autoscaffolds ElementalAreaField and ElementalAreasExtension is refactored accordingly.
  • EditableFormField scaffold a custom gridifeld
  • TaxonomyTerm autoscaffolded to searchabledropownfield and searchablemultidropdownfield
  • Any other DataObjects that could be sensibly autoscaffolded is updated to auto-scafolled
  • Any getCMSFields or updateCMSFields methods that manually replaces a FormField with one that could be auto-scaffolded is updated to do so.
  • maybe all classes that use Hierarchy other than mentioned above autoscaffold to TreeDropdownField and TreeMultiDropdownField

Post-implementation notes

  • It's not feasible to change the ElementalArea to auto-scaffold in an ElementalAreaField, because the ElementalAreasExtension is still required for it to work as expected (and to exclude it when it should be excluded, and update various state for the field, etc). Auto-scaffolding as ElementalAreaField would just be a bad dev experience.
  • I opted to not make the various models in silverstripe/userforms scaffoldable because it requires a lot of refactoring for very little benefit. Outside of the models in that module it's unlikely people will be having direct relations to those models in their projects.
  • I've added autoscaffolding for BlogTag and BlogCategory to match how BlogPost sets them up - however, I can't update BlogPost to take advantage of that just yet. That'll be handled in Scaffold fields for SiteTree silverstripe-cms#2767

PRs

Kitchen sink CI run - note that because there's a fork for framework, we expect to see a failure in recipe-reporting-tools. There's a test in there that cannot pass when a forked framework is used.

@GuySartorelli GuySartorelli added this to the Silverstripe CMS 6 milestone Jun 4, 2024
@GuySartorelli GuySartorelli self-assigned this Jun 13, 2024
@GuySartorelli GuySartorelli removed their assignment Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants