From 50aa01a6587a77a0b7659d335e5ffad565691010 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Thu, 19 Feb 2026 00:03:33 +1300 Subject: [PATCH] DOC Add changelog for legacy react components --- en/08_Changelogs/6.3.0.md | 64 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 en/08_Changelogs/6.3.0.md diff --git a/en/08_Changelogs/6.3.0.md b/en/08_Changelogs/6.3.0.md new file mode 100644 index 00000000..c709bce2 --- /dev/null +++ b/en/08_Changelogs/6.3.0.md @@ -0,0 +1,64 @@ +--- +title: 6.3.0 (unreleased) +--- + +# 6.3.0 (unreleased) + +## Overview + +
+ +Included module versions + + + +| Module | Version | +| ------ | ------- | + + + +
+ +## Features and enhancements + +### Other new features and enhancements {#other-new} + +No other new features or enhancements have been documented yet for this release. + +### React class components converted to functional components {#react-functional-components} + +Form field components in the CMS have been converted from React class components to functional components. This is part of an ongoing modernisation effort — functional components are simpler, have better tooling support, and align with current React best practices. + +For most projects this change is invisible. However, if your project extends any of these components as an ES6 class (`extends TextField`), that pattern will no longer work because functional components cannot be subclassed. + +To ease migration, the original class-based implementations are preserved as `Legacy`-prefixed copies in `client/src/legacy/ReactComponents/`. Only class components that were previously defined in the [`client/src/bundles/bundle.js`](https://github.com/silverstripe/silverstripe-admin/blob/3.2/client/src/bundles/bundle.js) file in `silverstripe/admin`, or were a parent class of an exported component, are available as legacy components. If your project subclasses a converted component, update the import to use the legacy version: + +Before: + +```js +import TextField from 'components/TextField/TextField'; + +class MyCustomField extends TextField { + // ... +} +``` + +After: + +```js +import LegacyTextField from 'legacy/ReactComponents/LegacyTextField'; + +class MyCustomField extends LegacyTextField { + // ... +} +``` + +You will need the latest version of [@silverstripe/webpack-config](https://www.npmjs.com/package/@silverstripe/webpack-config) to use the legacy components, which includes an updated externals configuration to support the new import paths. + +Note that these legacy class components are provided as a short-term migration aid and will be removed in CMS 7. Projects should plan to move away from class inheritance before then. + +The new functional components provide exports (for example `getInputProps()`, `handleChange()`, and `render()`) that were previously provided via class inheritance. If you previously extended class components, migrate to functional components by composing the exported helpers in your own components. + +## Bug fixes + +This release includes a number of bug fixes to improve a broad range of areas. Check the change logs for full details of these fixes split by module. Thank you to the community members that helped contribute these fixes as part of the release!