Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

docs(badges): add experiment, stable, and deprecated badges to API doc. #1118

Closed
wants to merge 1 commit into from
Closed

docs(badges): add experiment, stable, and deprecated badges to API doc. #1118

wants to merge 1 commit into from

Conversation

ericjim
Copy link
Member

@ericjim ericjim commented Apr 19, 2016

Change log

  • Add @experimental, @stable, and @deprecated for dgeni to process.
  • Add @docsNotRequired as well, not actually being used yet.
  • Modify jade.template, which generates a _data.json (a harp.js data context for jade), to include a stability status
  • Stylize _hero.jade and _hero.scss to add badges
  • Fix an issue where the first line of code examples is overlapped, Change margin to example title style #1104, fix in example-title.scss
  • Add inline documentation to make it easy to decipher where the data flows from dgeni to nunjucks to harpjs to jade

Preview

For demonstration purposes, I've included these tags in my local copy of the angular2 project, and hosted a test instance of angular.io. With the current state of angular2 docs, we will only see the doc type, and in some cases (such as FORM_BINDING) the deprecated badge.

The logic which decides which badge to pick is the following:

  // STABILITY STATUS
  // Supported tags:
  // @stable
  // @experimental
  // @deprecated
  // Default is the empty string (no badge)
  var stability = ''; 
  if (_.has(exportDoc, 'stable')) {
    stability = 'stable';
  } else if (_.has(exportDoc, 'experimental')) {
    stability = 'experimental';
  } else if (_.has(exportDoc, 'deprecated')) {
    stability = 'deprecated';
  }

@naomiblack @IgorMinar @petebacondarwin

CLOSES:
#1098
#1097

@ericjim ericjim changed the title docs(badges): Add experiment, stable, and deprecated badges to API doc. docs(badges): add experiment, stable, and deprecated badges to API doc. Apr 19, 2016
…stability. Stylize var.template for new api style docs. Add stable, experimental, docsNotRequired tagdef in dgeni
@naomiblack
Copy link
Contributor

Merged!

@naomiblack naomiblack closed this Apr 20, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants