Page MenuHomePhabricator

Edit Preview link bug: References don't work
Closed, ResolvedPublic

Description

Tapping a reference (in the article) does nothing. It should jump to the relevant reference in the "Preview of References" section.
Tapping a reference backlink (back up to where it is referenced in the section) does nothing. It should jump back up to the relevant spot in the edit preview.

Related Objects

Event Timeline

LGoto triaged this task as Medium priority.Jun 1 2020, 6:57 PM
LGoto moved this task from Needs Triage to Bug Backlog on the Wikipedia-iOS-App-Backlog board.

Found one small bug: When tapping the "reference" icon in the ReferenceVC chrome, it takes the user to the references section of the VC with the number of the relevant reference highlighted. That highlight disappears in a second or so.

That highlight is NOT disappearing on EditPreviewVC. After some digging, that's because scrollViewDidEndScrollingAnimation isn't being called. I'm trying to figure out why that is.

Made a bit of progress on this, but turns out there are a couple other small bugs as well. Going to keep working on this tomorrow.

  • Scrolling up from “preview of reference” after tapping a [1], then tap the reference icon to scroll back down tot preview of references section - highlighted reference number should disappear after a second.
    • Made EditPreviewVC conform to UIScrollViewDelegate, so now we’re hitting the right functions (which wasn’t happening before. But still, not working.
    • func scroll(to anchor: String, centered: Bool = false, highlighted: Bool = false, animated: Bool, completion: (() -> Void)? = nil) is where the problem lies. Before we enter the completion block for messagingController.prepareForScroll, we have a completion - but it becomes nil once we enter this block.
  • Scrolling up from “preview of reference” after tapping a [1] - scrolling is a bit off, the highlighted reference often isn’t on screen
  • In edit preview, tap a reference, get the minibox w/ reference - if you tap the “references section” icon, it doesn’t scroll appropriately
JMinor claimed this task.