Reader: swipe through every image in a post

Aperta
#26,255 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
36/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
ios, swift
Ambito
mobile

Direzione di ricerca

Read the related issue #1260 and inspect ReaderDetailCoordinator.findGallery(containing:), ReaderPostParser, and the presentImage flow; the issue says #1260’s gallery fix must ship first because it changes the same tap-matching code. Trace how post images and their links are identified, then compare the resulting viewer sequence with the agreed eligibility and ordering rules. Done means swiping from any eligible image reaches every eligible post image in page order while linked images outside those rules still open their links.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

[Type] Enhancement Media Reader

Split from #1260, which now covers only the gallery bug (linked gallery images open a web view).

In a Reader post, tapping an image outside a gallery opens it on its own in the full-screen viewer (presentImage). You can't swipe to the post's other images. Android lets you swipe through every image in the post. This was the original ask in #1260: "swipe through all the images in the post".

This is new functionality, not a bug, so it has no fix plan yet.

Decisions so far

Agreed in #1260:

  1. One swipe sequence for the whole post. Tapping any eligible image opens the viewer with every eligible image in the post, in page order, gallery images included. This matches Android.

  2. Images that link to another page stay links. An image joins the viewer only if it has no link, or its link points to:

    • the image itself (the same file at any size),
    • its full-size file (data-orig-file), or
    • its attachment page.

    Any other link is followed as it is today.

Spotting an attachment-page link: the markup has no explicit marker. In WordPress.com galleries, the <img> carries data-attachment-id, and the link sits under the post's permalink. In post 12152, for example, it's …/2012/10/04/tiled-image-galleries/2012-09-13-2012-09-13-img_3495/. The other form is ?attachment_id=<id>. So treat a link as an attachment page when the image has data-attachment-id and the link either starts with the post's permalink or contains attachment_id=.

Images to leave out of the sequence: emoji (img.emoji), tracking pixels and other tiny images, avatars, story images (.wp-story-image) and images inside embeds.

Not in scope: swipe-down to dismiss, captions, and laying galleries out natively in the post.

Order

Ship the #1260 gallery fix first. It changes the same tap-matching code (ReaderDetailCoordinator.findGallery(containing:), ReaderPostParser).

Lingua principale
Swift
Stelle
3.9k
Fork
1.2k
Merge medio
1g 23h
PR unite (30g)
136

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di wordpress-mobile/WordPress-iOS

Tutte le issue di wordpress-mobile/WordPress-iOS

Issue simili

Altre issue su Swift

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.