We show page previews to the same page.
This is particularly a problem with backlinks e.g. the "^" (reference back link) in Notes section of https://en.wikipedia.org/w/index.php?title=Code_page_437 (see bug report T212419 for that particular case)
Testing
Hover over "Section links"
Expected: No page preview
Actual: page preview to somewhere else in the page.
Hover over
iconExpected: No page preview
Actual: page preview
Acceptance criteria
- If a link points to the same page (e.g. hash fragment or self link), it should not show a preview.
- If a link points to another URL with a hash fragment, we show a preview for the other page.
Notes
See also: T156041
Developer notes
This might be very easy to fix just by adding another entry to the BLACKLISTED_LINKS array at the beginning of the file src/index.js.
A better, more sustainable way to fix this might be to always exclude the own page. Note this should only be done for the page popup type, not for the planned reference popup type.
Links to blacklist:
- mw-cite-backlink a
- href~="#"
QA Results - Beta
AC | Status | Details |
---|---|---|
1 | ✅ | T198652#8551900 |
2 | ✅ | T198652#8547433 |
QA Results - Prod
AC | Status | Details |
---|---|---|
1 | ✅ | T198652#8567065 |
2 | ✅ | T198652#8567065 |