Page MenuHomePhabricator

Add link to reference in reference section to reference previews
Closed, ResolvedPublic3 Story Points

Description

Motivation
When wikipedia readers look at a reference preview, they might have a general interest in references, such as: "Which sources is this article based on?" or "This source sounds really interesting and I will need to get much deeper into the topic. Is there other literature that might be interesting to me?"
Therefore, users should have a way to directly jump to the references section when they look at a reference preview

Acceptance Criteria

  • In the footer of the reference preview is a link that says "Jump to reference"
  • If users click on the link, they jump to the reference they previewed as displayed in the references section
  • Said reference is highlighted the same way it would be highlighted when clicking on the footnote indicator right now
  • The behavior should be identical to what happens right now when clicking on the footnote indicator
  • The popup closes if the link is clicked

Mock
The red border is only meant as indication of the relevant part and should not be implemented

Details

Related Gerrit Patches:
mediawiki/extensions/Popups : masterTest for element id passing
mediawiki/extensions/Popups : masterTrigger click on source footnote link
mediawiki/extensions/Popups : masterTrigger click on source footnote link
mediawiki/extensions/Popups : masterFix inconsistent font size in reference popups

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 16 2019, 11:43 AM
Lea_WMDE triaged this task as Medium priority.Jan 16 2019, 2:39 PM
Lea_WMDE updated the task description. (Show Details)
Lea_WMDE set the point value for this task to 5.
Lea_WMDE moved this task from In preparation to Ready for pickup on the Reference Previews board.
Lea_WMDE updated the task description. (Show Details)Jan 23 2019, 1:41 PM
Lea_WMDE changed the point value for this task from 5 to 3.

The font size of "Jump to references" is considerably smaller than the reference itself. Is this a requirement by the pop up extension or can we change that easily?

Change 487161 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/Popups@master] Fix inconsistent font size in reference popups

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

I was under the impression the font size of this link is derived from the existing styling of page previews. For example:

While doing screenshots for this ticket I realized the font size in our Reference Previews is not the same, but much smaller. I uploaded a tiny patch to fix this. After this fix got merged, please let us know is we should make the font even bigger than that.

Change 487161 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Fix inconsistent font size in reference popups

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

WMDE-Fisch added a subscriber: WMDE-Fisch.

The font size of "Jump to references" is considerably smaller than the reference itself. Is this a requirement by the pop up extension or can we change that easily?

Should be adjusted now. But we can also easily change that.

JStrodt_WMDE added a subscriber: JStrodt_WMDE.

Hi. I tested this on https://tools.wmflabs.org/wmde-reference-previews/core/index.php?title=Monkey_testing. From what I see, these points are still open:

  • Said reference is highlighted the same way it would be highlighted when clicking on the footnote indicator right now

I see no highlighting in the footnote at the bottom. (I *do* see highlighting not in the footnote indicator in the body when I jump back up.)

  • The behavior should be identical to what happens right now when clicking on the footnote indicator

What isn't working when clicking on the footnote indicator:

  • No highlighting, see my comment on the check box above.
  • When I click on the first occurrence of footnote [2], I jump down to the right footnote. But sometimes, in the footnote, [2.1] is highlighted bold (expected: [2.0]. Also, the arrow at the beginning of the footnote sometimes leads me up to the second occurrence of the footnote, and not the one where I came from. After testing some more, I could no longer reproduce this behavior.

Change 487829 had a related patch set uploaded (by WMDE-Fisch; owner: WMDE-Fisch):
[mediawiki/extensions/Popups@master] Trigger click on source footnote link

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

Hm. Generally, the monkey testing page is not the best to do such tests. It contains extreme edge-cases of unknown relevance for real-world wiki pages. We never specified an expected behavior for most of these edge-cases. If a report refers to an example on the monkey testing page, it is important to let us know which one was used.

Also, as far as I understand the feature referred to is not the normal highlighting of rows (which works, as far as I can see), but the extra highlighting we just recently introduced via T194511. Can we, please:

  • Open a new ticket for this unexpected interaction between the Cite and Popups extensions? We had a quick look at the issue already, and it can be resolved in many different ways, which we might need to discuss first. We might even need to touch the Cite extension again.
  • Can we resolve the sub-issue T210281 first? I don't think it makes a lot of sense to discuss feature-perfection like this if – to my knowledge – the feature can not even be used on English Wikipedia.

Change 487844 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/Popups@master] Streamline click event forwarding to original reference link

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

Heyho,
it seems that the biggest issue was fixed already: The list entry in the references section is highlighted bold. Yay!
The second part under discussion is the correct behavior of arrow/caret and jumpmarks (such as 1.1, 1.2 etc). @JStrodt_WMDE is absolutely right to call out that this does not work as expected - from the user perspective there is no reason why clicking on the link in the referencepreview leads to a different behavior in the reference section than clicking on the footnote indicator.
It seems now that this part is much more difficult than expected from the technical side. So I am opening a new ticket for it so it can be estimated separately: T215168: Jump marks are displayed correctly when clicking on "Jump to reference" section

As far as I understand what you refer to as being "fixed" now was never broken.

I think the issue here is that we did not clearly specified what "highlighting" means. Highlighting a row with the blue background color, or highlighting the backlink in bold in case a reference was used more than once? The later is an unfinished feature, as argued above, and opens a few more questions that do not have entirely obvious answers.

We have an idea for a patch (linked above), but it will come with a bit of Technical-Debt we need to pay.

Change 487829 abandoned by WMDE-Fisch:
Trigger click on source footnote link

Reason:
Squashed into I0bd59ac326269f3c0850946851fb79b611dc2a57

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

Change 487897 had a related patch set uploaded (by WMDE-Fisch; owner: WMDE-Fisch):
[mediawiki/extensions/Popups@master] Test for element id passing

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

Hi. I tested this on https://tools.wmflabs.org/wmde-reference-previews/core/index.php?title=Monkey_testing. From what I see, these points are still open:

  • Said reference is highlighted the same way it would be highlighted when clicking on the footnote indicator right now

I see no highlighting in the footnote at the bottom. (I *do* see highlighting not in the footnote indicator in the body when I jump back up.)

  • The behavior should be identical to what happens right now when clicking on the footnote indicator

What isn't working when clicking on the footnote indicator:

  • No highlighting, see my comment on the check box above.
  • When I click on the first occurrence of footnote [2], I jump down to the right footnote. But sometimes, in the footnote, [2.1] is highlighted bold (expected: [2.0]. Also, the arrow at the beginning of the footnote sometimes leads me up to the second occurrence of the footnote, and not the one where I came from. After testing some more, I could no longer reproduce this behavior.

This should be working now please re-check :-).

Hi. I tested this on https://tools.wmflabs.org/wmde-reference-previews/core/index.php?title=Monkey_testing. From what I see, these points are still open:

  • Said reference is highlighted the same way it would be highlighted when clicking on the footnote indicator right now

I see no highlighting in the footnote at the bottom. (I *do* see highlighting not in the footnote indicator in the body when I jump back up.)

  • The behavior should be identical to what happens right now when clicking on the footnote indicator

What isn't working when clicking on the footnote indicator:

  • No highlighting, see my comment on the check box above.
  • When I click on the first occurrence of footnote [2], I jump down to the right footnote. But sometimes, in the footnote, [2.1] is highlighted bold (expected: [2.0]. Also, the arrow at the beginning of the footnote sometimes leads me up to the second occurrence of the footnote, and not the one where I came from. After testing some more, I could no longer reproduce this behavior.

This should be working now please re-check :-).

Ah sorry, no what I meant to say: This is split into the separate ticket T215168 - I got confused with something else here...

Lea_WMDE closed this task as Resolved.Feb 6 2019, 1:46 PM
Lea_WMDE claimed this task.
Lea_WMDE moved this task from Demo to Done on the WMDE-QWERTY-Sprint-2019-01-23 board.

Change 487844 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Trigger click on source footnote link

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

Change 487897 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Test for element id passing

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