feat(docs): added links to github changelog to migration page headers#3604
feat(docs): added links to github changelog to migration page headers#3604duvalale wants to merge 7 commits into
Conversation
✅ Deploy Preview for boosted ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
MaxLardenois
left a comment
There was a problem hiding this comment.
I think it'd be better if the changelog link was on a dedicated link or button below the title (or on its right for wider viewports)
Here the link is not easily visible and it lacks an accessible text.
1c99711 to
0563034
Compare
|
I updated the headers to add a dedicated link. |
MaxLardenois
left a comment
There was a problem hiding this comment.
Nice work!
I have some suggestion but nothing blocking so I will approve
| } | ||
|
|
||
| export function getVersionLink(version: string): string { | ||
| return `<a class="link float-end pt-none align-content-center" href="https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/releases/tag/${version}-ouds-web">Full changelog</a>` |
There was a problem hiding this comment.
I would use p-none here to improve alignment.
Also I think we could use a Link with icon (https://web.unified-design-system.orange.com/orange/docs/1.3/components/links/#with-icon) with the "external link" icon from Solaris (https://unified-design-system.orange.com/472794e18/p/03a2da-solaris-icon-finder) to make it clear it's another website (with a target=_blank maybe)
I don't know what will be the result in the TOC though...
There was a problem hiding this comment.
I noticed that version link is not vertically aligned to the heading when using p-none. Only pt-none allows it to be centered.
I added the external link icon.
There was a problem hiding this comment.
I feel it's better if it's somewhat bottom aligned as it's inly text but I will let others give their opinion
| // [[comp]] | ||
| const compRegExp = /\[\[comp\]\]\s*/ | ||
| // [[version-link]] | ||
| const versionLinkRegExp = /\[\[version-link\]\]\s*/ |
There was a problem hiding this comment.
I'm wondering if we shouldn't use [version-changelog-link] to be more precise
There was a problem hiding this comment.
Updated to suggested value
| } | ||
|
|
||
| // A rehype plugin to reorder header anchor and version links | ||
| export const rehypeHeaderLinksOrder: Plugin<[], Root> = function () { |
There was a problem hiding this comment.
Maybe we could simplify this by using the option before on rehypeAutolinkHeadings
This way the anchor-link would always be first (before the actual heading text), this would be that less to do.
But it works as is, just an idea.
There was a problem hiding this comment.
I tried to keep the existing headers as is on purpose, but it is indeed simpler to move the anchor-link before the actual heading.
I removed the rehypeHeaderLinksOrder and updated the autolink conf.
There was a problem hiding this comment.
I kept the existing header as is on purpose, but if I am allowed to update it, it is indeed better to prepend the anchor link.
It's done, and the rehypeHeaderLinksOrder is removed.
There was a problem hiding this comment.
Sorry I was not clear: we should keep the end result as is (anchor-link after the heading text). But for this script I think it might be helpful if the anchor-link were always first, so that you only need to spilt the heading elements and reorder everytime, no need to find the anchor-link
…ve reordering plugin
d214b9e to
3a38f39
Compare
Related issues
Closes #3457
Description
Updated migration page headers to add link redirecting to matching changelog.
I chose not to add the v0.2.0 link since there is no changelog nor release associated.
Checklists
Progression (for Core Team only)
ouds/mainfollowing conventional commitLive previews