Home

>

Tools

>

Strapi

>

Releases

>

4.4.0-alpha.0

Strapi Release: 4.4.0-alpha.0

Pre Release

Tag Name: v4.4.0-alpha.0

Release Date: 8/25/2022

Strapi LogoStrapi

Open-source headless CMS built with Node.js. Provides developers with complete freedom in choosing their favorite tools and frameworks for frontend development.

TL;DR

Strapi v4.4.0-alpha.0 introduces Custom Fields, a powerful new feature that allows developers to create and use custom field types throughout the Strapi admin panel. This release enables you to extend Strapi's content structure with specialized field types tailored to your specific needs, enhancing content modeling flexibility and improving the content management experience.

Highlight of the Release

    • Introduction of Custom Fields API to extend Strapi's content structure
    • Ability to create and register custom field types with specialized UI components
    • Integration of custom fields in Content-Type Builder with dedicated tab
    • Support for custom fields in Content Manager with proper validation and UI rendering
    • Example color picker custom field implementation included

Migration Guide

for Custom Fields

This is an alpha release introducing a new feature, so there's no migration required from previous versions. However, if you're planning to use custom fields:

  1. Update to v4.4.0-alpha.0 using your package manager:

    npm install [email protected]
    

    or

    yarn add [email protected]
    
  2. Create custom fields by following the new Custom Fields API documentation.

  3. Register your custom fields in your plugin or application.

  4. Use your custom fields in the Content-Type Builder and Content Manager.

Note that as this is an alpha release, the API might change in future releases before the stable version.

Upgrade Recommendations

As this is an alpha release (v4.4.0-alpha.0) introducing the new Custom Fields feature, it's recommended for:

  • Developers who want to explore and provide feedback on the Custom Fields API
  • Projects that need custom field functionality and are willing to work with pre-release software
  • Testing environments where you can evaluate the new features

Not recommended for:

  • Production environments requiring stability
  • Critical applications without a testing pipeline

If you're interested in the Custom Fields feature but need stability, consider waiting for the stable v4.4.0 release. If you decide to upgrade to this alpha version, make sure to thoroughly test your application, especially if you plan to implement custom fields.

Bug Fixes

  • Fixed error message display for required custom fields
  • Fixed custom field type not being passed to data manager provider
  • Fixed custom field input loader remounting issue
  • Fixed color input hint and error display
  • Resolved issues with custom field options handling

New Features

Custom Fields API

The Custom Fields API allows developers to extend Strapi's content structure with specialized field types. Key components include:

  • Custom Fields Registry: A centralized system for registering and managing custom field types
  • Custom Field Integration: Full integration in both Content-Type Builder and Content Manager
  • Field Type Conversion: Automatic conversion between custom field types and underlying data types
  • Validation Support: Custom validation rules for specialized field types

Content-Type Builder Integration

Custom fields are fully integrated into the Content-Type Builder:

  • Dedicated Tab: Custom fields appear in their own tab in the attribute modal
  • Field Type Selection: Easy selection of available custom field types
  • Documentation Link: Direct access to how-to documentation for custom fields
  • Custom Field Options: Support for field-specific configuration options

Content Manager Integration

Custom fields are supported throughout the Content Manager:

  • Custom Input Components: Specialized input components for each custom field type
  • Validation Support: Field-specific validation rules are applied
  • Settings Support: Custom fields work with Content Manager settings like label actions

Example Implementation

The release includes an example color picker custom field that demonstrates:

  • How to register a custom field
  • How to provide custom UI components
  • How to handle validation
  • How to integrate with the Content Manager

Security Updates

No specific security fixes were included in this release.

Performance Improvements

  • Optimized custom field type conversion process
  • Implemented singleton pattern for CustomFields class to improve memory usage
  • Used React Suspense for efficient loading of custom field components

Impact Summary

The introduction of Custom Fields in Strapi v4.4.0-alpha.0 represents a significant enhancement to Strapi's content modeling capabilities. This feature allows developers to extend Strapi's core functionality with specialized field types tailored to specific content needs.

For developers, this means greater flexibility in creating content structures that match exact business requirements. Instead of being limited to Strapi's built-in field types, developers can now create custom fields with specialized validation, UI components, and data handling.

For content managers, custom fields provide a more intuitive and efficient content editing experience. Domain-specific fields can better represent the actual content being managed, reducing friction and potential errors in the content creation process.

This feature enhances Strapi's extensibility and positions it as a more flexible headless CMS solution capable of adapting to specialized content management needs across various industries and use cases. As this is an alpha release, the feature will continue to evolve based on community feedback before reaching stability in a future release.

Full Release Notes

Statistics:

File Changed73
Line Additions3,887
Line Deletions396
Line Changes4,283
Total Commits176

User Affected:

  • Can create custom field types to extend Strapi's content structure
  • Can register custom fields with their own validation, UI components, and data handling
  • Can provide specialized input types tailored to specific content needs

Contributors:

markkaylorremidejFeranchz