Home

>

Tools

>

Strapi

>

Releases

>

3.0.0-beta.18

Strapi Release: 3.0.0-beta.18

Tag Name: v3.0.0-beta.18

Release Date: 12/17/2019

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 v3.0.0-beta.18 introduces Dynamic Zones, a powerful new feature that allows content creators to build flexible content structures by combining different components in a single field. This release also includes significant UI improvements, performance optimizations for user authorization, and numerous bug fixes for date handling, file uploads, and database operations. The documentation has been extensively updated with new guides for creating draft systems, security with Sqreen, and using the new console command.

Highlight of the Release

    • Introduction of Dynamic Zones feature for flexible content structures
    • Performance optimization for user authorization
    • New strapi console command for development
    • Improved UI for component management
    • Enhanced documentation with new guides for draft systems and security

Migration Guide

Migrating to Dynamic Zones

If you're upgrading from a previous version and want to use Dynamic Zones, you'll need to follow the migration guide available at: https://strapi.io/documentation/3.0.0-beta.x/migration-guide/migration-guide-beta.17-to-beta.18.html

Key migration steps include:

  1. Update your dependencies Make sure to update all Strapi packages to version 3.0.0-beta.18.

  2. Content Type Component References If you have existing components, you'll need to update their references in your content types.

  3. Database Schema Updates Dynamic Zones require specific database schema changes. The migration guide provides examples for handling these changes.

  4. API Changes Be aware that the API for components has changed, particularly how they are injected and referenced.

  5. UI Adjustments If you've customized the admin UI, you may need to update your customizations to work with the new Dynamic Zones interface.

Upgrade Recommendations

Who should upgrade immediately:

  • Users who need the Dynamic Zones feature for flexible content modeling
  • Users experiencing issues with date/time handling or relation updates
  • Developers looking for performance improvements in user authorization

Upgrade Difficulty: Moderate

This is a significant update with a major new feature (Dynamic Zones) and numerous improvements. While the upgrade process is well-documented, it may require database schema changes and code adjustments if you're using components extensively.

Upgrade Steps:

  1. Back up your database and project files
  2. Update all Strapi packages to version 3.0.0-beta.18
  3. Follow the migration guide if you plan to use Dynamic Zones
  4. Test thoroughly in a staging environment before deploying to production

If you're not planning to use Dynamic Zones immediately, you can still benefit from the bug fixes and performance improvements in this release.

Bug Fixes

Date and Time Handling

  • Fixed empty date wrong display
  • Added support for handling time and date in MongoDB
  • Added time precision to allow up to 3 fractional digits
  • Fixed issues with date types parsing

Database Operations

  • Fixed relation updates by using the ID of entry instead of the full object
  • Wrapped tsvector attributes with coalesce before join to prevent NULL results
  • Fixed issues with foreign key names that were too long
  • Fixed table existence check for SQLite3 when altering datetime fields

UI and Display

  • Fixed modal close button UI
  • Improved left menu active state and component icon display
  • Fixed JSON input handling
  • Fixed hidden fields in Content Manager
  • Fixed issues with component display names

Plugin-specific Fixes

  • Fixed uploaded file order by size in the Upload plugin
  • Updated ApolloServer configuration for introspection queries in GraphQL plugin
  • Fixed no response when getting user permission role with internal network

New Features

Dynamic Zones

The major feature of this release is the introduction of Dynamic Zones, which allows content creators to build flexible content structures by combining different components in a single field. This enables the creation of more complex and adaptable content models.

Key aspects of Dynamic Zones:

  • Ability to mix and match different component types in a single field
  • UI support in the Content Type Builder for creating and managing Dynamic Zones
  • GraphQL support with proper model UID handling
  • Validation for minimum and maximum components

Strapi Console Command

A new strapi console command has been added, providing an interactive JavaScript console with the Strapi context loaded. This is particularly useful for debugging and development tasks.

Time and Date Scalar Types in GraphQL

The GraphQL plugin now includes Time and Date scalar types, allowing for more precise handling of temporal data.

Security Updates

This release includes a new security guide for integrating Strapi with Sqreen, a security monitoring and protection service. While not a direct security fix, this addition helps users implement better security practices in their Strapi applications.

No critical security vulnerabilities were addressed in this release.

Performance Improvements

Authorization Performance

A significant performance improvement has been implemented by optimizing how user roles are populated during authorization. Now, only the role relation is populated instead of all user relations, which reduces the amount of data processed and improves response times.

Database Queries

Several optimizations have been made to database queries:

  • Better handling of tsvector attributes in PostgreSQL searches
  • Optimized relation handling to prevent circular populating
  • Improved handling of polymorphic relations

Webpack Configuration

The admin panel's webpack configuration has been updated to improve build performance and remove unnecessary dependencies like image-webpack-loader.

Impact Summary

Strapi v3.0.0-beta.18 represents a significant step forward in content modeling flexibility with the introduction of Dynamic Zones. This feature fundamentally changes how content can be structured in Strapi, allowing for more complex and adaptable content models that better serve modern web development needs.

The performance optimizations for user authorization will be particularly impactful for applications with many users or frequent authentication requests. By only populating necessary relations, the system can respond more quickly to authorization requests.

The numerous bug fixes for date handling, database operations, and UI components address pain points reported by the community, improving the overall stability and usability of the platform.

For developers, the new strapi console command provides a valuable tool for debugging and development, while the updated documentation with guides for draft systems, security with Sqreen, and component usage enhances the learning resources available.

This release maintains backward compatibility while adding significant new capabilities, making it a recommended upgrade for most Strapi users.

Full Release Notes

You can read the Migration guide here

🐛 Bug fix

💅 Enhancement

🚀 New feature

Statistics:

File Changed300
Line Additions5,264
Line Deletions2,568
Line Changes7,832
Total Commits250

User Affected:

  • Can now use Dynamic Zones to create flexible content structures
  • Improved UI for component management in the Content Type Builder
  • Better handling of date and time fields

Contributors:

shusonalexandrebodinsoupettevirginiekypouyamiralayilauriejimmichelerivapravosudgeo-mathijsRodEspFroelund0LL1CKGraficoAurelsicokofranciskone