Skip to content

Linkified text above image preview should open the lightbox, like the image preview itself #215

Open
@chrisbobbe

Description

@chrisbobbe

When you have linkified text and a corresponding image preview below it (like you get with an image-upload interaction), tapping the image preview opens the lightbox, but tapping the text instead opens the browser.

From experimenting, that behavior actually seems to match the web app: there, clicking the image preview opens the lightbox, but clicking the linkified text opens the image in a new tab.

It would be nicer to open the lightbox, at least in the mobile app. That's what we do in zulip-mobile…er, at least sometimes. There, we've been checking the href against a small handful of filename extensions, like jpg. But as Greg points out in #204 (comment) :

That zulip-mobile behavior seems nicer for the user, when it works. That logic is pretty bad, though; for example it would match image-looking URLs on external sites (for which the lightbox seems inappropriate), and conversely it's not clear where the list of extensions comes from and whether it might miss some perfectly good uploaded images for which the server cheerfully embeds a preview and the lightbox would work fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a-lightboxThe lightbox / image-viewer screena-msglistThe message-list screen, except what's label:a-content

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions