-
Notifications
You must be signed in to change notification settings - Fork 64
fix(compare): support for Windows newlines and improve formatting #167
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
base: main
Are you sure you want to change the base?
Changes from 2 commits
33f5858
1d9a408
9eb23f3
457021e
33467d3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -72,22 +72,21 @@ export const loader = async (args: LoaderFunctionArgs) => { | |
| return redirect('/release'); | ||
| } | ||
|
|
||
| const grouped = renderGroupedReleaseNotes( | ||
| versionsForNotes.map((version, i) => { | ||
| let releaseNotes = githubReleaseNotes[i]!; | ||
| const parsed = semverParse(version); | ||
| if (parsed?.prerelease.length) { | ||
| releaseNotes = releaseNotes?.split(new RegExp(`@${escapeRegExp(version)}\`?.`))[1]; | ||
| } | ||
| releaseNotes = | ||
| releaseNotes?.replace(/# Release Notes for [^\r\n]+(?:(?:\n)|(?:\r\n))/i, '') || | ||
| 'Missing...'; | ||
| return { | ||
| version, | ||
| content: releaseNotes, | ||
| }; | ||
| }), | ||
| ); | ||
| const rawGroupedNotes = versionsForNotes.map((version, i) => { | ||
| let releaseNotes = githubReleaseNotes[i]!; | ||
| const parsed = semverParse(version); | ||
| if (parsed?.prerelease.length) { | ||
| releaseNotes = releaseNotes?.split(new RegExp(`@${escapeRegExp(version)}\`?.`))[1]; | ||
| } | ||
| releaseNotes = | ||
| releaseNotes?.replace(/# Release Notes for [^\r\n]+(?:(?:\n)|(?:\r\n))/i, '') || 'Missing...'; | ||
| return { | ||
| version, | ||
| content: releaseNotes, | ||
| }; | ||
| }); | ||
|
|
||
| const grouped = renderGroupedReleaseNotes(rawGroupedNotes); | ||
|
|
||
| return { | ||
| fromElectronRelease, | ||
|
|
@@ -234,9 +233,9 @@ export default function CompareReleases() { | |
| {Object.keys(grouped).map((groupName) => { | ||
| return ( | ||
| <div key={groupName}> | ||
| <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> | ||
|
||
| <ul className="space-y-6"> | ||
| {grouped[groupName].map(({ version, content }) => { | ||
| const color = version === toElectronRelease.version ? 'green' : 'purple'; | ||
|
|
||
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.
Why did we drop the text size classes?
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.
@MarshallOfSound some of the headings in the PR details have
text-lgset to them so I wanted to make the heading level appearances more consistent:release-status/app/routes/pr/details.tsx
Lines 263 to 266 in 566e0fa
With the PR in the state it is now, I don't actually think we need this change necessarily (headings generated by
markdown-rendererin the compare view areh5after 9eb23f3), but we could instead do the following to match the non-MD heading styles: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.
457021e