Page MenuHomePhabricator

Visual editor source editing preview does not link to changed reference footnotes
Closed, ResolvedPublic1 Estimated Story Points

Description

Use the Visual editor source editing mode and edit some footnote within <ref>...</ref>. If you then preview your changes with Publish Changes/Show preview and click on the footnote, you will be sent to the original article's (unchanged) footnote text. This is unexpected, unhelpful, and differs from the behavior of the old-fashioned source code editor's preview mode.

Event Timeline

Esanders edited projects, added VisualEditor (Current work); removed VisualEditor.
Esanders set the point value for this task to 1.

Change 482081 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/VisualEditor@master] Fix ref links in preview

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

Change 482081 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Fix fragment links in preview

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

So what's the expected behavior now? I see that right now, it does not navigate to any page but stays on the Preview section. Is that the change was about?

It does highlight the reference when I click on the footnote though.

So what's the expected behavior now? I see that right now, it does not navigate to any page but stays on the Preview section. Is that the change was about?

Yes, previously the reference links in the preview would open a new window.

@Esanders: Just a quick question though, on VisualDiff when I click on a reference note it opens a new window, is that a separate issue, or is it fixable by this same change?

Change 492398 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] ve.ui.MWSaveDialog: Fix fragment links in visual diff too

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

matmarex subscribed.

My patch stops the reference footnote links from opening in a new window, but instead they go nowhere, because we don't set the needed ID attributes in the visual diff. I think this is still an improvement (and it is a complete fix for any other links to fragments). We should file a separate task about the remaining issue.

Change 492398 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] ve.ui.MWSaveDialog: Fix fragment links in visual diff too

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

Ryasmeen moved this task from QA to Product owner review on the VisualEditor (Current work) board.

Verified again for the part about visual diff.