Commit graph

9 commits

Author SHA1 Message Date
David Barratt 6bea4324c6
Block reason messages escape HTML
The block reason in the block message has escaped HTML. This
HTML should be rendered to the user.

Bug: T190901
Change-Id: Icda7c5d0c76aff7c22f3a6735d880a5ee49338ff
2018-03-28 12:36:43 -04:00
jdlrobson 6cdcc8ddfa Fix editing of non-mobile-formatted pages
Template pages do not run the MobileFormatter
(see MFMobileFormatterNamespaceBlacklist).

As a result page.getLeadSectionElement() will
return null

When this happens do not change the edit icon to point
to section 1. Instead give them the non-JS editor.

After this patch, the feature remains as:

* Page with lead section get the JS edit overlay for section 0
* Page without lead section but with other sections gets the JS overlay
  editor for section 1
* Pages that didn't run through MobileFormatter don't modify the edit
  link and just link to the fallback editor (useful for Template pages
  at this moment)

Bug: T172948
Change-Id: Icee96e12f62ec13a1cbd3169c687fa4b3af70754
2018-01-29 20:56:31 +00:00
jdlrobson c5d09c0288 Prefix icons in Minerva
Changes:
* MinervaUI will now prefix any icons with `minerva`
* Update definitions in skin.json, retaining selectors for cached
HTML for icons that are rendered via PHP.
* In I9021c53c2c04bdd7ce395eed33d89986acbfea6d watch and watched
and arrow are moved to MobileFrontend so are removed from the RL module
skins.minerva.icons.images.scripts as they are not
used directly in this repo. user and anonymous are no longer used
so also removed.
* Presentation of userpage now belongs to MobileFrontend. Icons
are styles were moved there in depends on. They are retained in
skin.json to support cached HTML as user pages are subject to
cache. They can be removed in a week.
* In code review we noticed the anonymous icon was badly named. We
rename to login. No caching implications.
* Main menu icons are now prefixed with minerva rather than mf to
reflect where they come from.

Depends-On: I9021c53c2c04bdd7ce395eed33d89986acbfea6d
Bug: T182162
Change-Id: I93264024f4915fc910c792b1905b89cdc6b8b546
2018-01-19 15:30:03 -08:00
jdlrobson 0ee78ce0cb EventLogging modules should be soft dependencies
Change-Id: Ibc546a89b11360769c9c50dc52cb9b7b5e433100
2017-09-27 20:52:15 +00:00
jdlrobson ac7fcfc9e1 Disable wikitext editor on non-wikitext content models
Do not allow editing via JavaScript on non-wikitext content models
For these pages ?action=edit will be used

Bug: T173800
Change-Id: Ic62a0c1397ab8a6a59e5382c2999b63b3c60a19f
2017-08-22 17:02:58 +00:00
jdlrobson b478393e5e Hygiene: The main page check is not necessary
The main page in the Minerva skin is not editable so this code is
just cruft. T89559 no longer applies.

Change-Id: Ifcd30be0d4e328b056cc7fcfb714c9783b62c913
2017-08-03 15:58:18 -07:00
Baha 975d632d12 Use lead section when editing page without section marks
The config variable `MFNamespacesWithoutCollapsibleSections` controls
namespaces where section collapsing is disabled. In those namespaces
page is not divided into sections marked with `.mf-section-X` classes.
If that's the case the edit button edits the first section, which is
the whole page.

Bug: T157995
Change-Id: I3ec353575529c1fb11a33fc35c9886cf232e327f
2017-08-01 19:01:20 -04:00
Baha 6f8b3d040c Make sure lead section exists before accessing its method
The `getLeadSectionElement` method of `Page` may return a `null`. Do
not try to access the `text` method of the returned object if it's
`null`.

Bug: T157995
Change-Id: Ia752fa52d1b09a307dc4b803a6b7e1bdcfe7f867
2017-07-31 15:21:06 -04: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