TL;DR
Strapi v3.0.0-alpha.6.7 brings significant improvements to the framework with a focus on plugin architecture, component design, and developer experience. This release introduces the ability to inject components between plugins, adds a new NotFound component, and creates a plugin list view. It also fixes several critical bugs in Content Manager relations, Content Type Builder, and Settings Manager. The ESLint configuration has been improved, which introduces breaking changes, and various enhancements have been made to the plugin generator, component design, and API relations.
Highlight of the Release
- New component injection system allowing plugins to inject components into other plugins
- New NotFound component for better error handling across the application
- New plugin list view for easier plugin management
- Fixed Content Manager relations management types detection
- Improved ESLint configuration (breaking change)
- Enhanced plugin generator for better developer experience
- Fixed database client installation in Settings Manager
- Ability to use CLI with local version of Strapi
Migration Guide
ESLint Configuration Changes
The ESLint configuration has been improved, which introduces breaking changes. Plugin developers should update their code to comply with the new rules:
- Added
event-handler-names configuration: Rename your event handlers to follow the new naming convention
- Added
react/require-default-props rule: Ensure all non-required props have default values
- Added
semi rule: Make sure all statements end with semicolons
React and Bootstrap Upgrade
This release includes upgrades to React and Bootstrap. If you have custom components that rely on specific React or Bootstrap behaviors:
- Test your custom components thoroughly after upgrading
- Update any deprecated React patterns in your code
- Check for Bootstrap class changes that might affect your custom styling
Component API Changes
Several components have had their APIs updated:
PopUpWarning component now supports displaying only one button
Input component has new props and validation behavior
- Check the updated documentation for these components to ensure compatibility
Using the New Component Injection System
If you want to use the new component injection system:
- Import the necessary utilities from the strapi-helper-plugin
- Define injection zones in your plugin
- Use the
injectComponent function to inject components from one plugin to another
- Refer to the updated documentation for detailed implementation examples
Upgrade Recommendations
For Plugin Developers
It is recommended to upgrade as soon as possible to take advantage of the new component injection system and improved plugin generator. Be aware of the breaking changes in the ESLint configuration and update your code accordingly.
For Content Managers and Administrators
This upgrade is recommended as it fixes several critical bugs in the Content Manager, Content Type Builder, and Settings Manager. The new UI components and plugin list view will also improve your workflow.
For API Developers
The upgrade is beneficial as it improves relations for generated APIs and fixes issues with Content Type Builder. The ability to use CLI with a local version of Strapi will also enhance your development experience.
Upgrade Steps
- Backup your project before upgrading
- Update your package.json to point to the new version (
v3.0.0-alpha.6.7)
- Run
npm install or yarn install to update dependencies
- Check for any custom code that might be affected by the ESLint configuration changes
- Test your application thoroughly after upgrading
Bug Fixes
Content Manager Fixes
- Fixed relations management types detection for better handling of different relation types
- Fixed decimal attribute handling
- Fixed CANCEL_CHANGES action bug
- Fixed SelectMany duplicate data issue
- Now displays ID in SelectOne and SelectMany if no label is provided
- Fixed validation issues
Content Type Builder Fixes
- Fixed quotes in name and description fields
- Fixed content type update after first creation
- Added check if a table exists with bookshelf
- Added notification when table does not exist
- Fixed bug when trying to edit a temporary Content Type
Settings Manager Fixes
- Fixed select input for auto select functionality
- Fixed database client installation
- Fixed input styles
- Fixed return in render
Relation Fixes
- Fixed handling of oneToOne mongoose relation
- Fixed handling of oneToMany dominant bookshelf relation
- Fixed manyToMany relations in bookshelf (both by ID and by object)
- Fixed relation creation and updates
- Fixed removal of relations on data deletion
Other Fixes
- Fixed local installation to work with
process.cwd()
- Fixed node modules dependencies for plugin installation
- Fixed undefined value handling for input validation
- Fixed EJS template issues
New Features
Component Injection System
A powerful new feature that allows plugins to inject components into other plugins, enabling more modular and extensible architecture. This opens up new possibilities for plugin developers to extend and customize the functionality of existing plugins.
NotFound Component
A new reusable component has been created to handle "not found" states across the application, providing a consistent user experience when resources cannot be located.
Plugin List View
A dedicated view has been added to manage and visualize installed plugins, making it easier for administrators to see what plugins are available in their Strapi instance.
Error Boundary Component
Added an ErrorBoundary component to handle plugin errors gracefully, preventing the entire application from crashing when a plugin encounters an error.
New UI Components
Several new UI components have been added to the shared component library:
- Ico and IcoContainer components for icon management
- ListRow component for consistent list displays
- BackHeader component for navigation
- EmptyAttributes view for content manager
Input Enhancements
The Input component in the helper plugin has been enhanced with:
- Password input type
- Search input type
- Improved validation handling
Security Updates
No specific security fixes were mentioned in the release notes. The focus of this release appears to be on feature enhancements, bug fixes, and performance improvements rather than security issues.
Performance Improvements
Component Refactoring
Several components have been refactored to use functional components instead of classes, which can lead to better performance and reduced bundle size:
- PopUpWarning component has been rewritten as a function
- Input component has been optimized
Bootstrap Upgrade
The Bootstrap library has been upgraded, which includes performance improvements and optimizations in the underlying framework.
React Upgrade
React has been upgraded to a newer version, bringing performance improvements and fixing warnings that could impact rendering performance.
Plugin Loading
Improvements to how plugins are loaded and managed, with better handling of dependencies and more efficient resource utilization.
Impact Summary
This release represents a significant step forward for Strapi's plugin architecture and developer experience. The introduction of the component injection system is particularly impactful, as it allows for much greater flexibility and extensibility in how plugins can interact with each other. This opens up new possibilities for creating more modular and customizable admin interfaces.
The bug fixes in this release address several critical issues in core functionality, particularly around content type management and relations handling, which should lead to a more stable and reliable experience for content managers and API developers.
The UI improvements and new components enhance the overall user experience and provide developers with more tools to create consistent interfaces. The NotFound component and Error Boundary handling improve the robustness of the application by providing better error states.
For administrators, the new plugin list view and improvements to the Settings Manager make system configuration and management more straightforward.
The ability to use the CLI with a local version of Strapi and the improvements to the plugin generator enhance the developer workflow, making it easier to create and test custom plugins.
Overall, this release balances new features with important bug fixes and quality-of-life improvements that benefit all types of Strapi users.
Full Release Notes
💥 Breaking changes
- [Admin] Improve ESLint configuration (#275)
🚀 New feature
- [Plugin] Inject components in others plugins (#301)
- [Admin] Create NotFound component (#304)
- [Admin] Create plugin list view (#322)
🐛 Bug Fix
- [Plugin] Fix Content Manager relations management types detection (#300)
- [Plugin] Fix Content Type Builder quotes name and description (#303)
- [Plugin] Fix Settings Manager select input for auto select (#313)
- [Plugin] Fix database client installation Settings Manager (#320)
- [Plugin] Fix bug when trying to edit a temporary Content Type (#324, #326)
💅 Enhancement
- [Plugin] Improve plugin generator
- [Plugin] Components design improvements (#308)
- [Documentation] Fix errors in UI-components code examples (#312)
- [Framework] Improve relation for generated APIs (#316)
- [Framework] Be able to use CLI with local version of Strapi (#317, 96e9d3e)
- [Plugin] Auto select the correct database port (#321)