Page MenuHomePhabricator

Nested references don't work in mobile view
Closed, ResolvedPublic

Description

Nested references (i.e. references within references) cannot be opened properly in MobileView. Clicking on them does nothing, unless the references section has been previously expanded, in that case it points to the references section rather than providing a snippet.

Test{{#tag:ref|This is a note.<ref>This is a nested ref.</ref>|group=note}}
==Notes==
<references group=note />
==References==
<references/>

This is because the JavaScript to lazy load references is only bound to the page, but it should also run inside the reference dialog itself.

Event Timeline

@Cenarium can you provide source code for a test case and some screenshots/video? It's not completely clear to us what the problem is but we're keen to fix it!

Capture2.PNG (1×2 px, 563 KB)

See https://en.m.wikipedia.org/wiki/Sea#Definition for an example. Clicking on nested refs (3, 9, etc) doesn't work.
Example code:

Test{{#tag:ref|This is a note.<ref>This is a nested ref.</ref>|group=note}}
==Notes==
<references group=note />
==References==
<references/>

How does this play with lazy loaded references?

Thanks @Cenarium that's super helpful. Let me update the description. Impacts lazy references too but should be an easy fix.

So what should the behavior be? Should the open references drawer be closed and a new one opened? Or should there appear another drawer on top of the existing drawer? Also @Nirzar what do you say?

Just refresh the current one for time being.
We can always reevaluate later.

Change 278081 had a related patch set uploaded (by Bmansurov):
WIP: Show nested references inside the drawer

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

I had one comment on merging that I'd like an answer to before signing off (so I know whether to create a new task)
https://gerrit.wikimedia.org/r/#/c/278081/3/resources/mobile.references/references.js

Change 278081 merged by jenkins-bot:
Show nested references inside the drawer

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

closing the first reference and opening the new one in it's place would be good.

Jdlrobson claimed this task.

Signed off

closing the first reference and opening the new one in it's place would be good.

@Nirzar, please feel free to create a new task.