Skip to content
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

Fix headings in React 19 CHANGELOG #31683

Merged
merged 4 commits into from
Dec 6, 2024

Conversation

kachkaev
Copy link
Contributor

@kachkaev kachkaev commented Dec 5, 2024

Summary

Addresses #31675 (comment) / #31678 (comment)

How did you test this change?

Read-through / Visual inspection

Copy link

vercel bot commented Dec 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-compiler-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 6, 2024 3:47pm

@@ -1,12 +1,12 @@
## 19.0.0 (December 5, 2024\)
## 19.0.0 (December 5, 2024)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\ did not exist in other headings, so I removed it (not sure what this escaping would be useful for)

react/CHANGELOG.md

Lines 270 to 274 in ea353ec

## 18.3.1 (April 26, 2024)
- Export `act` from `react` [f1338f](https://github.com/facebook/react/commit/f1338f8080abd1386454a10bbf93d67bfe37ce85)
## 18.3.0 (April 25, 2024)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw this in other places as well. Might've been an artifact from copying the original doc into markdown.

Copy link
Collaborator

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@@ -1,12 +1,12 @@
## 19.0.0 (December 5, 2024\)
## 19.0.0 (December 5, 2024)

Below is a list of all new features, APIs, deprecations, and breaking changes. Read [React 19 release post](https://react.dev/blog/2024/04/25/react-19) and [React 19 upgrade guide](https://react.dev/blog/2024/04/25/react-19-upgrade-guide) for more information.

> 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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

@kachkaev kachkaev Dec 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

react/CHANGELOG.md

Lines 1 to 7 in 4487a65

## 19.0.0 (December 5, 2024)
Below is a list of all new features, APIs, deprecations, and breaking changes. Read [React 19 release post](https://react.dev/blog/2024/04/25/react-19) and [React 19 upgrade guide](https://react.dev/blog/2024/04/25/react-19-upgrade-guide) for more information.
> 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

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 3

Happy 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 4

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@eps1lon
Copy link
Collaborator

eps1lon commented Dec 6, 2024

Thank you

@eps1lon eps1lon merged commit 7283a21 into facebook:main Dec 6, 2024
5 checks passed
@kachkaev kachkaev deleted the changelog-19-heading-levels branch December 6, 2024 16:05
github-actions bot pushed a commit to AreaLayer/react that referenced this pull request Dec 8, 2024
Co-authored-by: eps1lon <sebastian.silbermann@vercel.com>

DiffTrain build for [7283a21](facebook@7283a21)
github-actions bot pushed a commit to AreaLayer/react that referenced this pull request Dec 8, 2024
Co-authored-by: eps1lon <sebastian.silbermann@vercel.com>

DiffTrain build for [7283a21](facebook@7283a21)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants