Skip to content

Conversation

@erickzhao
Copy link
Member

@erickzhao erickzhao commented May 2, 2025

The main problem this fixes is that we're using \r\n for our major version release notes, so comparisons featuring a major version will be empty.

For example:
https://releases.electronjs.org/release/compare/v36.0.0-beta.9/v36.0.0

This PR makes the parsing more resilient by accepting both \n and \r\n.

The rest of the changes kind of follow from there to make the styling a bit better:

  • Parsed ## headings are actually <h2> now so headings are semantic.
  • Text size is made more uniform for headings within release notes.

@erickzhao erickzhao requested review from a team as code owners May 2, 2025 18:36
@MarshallOfSound MarshallOfSound temporarily deployed to release-stat-fix-window-y2qrok May 2, 2025 18:51 Inactive
Comment on lines 237 to 238
<h4 className="text-lg font-semibold text-[#2f3241] dark:text-white mb-4">
<h2 className="text-lg font-semibold text-[#2f3241] dark:text-white mb-4">
{groupName}
</h4>
</h2>
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure this change is correct? The "Combined Release Notes" header is h3, so I think h4 here makes sense?

The headers go "Electron Releases" -> "Release Comparison" -> "Combined Release Notes"

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed in 9eb23f3 by shifting the rendered Markdown headings from the release notes by +2

Copy link
Member

Choose a reason for hiding this comment

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

Would adding levelShift: 2 to listMD also fix #155?

@MarshallOfSound MarshallOfSound temporarily deployed to release-stat-fix-window-y2qrok May 2, 2025 20:01 Inactive
@erickzhao erickzhao requested a review from dsanders11 May 2, 2025 20:03
Comment on lines -21 to -29
'1': 'text-xl font-bold mb-3',
'2': 'text-xl font-semibold mb-3',
'3': 'text-xl font-semibold mb-3',
'4': 'text-xl font-semibold mb-3',
'5': 'text-lg font-medium mb-2',
'6': 'text-base font-medium mb-1',
Copy link
Member

Choose a reason for hiding this comment

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

Why did we drop the text size classes?

Copy link
Member Author

Choose a reason for hiding this comment

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

@MarshallOfSound some of the headings in the PR details have text-lg set to them so I wanted to make the heading level appearances more consistent:

<h3 className="text-lg font-semibold text-[#2f3241] dark:text-white flex items-center gap-2">
<GitBranch className="w-5 h-5" />
Backport Information
</h3>

With the PR in the state it is now, I don't actually think we need this change necessarily (headings generated by markdown-renderer in the compare view are h5 after 9eb23f3), but we could instead do the following to match the non-MD heading styles:

h1: text-xl
h2: text-xl
h3: text-lg
h4: text-lg
h5: text-base
h6: text-base

Copy link
Member Author

Choose a reason for hiding this comment

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

@MarshallOfSound MarshallOfSound temporarily deployed to release-stat-fix-window-q04cjk May 5, 2025 16:34 Inactive
@MarshallOfSound MarshallOfSound temporarily deployed to release-stat-fix-window-mvdddc September 3, 2025 18:06 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants