Commit graph

11 commits

Author SHA1 Message Date
Kunal Mehta
9f9a5f2290 Add user preference to control responsive MonoBook
This provides a device agnostic, persistent opt-out for the new responsive
functionality.

The preference will show up under the skin selector if the user has their
skin already set to MonoBook. I considered adding a new skin option to
the radio selector of skins, but that is probably unnecessary for the
majority of users, in addition to complicating how to differentiate the
two modes (Classic MonoBook vs. Modern MonoBook?).

Wikis that want to make this opt-in can control the default in the standard
way ($wgDefaultUserOptions), or hide it entirely ($wgHiddenPrefs).

Change-Id: Id22f8e5199ff2b15fd03c94097db5cdc7188f8b1
2018-06-04 21:40:09 -07:00
Timo Tijhof
6dccc0d96e Re-implement and improve mw-jump links with pure CSS
* Improve their accessibility by giving both links a full label
  ("Jump to x" and "Jump to y" instead of "Jump to: ", "x", "y").

  This also makes things better for localisation.

* Use pure CSS for the toggling of the visibility on focus,
  instead of relying on JavaScript. Especially given the
  JS came from core's 'jquery.mw-jump' module, which is
  considered technical debt per T195256.

* Use plain <a> links in the HTML instead of wrapped in a <div>.
  This solves the long-standing problem whereby the margin
  between #contentSub and #mw-content-text had to be awkwardly
  negated and overridden.

Bug: T195256
Change-Id: I40a769ee3a822a5a9167ec1d144e6b151eb8e141
2018-05-24 01:30:55 +01:00
Brian Wolff
18ed5d4caa Fix ?debug=1 mode for resources
Change-Id: I7e746e7c5af8ffd7c4ca06742ab1fe6bc94ba522
2018-05-20 14:41:44 +00:00
Isarra
ca53e721ab Mobile - reorganise and clean up p-personal js dropdown
* Reorder ULS and Echo links
* Rename conditional module load hook to be more generic, and add
  ULS module
* Remove .active bolding from dropdown

Change-Id: I7e746e7c5af8ffd7c4ca06742ab1fe6bc94ba531
2018-05-20 10:29:50 +00:00
Isarra
ef1f98e7bd Responsive support: Echo hacks
Have echo just show the numbers instead of the badges, and add a
text link to special:notifications in the dropdown, as opposed to
entirely reimplementing the flyout layout

Change-Id: I072dbc2b7bf70b6675469e09e3beb3927e06d0f7
2018-05-19 21:15:31 +00:00
Isarra
0e2ee04c87 Responsive support, JS edition
Dropdown menus and js interactiveness for people who like to pretend
we live in a modern era or something.

Does not actually support newfangled tapping and swiping stuff.
Does not properly support echo. (will follow up)

Change-Id: I27d50c320b1526b9d158016a0e8022567f78ccc1
2018-05-19 20:17:17 +00:00
Isarra
70d426d4fd Responsive support, noJS version
* Add screen-mobile.css with basic mobile styles
* Force loading of screen-desktop on IE8- due to lack of
  @media width support
* Add some new divs and a set of spoof cactions for jumping
  around the page (what's js?)
* Replace cactions label with a more descriptive string (was
  previously set to display:none regardless)
* Also add a set of icons for fixed widths for tabs and things
  (icons-source.svg is the source file for the set, and includes
  a few others that ultimately weren't used here)

Cutoff 850px. Desktop styles should remain unchanged, with
mobile remaining stylistically consistent.

Change-Id: I737a7447db1e44e0d6abaa4c07813295a5ac73a6
2018-05-02 22:20:54 +00:00
Max Semenik
0a882121e4 Don't use deprecated Sanitizer::escapeId()
Change-Id: I8df63140691db63c37c11f55212e17854f6cdb6c
2018-04-13 16:08:27 -07:00
Isarra
10c0aeaa88 Convert rest of MonoBookTemplate to build giant string and echo once
More helper functions, general refactoring.

Output structure is all the same, all existing attributes
maintained. Some new ones are added:
* p-personal now rendered via getPortlet; has extra attribs
  according to all others rendered with it
* footer rendered with slight variant of getFooter out of
  BaseTemplate; has extra language attribs according to that

Change-Id: I462d1222b0166956d3dce17fbceccf386e179e8d
2018-04-11 02:44:38 +00:00
Isarra
cbc6e46f68 Refactor MonoBookTemplate helper functions to return output
instead of just spitting it out directly

Also rename all of said functions accordingly, add documentation,
and start trying to make an actually cross-compatible version of
getPortlet() for BaseTemplate...

Output should be structurally the same. All existing attributes for
output elements are maintained; some may have new attribs added due
to more consistent render method (getPortlet). (Essentially, if one
item had it, now they all have it.)

New attribs include:
* id
* lang
* dir
* aria-labelledby

Change-Id: I0a7ca1b95c2ad03273ed9c713be0da694c94a176
2018-04-03 04:58:46 +00:00
Isarra
57106ab179 Restructure files according to modern skin practices
Also delete unused images, since even if something is
somewhere using them anyway (looked, couldn't find
anything), it wouldn't be able to find them in the new
image location regardless.

Wiki.png, magnify, and link are all part of core and have
been for some time.

Change-Id: Id7a02155a5f1b207908c9c0c8f7519b6d3f9a886
2018-03-21 21:56:55 +00:00