Commit Graph

7 Commits

Author SHA1 Message Date
jdlrobson 7962ba87a5 Docs: Present classes rather than modules
Use classes rather than modules for the various Views inside
Minerva.

Change-Id: I849ae50e48c01012ba6713ec3bf5f1c836ef22bc
2018-08-20 16:43:41 -07:00
jdlrobson 99bc9d8c55 Enforce lowercase jsdoc types
Follow up to I6cbac15940e4501aee7ede8f421b77ffd027170d

Change-Id: I22bcbf1f083451a0f68b692b9a0acc716d11c62c
2018-07-17 08:06:35 -05:00
Stephen Niedzielski 874d9c9e3b Hygiene: update JSDoc boxed and JQuery types
From TypeScript's do's and don'ts:[0]

  Don’t ever use the types Number, String, Boolean, or Object. These
  types refer to non-primitive boxed objects that are almost never used
  appropriately in JavaScript code.

Although Minerva only uses JSDocs at this time which seemingly doesn't
care about casing[1], we should endeavor to use the proper return types.

This patch lowercases typing to indicate primitive / boxed type as
appropriate.[2] As a special case, function types are uppercased for
compatibility with TypeScript type checking.

Also, JQuery types are of type "JQuery". The global JQuery object's
identifier is "jQuery". This patch uppercases J's where appropriate.

Lastly, replace unsupported type "Integer" with "number" and a comment.

[0] https://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html#general-types

[1] https://github.com/jsdoc3/jsdoc/issues/1046#issuecomment-126477791

[2] find resources tests -iname \*.js|
    xargs -rd\\n sed -ri '
      s%\{\s*(number|string|boolean|object|null|undefined)%{\L\1%gi;
      s%\{\s*function%{Function%g;
      s%\{\s*jquery%{JQuery%gi;
      s%\{\s*integer\s*\}%{number} An integer.%gi
    '

Change-Id: I6cbac15940e4501aee7ede8f421b77ffd027170d
2018-07-03 11:10:12 -05:00
jdlrobson eaa2692da0 Use jsdoc for generating Minerva documentation
Given the level of documentation in this repo is extremely
low now seems a good as time as any.

The resulting documentation is a vast improvement on before
grouping functions to an owner and introducing module names.

We can iterate on the documentation over time.

Bug: T138401
Change-Id: I9e787d40931d3d72a7037ce07d3ab0db8e72d825
2018-03-15 15:01:41 -07:00
jdlrobson 0ee78ce0cb EventLogging modules should be soft dependencies
Change-Id: Ibc546a89b11360769c9c50dc52cb9b7b5e433100
2017-09-27 20:52:15 +00:00
jdlrobson efc84d2f25 Add tooling for documentation
* Add global View and Page
* Remove inheritdoc statements for globals - docs
  cannot be inherited from a class defined in another repo

Note:
you'll need to `gem install jsduck` for this to work

Bug: T170639
Change-Id: Idb3a6e9edbd45889047e7904561b84033569a689
2017-07-20 22:34:41 +00:00
jdlrobson 2cc9516cde Minerva is its own skin
This is programmatic output from python3 scripts/migrate.py

This will result in a Minerva skin dependent on MobileFrontend.

Post merge we will rename message keys to have minerva- prefix

Bug: T166748
Change-Id: Iff1f7e63e796cc5d4a6d2ab0370e0c33248d2fce
2017-07-12 08:12:40 -07:00