Fix headings in React 19 CHANGELOG#31683
Fix headings in React 19 CHANGELOG#31683eps1lon merged 4 commits intofacebook:mainfrom kachkaev:changelog-19-heading-levels
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| @@ -1,12 +1,12 @@ | |||
| ## 19.0.0 (December 5, 2024\) | |||
| ## 19.0.0 (December 5, 2024) | |||
There was a problem hiding this comment.
\ did not exist in other headings, so I removed it (not sure what this escaping would be useful for)
Lines 270 to 274 in ea353ec
There was a problem hiding this comment.
I saw this in other places as well. Might've been an artifact from copying the original doc into markdown.
|
|
||
| > Note: To help make the upgrade to React 19 easier, we’ve published a react@18.3 release that is identical to 18.2 but adds warnings for deprecated APIs and other changes that are needed for React 19. We recommend upgrading to React 18.3.1 first to help identify any issues before upgrading to React 19. | ||
|
|
||
| ### New Features |
There was a problem hiding this comment.
Actually, I think the mistake is here. The changelog title is level 1 and then we skip level 2. "All Changes" below does it right and is at level 2. So I guess we need to dedent "New Features", "Breaking Changes", "Deprecations", "TypeScript changes", and "Notable Changes" instead.
That's what I did in the release: https://github.com/facebook/react/releases/tag/v19.0.0
There was a problem hiding this comment.
I see what you mean, done this in 4487a65.
We still have a somewhat incorrect document structure though, and it’s because version numbers have now got the same heading levels as New features, All changes. Here is the outline of CHANGELOG.md:
main
↑ Types of change and areas are mixed
This PR before review
↑ Nesting is semantically meaningful, but areas are at level 4 while they are often at level 3 in previous versions
This PR after 4487a65
↑ Version and types of change are at the same level
So we can imagine software like Renovate bot scanning the mardown and detecting v19.0.0 changelog only between these lines:
Lines 1 to 7 in 4487a65
As a permanent solution, we can switch to this in the whole markdown in a follow-up:
# 1.2.3 (Jan 1, 1970)
## Type of change (e.g. New Features) – can be skipped in patch releases
### Area (e.g. React DOM Client) – always at level 3Happy to open a separate PR if you see value in this kind of cleanup.
Alternatively, we could do this:
# React.js Changelog
## 1.2.3 (Jan 1, 1970)
### Type of change (e.g. New Features) – can be skipped in patch releases
#### Area (e.g. React DOM Client) – always at level 4There was a problem hiding this comment.
Right, in the release it starts at level on and in the markdown at level 2
GH release starts at level 1 but in here we start at level 2 Need to adjust leveling when we c&p the markdown into the GH release.
|
Thank you |
Co-authored-by: eps1lon <sebastian.silbermann@vercel.com> DiffTrain build for [7283a21](facebook@7283a21)
Co-authored-by: eps1lon <sebastian.silbermann@vercel.com> DiffTrain build for [7283a21](facebook@7283a21)
Summary
Addresses #31675 (comment) / #31678 (comment)
How did you test this change?
Read-through / Visual inspection