The readability of cleanuptemplates is hurt by having an anonymous
function embedded inside.
This patch wraps initPageIssues with the jquery ready call and removes
the function wrapper and decreases the indent of its contents.
Purely stylistic change.
Change-Id: I44b2371add32780f96160e0075787a9ea7222f39
The hook that enables the Reading depth test should send an
additional paramter that specifies which test bucket the hook
being is calling from.
Bug: T191532
Change-Id: Ifd9f43220c476ece8a0c0cee46b62b58a717c616
Truncates ambox template styles to only show 2 lines of text.
"Learn more" link is placed on the same line as message text
and a fade is applied so that it doesn't overlap with the message text.
On table & larger layouts, the "learn more" link is placed on its
own line below the page-issue text.
Bug: T197931
Change-Id: Id607dea537c212298c02a0e1639aef2a786eb424
The section number relates to the position of the corresponding heading
not the corresponding top level section.
This only changes the URL, not the functionality. sub section issues
will continue to be grouped along with other section issues.
Bug: T197932
Change-Id: I325a3b477f89c9cc24f13ca017f478a6b7e7b68e
- Fix a bug where the all issues endpoint would incorrectly collect
issues from all sections.
- Update the page issue iconography. This increases the size of the
delivered code and images by 1743 B minified uncompressed according to
mw.inspect() (from 16.4 KiB to 18.1 KiB).
- Add support for identifying page issue severity based on template CSS
classes.
- For multiple issues templates, show the highest priority icon.
Bug: T191528
Change-Id: Ie0a4c83ec7cfb856ec581d058797109746e3cb99
Per https://phabricator.wikimedia.org/T197932#4417319
Note that given talk/category overlay does not use or
display section issues, to simplify things any section other
than 0 or all will use this heading.
Bug: T197932
Change-Id: I737fb07aaadcea7772d0b08f8b0652dcf2f4623d
Parse all issues inside a page, and load them into the issues overlay.
In group A, given issues inside later sections are hidden, it will not be possible
to navigate to these new overlay screens. In group A, lead section issues will continue
to only show lead section issues.
Changes:
* The /issues route is replaced by the more specific /issues/all and
/issues/{section num}, issues are stored in an "allIssues" module object.
* Begin using constants for namespaces for better readability
* Drop width 100% - this breaks display on tablet devices of issues within
sections
* Improve createBanner documentation to explain different treatments
* Set the issues overlay header inside initPageIssues when setting up
the route.
Bug: T197932
Change-Id: I21470648a61d57cfa4befceec596cf0f6e2110ec
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
This is currently showing up on sisterbox templates e.g.
the one on Category:Beekeeping
Bug: T197728
Change-Id: Idaf4aeb4a9efb668e5c06e19ce1eddace121e741
Changes:
* Introduce Jan's beautifully documented $wgMinervaABSamplingRate
Set to 1 to A/B test 50% of the population
* Split out ambox template styles into a separate file referenced
by hacks.less
* Update cleanuptemplates setup script to consider two buckets
Test pages:
* Shqiponja_Partizane
* World_War_II_in_Albania
* Liberation_of_Tirana
* French_Consulate
* Abd_ar-Rahman_IV
* M109_howitzer
* Aimoin
* Transport_in_Brazil
* Transport_in_Cape_Verde
Bug: T191303
Change-Id: I8d11e655ccb847b7999e64dda57b225ad8b1c23a
More hackery!
This adds some tests and ensures that our own icons are mapped to the
existing template icons.
Bug: T187916
Change-Id: I49073f22995c6730369235d6039939915ba2079c
In edit mode various amboxes are shown which push the editor area
below the fold.
We solved this problem already for "page issues" in normal page views
so we should apply the same solution here.
"Editing help" message will show under the heading. When clicked
information will show in an overlay.
Change-Id: Ia6e478f289267d22adc55532221cba2aae16ff36
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