Commit graph

22 commits

Author SHA1 Message Date
Ammarpad
2f82aabd68 monobook-responsive pref: Follow core preference if set
If the general skin-responsive setting is set, let it overide
monobook-responsive preferences

Eventually remove monobook-responsive when the affected users
have migrated to the general pref (or they're migrated, if necessary)

Bug: T285402
Depends-On: I4e567199a92c0492dac0561a5c7844f6c5c239e6
Change-Id: If6e405eaf1e4c3ac396fdcf2da31501ea3f65b53
2021-06-28 22:03:39 +01:00
jdlrobson
ee59005150 Separate hooks from SkinMonoBook, use namespace
For consistency with other skins, its easier to see how hooks are
invoked when they are separated from the skin.

The skin is also updated to use namespaces and modern skin registration
which has been available since MediaWiki v1.36.

Change-Id: I1c93d4e817b53c93eba47ee9086c86c5d75443e5
2021-06-27 22:06:39 +00:00
Jack Phoenix
57e963507c Move capitalize-all-nouns CSS class support from core to MonoBook
Bug: T97892
Change-Id: I598c4469c46d284562ea3aec79330f9a1f40d2ce
2021-06-17 20:20:55 +00:00
jdlrobson
747c8e6fa8 Monobook should use content-links feature instead of mediawiki.skinning.content.externallinks
Bug: T267577
Change-Id: I94dce8f159eaf3fb533bc0c57a9bab768d376a1e
2020-12-07 18:37:14 +00:00
jdlrobson
3bed284b37 Refactor: Simplify responsive Monobook's optional dependencies
Having module definitions living inside SkinMonobook makes them
less discoverable. It also shouldn't be necessary - even if there
are soft dependencies on other modules.

A new file resources/optional-enhancements.js is added which will
load the two optional dependencies based on whether they have been
installed on the client.

Bug: T203023
Change-Id: If9a88db52deb0cc91d58cbb40693d4cd448eabbc
2020-09-04 15:53:28 +00:00
jdlrobson
5ca99813d0 Drop responsive Monobook IE8 support
Bug: T259316
Change-Id: I85c198601291327bb5edff6d440ce143b8887756
2020-08-04 21:55:36 +00:00
mainframe98
bce6d15d35 Specify the responsive option rather than manually specifying viewport
I6e69b482cdbc adds a viewport with the same value as MonoBook.

Bug: T258290
Depends-On: I6e69b482cdbc49c09adc6f7cee54f5e17b7c92c4
Change-Id: Iae529da5dba07a2eee91a1fa7b29e4bdc163aa40
2020-08-04 11:35:55 +02:00
jdlrobson
f7e483042e Reveal Monobook "enable responsive design" option when skin selected
Currently one has to click save on "Special:Preferences" to reveal
the monobook responsive design option. As of
Iaf68b238a8ac7a4fb22b9ef5d6c5a3394ee2e377 we can reveal this conditionally
when the Monobook skin is selected.

Depends-On: Idd06bcfe7935e16732a6a95c1253dbf95c8aca2e
Bug: T246296
Change-Id: Ibd74cc03f3ccbdc0042163c18ab0f71b6aa556f6
2020-02-26 15:48:00 -08:00
jdlrobson
00234ce031 Drop mediawiki.skinning.interface in preparation for its deprecation
Since MonoBook is never cached on Wikimedia wikis, we don't need
to do anything about both modules being loaded in cached HTML.
There should be no differences before and after this change.

The change must apply to skins.monobook.styles and skins.monobook.responsive
as these modules never load at the same time (see setupSkinUserCss).

Bug: T242177
Change-Id: I5e69cd7f37f7b7a2b6325177b6688a426d92d57f
2020-02-05 18:28:27 +01:00
Volker E
cdafe2a796 Remove IE 6 & 7 specific code
Bug: T234582
Change-Id: I3b51005bdc4ce49a534f8fc005f8e5a67b5c39e7
2019-10-13 09:15:38 -07:00
MarcoAurelio
dd06d6e216 Use oojs-ui.styles.icons-alerts
`ext.echo.badgeicons` got removed in was removed in I8218530e.

Bug: T226503
Change-Id: Id4d912fdaedf94dca8c42d64cc1f342f5566e642
2019-06-25 14:29:29 +00:00
Isarra
1efe5cbc59 Target desktop only for ULS mobile styles, as the ULS styles themselves do
Per Jon's comments here:
https://gerrit.wikimedia.org/r/c/mediawiki/skins/MonoBook/+/434159/1/includes/SkinMonoBook.php#99

Change-Id: Ie91ecd50726b62ce2e8261c40a6a684d879d9c87
2019-01-24 23:16:30 +00:00
Umherirrender
18acebb7fc Add method scope visibility
Change-Id: I1897cff26504b38eecc45491b027b7e6f8c58fd5
2018-11-02 07:40:38 +00:00
jenkins-bot
8a9bea4df7 Merge "Set mobile width cutoff to 550px" 2018-06-06 21:15:39 +00:00
Isarra
406adb14f2 Set mobile width cutoff to 550px
Should avoid more of the issues with unwanted appearance of mobile
layouts. Cutoff results in layout switch when sidebar becomes ~a
third of the total window width.

bug: T196213
Change-Id: I9b8baee5fe53316128f864e732c86750b4e5470e
2018-06-06 21:06:13 +00:00
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
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
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
Renamed from SkinMonoBook.php (Browse further)