refactor(website): Enhance API shortlinks to support staged renames - #28151
Conversation
|
Hi! Thank you for opening this PR. Want me to review it? Based on the diff (633 lines, 5 files), I've queued these reviewers:
How this works
|
There was a problem hiding this comment.
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| With the feature flag rolled back, new documents and any documents that haven't been upgraded yet will not have the upgrade enabled. | ||
| {/* TODO: link directly to `isStagedUpgradeEnabled` property once it has been released. */} | ||
| You can use <ApiLink package="fluid-framework" api="(TreeViewAlpha:interface)"/>'s `isStagedUpgradeEnabled` property to check whether a document has already been upgraded and conditionally include that upgrade token for those documents. | ||
| You can use <ApiLink package="fluid-framework" api="(TreeViewAlpha:interface).isStagedUpgradeEnabled" newApi/> to check whether a document has already been upgraded and conditionally include that upgrade token for those documents. |
There was a problem hiding this comment.
Note for reviewers: this is an example of one of the classes of problems this PR is aimed at addressing. We added docs for a new property that hadn't yet been released and initially tried to link to it, which caused the website build to fail. We can now "stage" the link, which will go live as soon as the API has been released.
Wayne Ferrao (WayneFerrao)
left a comment
There was a problem hiding this comment.
The core refactor is clean and the tests looks good. Just take a look at the missing md link
Co-authored-by: Joshua Smithrud <54606601+Josmithr@users.noreply.github.com>
Bundle size comparisonBase commit: could not be determined; will be reported when the comparison runs Pending — |
|
🔗 No broken links found! ✅ Your attention to detail is admirable. linkcheck output |
The website publishes from
main, but it consumes API documentation artifacts from release branches. As a result, documentation cannot normally link to a new or renamed API until the related API changes are released.ApiLinkandPackageLinknow support temporary transitions for these cases.New APIs
Add
newApiwhen the published API documentation does not contain the target. The component renders inline code until the target exists. It then renders a link and writes a cleanup warning.Renamed APIs and packages
Use
{ previous, new }to support both sides of a rename. The component links tonewwhen it exists and otherwise links toprevious.When the new target becomes available, the build writes a warning. Replace the transition object with the new value:
Invalid and ambiguous API references remain build errors. Explicit child content is preserved in all transition states.