Commit Graph

7 Commits

Author SHA1 Message Date
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 6b801b8c5c Console recruit message has been moved to MobileFrontend
Change-Id: I48eb8ac7471f7e17ed10ac326230cf2ffed467d1
Depends-On: I3ee0c34139ec658566e8d324a3c8c28a80e930fd
2018-02-01 00:48:13 +00:00
jdlrobson 8729f0b654 Hygiene: Minerva uses skin instance defined by MobileFrontend
The global events for resize and throttled will also be defined
inside MobileFrontend.

Depends-On: I8503c26bd064ae0d203f95a35031468c7c678ac1
Bug: T173454
Change-Id: I00d361ad504ab90f2bf80a53a7c76269f1116207
2017-10-11 23:43:57 +00:00
jdlrobson c04c58a4d7 Minerva is responsible for loading tablet modules in tablet mode
Since Minerva is the only skin which does this kind of thing, it
was premature to add this logic to the Skin module.

By forcing Minerva to do this itself, we allow MobileFrontend to
be responsible for creating a Skin without having to know about
what that skin may want to load in tablet mode.
(see I8503c26bd064ae0d203f95a35031468c7c678ac1)

Bug: T173454
Change-Id: I32e2b4a10799a06138bfee08abc6769a6b96004d
2017-10-11 15:41:46 -07:00
jdlrobson bf907afd46 Hygiene: Do not pass mainMenu to Skin
This wires the interaction between the skin and the main menu
into the initialisation script.

Change-Id: I4fac234cb9ead7e99dc52f72819cd4a3c715de1c
Depends-On: Ife64c87716a0f56b55a030a3e4224075af3c6d8c
2017-09-07 17:49:02 +00:00
jdlrobson 38474ed73f Hygiene: Cleanup initialisation files
* Remove deprecated module definitions
* Remove unnecessary check for Minerva skin (this is only
ever run by Minerva skin)
* Move overlayManager to place it is first used
* Make Skin::getMainMenu method redundant

Change-Id: I17ea52172e7fae0a8f0e06b8418c7ed5bb01ef64
2017-09-07 17:48:58 +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