Skip to content

build(docs): show exported constants in docs #13168

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

Merged

Conversation

devversion
Copy link
Member

@devversion devversion commented Sep 17, 2018

  • Currently constants which are exported will not show up in the docs. This introduces support for displaying constants in the docs.
  • Also creates a Nunjucks plugin that supports highlighting specific code snippets. This is helpful when rendering a type in the docs (similar to angular/aio)
  • Marks most animation constants as @docs-private because those shouldn't be relevant to users.

Screenshot:

image

The idea of showing the constants in this format comes from the Angular docs.

@devversion devversion added pr: merge safe target: patch This PR is targeted for the next patch release labels Sep 17, 2018
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Sep 17, 2018
@josephperrott josephperrott removed their request for review September 17, 2018 15:01

<pre class="docs-markdown-pre">
<code class="docs-markdown-code">
{%- highlight "typescript" -%}
Copy link
Member

Choose a reason for hiding this comment

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

Why use highlightjs here when we don't do this for any of the other symbol types?

Copy link
Member Author

@devversion devversion Sep 17, 2018

Choose a reason for hiding this comment

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

Well, I couldn't think of anything that is describing the constant better.

My goal would be to do this for the other types as well (in follow-ups)

This also just looks way better IMO & also describes exports pretty good (besides the description). This is how Angular.io also does it

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker labels Sep 17, 2018
@ngbot
Copy link

ngbot bot commented Sep 18, 2018

Hi @devversion! This PR has merge conflicts due to recent upstream merges.
Please help to unblock it by resolving these conflicts. Thanks!

* Currently constants which are exported, will not show up in the docs. This introduces support for displaying `constants` in the docs.
* Also creates a Nunjucks plugin that supports highlighting specific code snippets. This is helpful when rendering a type in the docs (similar to angular/aio)
* Marks most animation constants as `@docs-private` because those shouldn't be relevant to users.
@devversion devversion force-pushed the docs/show-exported-constants branch from bd78143 to e62c2ad Compare September 19, 2018 09:44
@vivian-hu-zz vivian-hu-zz merged commit 6a73273 into angular:master Oct 4, 2018
roboshoes pushed a commit to roboshoes/material2 that referenced this pull request Oct 23, 2018
* Currently constants which are exported, will not show up in the docs. This introduces support for displaying `constants` in the docs.
* Also creates a Nunjucks plugin that supports highlighting specific code snippets. This is helpful when rendering a type in the docs (similar to angular/aio)
* Marks most animation constants as `@docs-private` because those shouldn't be relevant to users.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants