[wp-trac] [WordPress Trac] #57913: Attachment pages need to have an "on" toggle
WordPress Trac
noreply at wordpress.org
Wed Apr 26 10:14:07 UTC 2023
#57913: Attachment pages need to have an "on" toggle
----------------------------------------------+---------------------
Reporter: joostdevalk | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 6.3
Component: Media | Version:
Severity: normal | Resolution:
Keywords: 2nd-opinion has-patch needs-docs | Focuses:
----------------------------------------------+---------------------
Comment (by matveb):
I'm generally in favor of this proposal. Attachment pages are a bit of a
clunky way to solve a usability problem. Though I do think we should
review the benefits a bit, which I'd classify in two:
- Direct links to media (permalinks).
- Ability to explore an asset without losing the site context.
The first, particularly in a mobile world, has probably been overtaken by
sharing the media asset link itself rather than the attachment permalink
as an overall better experience in most sites and themes.
For the second case, which I think is now increasingly more important, I
think we should explore providing a lean zoom effect on single images as a
way to expand an image without having to navigate away from a page or lose
context. The recent proposal for the block interactivity API could be a
way forward there — check this exploration, for example, as possible path:
https://github.com/WordPress/gutenberg/pull/49621
Regarding the attachment pages, it definitely seems good to retain the
ability for themes to craft specific templates (photography sites and
such, as mentioned before). In conjunction with the above and client
transitions it could provide, in the future, a sort of custom lightbox
experience controlled by the theme and powered by attachment templates,
but I digress a bit.
Back tot he implementation, I'm not entirely sure about
`add_theme_support()`, particularly in the context of block themes which
generally don't need to use functions.php or work it through `theme.json`
directly. Would it make more sense to make the support implicit by adding
one of the relevant templates in the hierarchy? The site option would
still be honored, but the theme doesn't need to do anything extra outside
of supplying the template to make itself ready. Same for a user creating a
custom template for media.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57913#comment:27>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list