Page MenuHomePhabricator

Do not load the JavaScript editor for non wikitext pages
Closed, ResolvedPublic

Description

When using the Minerva skin to edit a page that is not wikitext it loads the JS editor for the first section.
Some times this unexpectedly works ie. when editing json
other times it doesn't work eg. wikisource -(editor does not show text that needs translating rendering it unusable)

acceptance criteria

Visiting any page that is not wikitext and clicking edit:

  • should load the fallback editor (e.g. MediaWiki:Mobile.css)
  • should not pass the section parameter (non-wikitext content does not have sections)

testing criteria

We changed the editor behaviour under certain circumstances. We want to verify that this didn't break editing anywhere.

  1. Visit https://en.wikipedia.beta.wmflabs.org/wiki/User:Jdlrobson/common.js (where Jdlrobson is your username)
  2. Click edit icon
  3. Expected: it should reload the page
  1. Visit https://en.wikipedia.beta.wmflabs.org/wiki/Foo
  2. Click edit icon
  3. Expected: it should load an overlay
  1. Hit random
  2. Make sure you can edit the page (or at least be notified why you can't edit the page)

Details

Related Gerrit Patches:
mediawiki/skins/MinervaNeue : masterDisable wikitext editor on non-wikitext content models

Event Timeline

Ineuw created this task.Aug 22 2017, 4:35 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 22 2017, 4:35 AM
Jdlrobson added a subscriber: Jdlrobson.

It's likely an issue with an extension not being compatible with Minerva not a problem with the skin per se.

Minerva has different html from other skins.

I'll investigate tomorrow.

Jdlrobson renamed this task from MinervaNeue desktop has innumerable bugs to MinervaNeue desktop has innumerable bugs on wikisource.Aug 22 2017, 5:00 AM

Change 373076 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/skins/MinervaNeue@master] Disable wikitext editor on non-wikitext content models

https://gerrit.wikimedia.org/r/373076

Looks like the issues can be attributed to a gadget that is breaking this skin (and main menu):
https://wikisource.org/wiki/MediaWiki_talk:Gadget-purgetab.js

With regards to editing:
https://en.wikisource.org/w/index.php?title=Page:Folk-lore_-_A_Quarterly_Review._Volume_16,_1905.djvu/532&useskin=minervaneue&action=edit actually looks usable.
The problem is the JavaScript editor is invoked. The above patch will fix that. Any other issues with the skin integrating with Wikisource will need to raised against ProofreadPage.

Jdlrobson updated the task description. (Show Details)

although on the Special Pages it is listed for mobile. But, it is altogether missing from the mobile Wikisource Settings.

I'm not sure what you mean here? Can you elaborate?

Ineuw added a comment.Aug 22 2017, 2:40 PM

Desktop, Special pages | Version | Installed skins lists Minerva as "A responsive mobile first skin." When I looked for this on my mobile, Minerva is not listed as one of the available skins.

Desktop, Special pages | Version | Installed skins lists Minerva as "A responsive mobile first skin." When I looked for this on my mobile, Minerva is not listed as one of the available skins.

MinervaNeue and Minerva are the same thing. We're working on removing this confusion in T171644.

Ineuw added a comment.Aug 22 2017, 8:42 PM

After reading the conversation of T173598, I recommend that the Minerva skin name should include identification of sorts to know whether the conversations are about the desktop 'D' or the mobile 'M' version. After all, the issues are different.

Change 373076 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@master] Disable wikitext editor on non-wikitext content models

https://gerrit.wikimedia.org/r/373076

Bringing it to current sprint for visibility. Edit button behavior was amended and now it redirects to an editor.

pmiazga renamed this task from MinervaNeue desktop has innumerable bugs on wikisource to Use old editor for non wikitext pages.Aug 22 2017, 10:22 PM
pmiazga moved this task from To Do to Needs QA on the Readers-Web-Kanbanana-Board-Old board.

I renamed this task to be an "editor fix" only. For different issues mentioned at the beginning, we can continue a conversation here but once everything is clear please create a separate phab tickets for issues. It will be easier to manage those, as I see in comments above couple things already have separate tickets.

Jdlrobson updated the task description. (Show Details)
Jdlrobson renamed this task from Use old editor for non wikitext pages to Do not load the JavaScript editor for non wikitext pages.Aug 23 2017, 2:21 PM
Jdlrobson triaged this task as Low priority.
Jdlrobson updated the task description. (Show Details)

I've created T173938 to track the epic and avoid all this confusion. Description has been updated to relate to the editor fix now.

After reading the conversation of T173598, I recommend that the Minerva skin name should include identification of sorts to know whether the conversations are about the desktop 'D' or the mobile 'M' version. After all, the issues are different.

The desktop and mobile version are exactly the same. The only difference is the parser content which is controlled by MobileFrontend, but this impacts all skins not just Minerva (it's just Minerva is in the spotlight because there is no easy way to change the mobile skin). The problems you describe here with the editor are impacting the mobile site as well.

The desktop milestone inside MinervaNeue (which is attached to this task) tracks all the behind the scenes work involved to avoid this confusion.
(I must confess I'm not sure how T173598, relates to this)

Jdlrobson updated the task description. (Show Details)

@Jdlrobson, I did some testing on this based on the test criteria and I think it is working as expected, but I'm not clear. I created a user page. After that, I went to the page and selected Edit. I then went to a random page and selected edit. In both cases, the edit page appeared. The behavior looks about the same. Is this correct?

Jdlrobson closed this task as Resolved.Aug 28 2017, 9:26 PM

Yep thanks or verifying ABorbaWMF!