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

Improve default documentation rendering behaviors #11817

Merged

Conversation

Josmithr
Copy link
Contributor

@Josmithr Josmithr commented Sep 3, 2022

"V1" of the library was configured with rendering policies to (mostly) match our existing website rendering. I peeled most of these changes out into a separate PR to avoid conflating the introduction of new infrastructure with rendering improvements. It additionally made before/after comparisons much easier to make.

This PR introduces the rendering improvements I would have otherwise included in the initial package version. It also includes a couple of "fixes" to address issues I discovered later.

Improvements include:

  • Add Alert rendering for deprecation notices, etc. (this was lacking in the initial implementation as an oversight).
  • Add DEPRECATED alert column/cells to table containing deprecated items, to make deprecation more immediately evident.
  • Change to the default child content ordering of Package/Namespace as follows: (Class, Function, Interface, Namespace, Variable, Type) -> (Interface, Class, Type, Function, Variable, Namespace).
    • In particular, this hoists Interface items above other item kinds, as these are generally the most semantically important.
  • Separate static and non-static Class/Interface members
    • Hoists static members to the top. Makes the usage-wise distinction of different properties, methods, etc. more clear.
  • Add @sealed and @virtual to list of tags added to "Modifiers" table cells by default.
  • Add support for @see comment blocks (added to the bottom of any parent section as appropriate).
  • Add configuration option for specifying text contents to insert into empty table cells.
  • Improve header rendering for unnamed/signature items (displays the signature itself in the heading, rather than just something like "(constructor)".

Also update some related documentation.

Notes:

  • The website's MarkdownEmitter implementation has been pre-fixed to correctly handle alert rendering, and fix note-box rendering, but these changes will not be reflected in the site's content until the new package version has been published and adopted, which will occur in a separate PR.

docs/markdown-emitter.js Outdated Show resolved Hide resolved
packages/common/core-interfaces/src/fluidPackage.ts Outdated Show resolved Hide resolved
packages/common/core-interfaces/src/fluidPackage.ts Outdated Show resolved Hide resolved
packages/common/core-interfaces/src/fluidPackage.ts Outdated Show resolved Hide resolved
docs/markdown-emitter.js Outdated Show resolved Hide resolved
@github-actions github-actions bot removed the area: driver Driver related issues label Sep 6, 2022
@github-actions github-actions bot removed the area: dds Issues related to distributed data structures label Sep 6, 2022
@Josmithr Josmithr marked this pull request as ready for review September 6, 2022 19:00
@Josmithr Josmithr requested review from msfluid-bot and a team as code owners September 6, 2022 19:00
@github-actions
Copy link
Contributor

github-actions bot commented Sep 6, 2022

🔗 Found some broken links! 💔

Run a link check locally to find them. See
https://github.com/microsoft/FluidFramework/wiki/Checking-for-broken-links-in-the-documentation for more information.

linkcheck output


> fluidframework-docs@0.25.0 linkcheck /home/runner/work/FluidFramework/FluidFramework/docs
> npm run linkcheck:fast -- --external


> fluidframework-docs@0.25.0 linkcheck:fast /home/runner/work/FluidFramework/FluidFramework/docs
> linkcheck http://localhost:1313 --skip-file skipped-urls.txt "--external"

Crawling...

http://localhost:1313/css/style.min.f22f6c22fcc37a0d857a17c9c1202a67c28deef90cc26a52b7539b903f623331.css
- (1:1031) url(...) => https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/light/latest.svg (HTTP 503)
- (1:1272) url(...) => https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/semilight/latest.eot? (HTTP 503)
- (1:1740) url(...) => https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/semilight/latest.svg (HTTP 503)
- (1:2427) url(...) => https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/normal/latest.svg (HTTP 503)
- (1:3130) url(...) => https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/semibold/latest.svg (HTTP 503)
- (1:3286) url(...) => https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/bold/latest.eot (HTTP 503)
- (1:3369) url(...) => https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/bold/latest.eot? (HTTP 503)
- (1:3811) url(...) => https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/bold/latest.svg (HTTP 503)

http://localhost:1313/docs/apis/core-interfaces/ifluidcodedetailscomparer-interface
- (885:360) 'Array.sort' => https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Description (HTTP 200 but missing anchor)
- (896:168) 'https://..' => https://github.com/npm/node-semver#usage (HTTP 200 but missing anchor)
- (904:25) 'Array.sort' => https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Description (HTTP 200 but missing anchor)
- (950:25) 'https://..' => https://github.com/npm/node-semver#usage (HTTP 200 but missing anchor)

http://localhost:1313/docs/apis/core-interfaces/ifluidcodedetailscomparer-interface/
- (885:360) 'Array.sort' => https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Description (HTTP 200 but missing anchor)
- (896:168) 'https://..' => https://github.com/npm/node-semver#usage (HTTP 200 but missing anchor)
- (904:25) 'Array.sort' => https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Description (HTTP 200 but missing anchor)
- (950:25) 'https://..' => https://github.com/npm/node-semver#usage (HTTP 200 but missing anchor)


Stats:
  123622 links
    1307 destination URLs
       1 URLs ignored
       8 warnings
       8 errors


@Josmithr Josmithr merged commit a69b8f0 into microsoft:main Sep 6, 2022
@Josmithr Josmithr deleted the api-markdown-documenter-improved-rendering branch September 6, 2022 23:56
@github-actions
Copy link
Contributor

github-actions bot commented Sep 6, 2022

This commit is queued for merging with the next branch! Please ignore this PR for now. Contact @microsoft/fluid-cr-infra for help.

Copy link
Member

@tylerbutler tylerbutler left a comment

Choose a reason for hiding this comment

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

🧵

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: website base: main PRs targeted against main branch documentation Improvements or additions to documentation public api change Changes to a public API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants