-
Notifications
You must be signed in to change notification settings - Fork 73
DOC Add changelog for legacy react components #882
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
Open
emteknetnz
wants to merge
1
commit into
silverstripe:6
Choose a base branch
from
creative-commoners:pulls/6/legacy-comps
base: 6
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| --- | ||
| title: 6.3.0 (unreleased) | ||
| --- | ||
|
|
||
| # 6.3.0 (unreleased) | ||
|
|
||
| ## Overview | ||
|
|
||
| <details> | ||
|
|
||
| <summary>Included module versions</summary> | ||
|
|
||
| <!-- markdownlint-disable enhanced-proper-names --> | ||
|
|
||
| | Module | Version | | ||
| | ------ | ------- | | ||
|
|
||
| <!-- markdownlint-enable enhanced-proper-names --> | ||
|
|
||
| </details> | ||
|
|
||
| ## 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 { | ||
| // ... | ||
| } | ||
| ``` | ||
GuySartorelli marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| 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! | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the other bits we have in every changelog (e.g. bug fixes with its blurb) - can't remember if there's more bits but if there is add them too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've added a "performance documentation" and "API changes" which are not in every changelog, and you didn't add the "bug fixes" bit which is in every changelog.
The new section is now also not under "features and enhancements" which is probably where it should be, though it could be considered an API change so I'm okay with either one. Just wanna make sure the section change was intentional
Maybe we should add a "create a pull request to add the next minor changelog using this template" step to the beta release process to streamline this going forward.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, raise a new card for it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have added bugfix section and removed api and performance sections