Skip to content

Add the V2 Media Library detail and edit screen - #25943

Draft
crazytonyli wants to merge 4 commits into
task/media-v2-upload-integrationfrom
task/media-v2-detail
Draft

Add the V2 Media Library detail and edit screen#25943
crazytonyli wants to merge 4 commits into
task/media-v2-upload-integrationfrom
task/media-v2-detail

Conversation

@crazytonyli

Copy link
Copy Markdown
Contributor

Note

This PR will be merged after #25623.

@dangermattic

Copy link
Copy Markdown
Collaborator
2 Warnings
⚠️ View files have been modified, but no screenshot or video is included in the pull request. Consider adding some for clarity.
⚠️ This PR is larger than 500 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.
1 Message
📖 This PR is still a Draft: some checks will be skipped.

Generated by 🚫 Danger

@wpmobilebot

wpmobilebot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor
App Icon📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack
ConfigurationRelease-Alpha
Build Number34025
VersionPR #25943
Bundle IDcom.jetpack.alpha
Commit3714c13
Installation URL4fdl1pp2dacdg
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot

wpmobilebot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor
App Icon📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress
ConfigurationRelease-Alpha
Build Number34025
VersionPR #25943
Bundle IDorg.wordpress.alpha
Commit3714c13
Installation URL3kdgtvvk7cc1o
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

Implements the SwiftUI detail screen reached from the V2 Media Library
grid with per-field push edits, single-item delete and share, and
analytics parity with the existing UIKit detail screen. Saves use a
per-field serial queue so server-side ordering is last-write-wins, and
adopt the cache-aware MediaService.updateMedia path so the grid's
existing cache observer fans out updates without a manual nudge. Field
edits also commit when the editor disappears, matching the V1 editor's
viewWillDisappear save that users rely on, and row taps bail while a
delete or share is in flight so a pop cannot strand a pushed screen.
Share routes through an app-injected service that authenticates source
URLs via MediaRequestAuthenticator and streams the download into a temp
file. URL row opens via an injected opener that wraps
WebViewControllerFactory. Cell tap and field-row push bridge through an
app-injected MediaDetailNavigator that wraps SwiftUI screens in
UIHostingController and pushes onto the outer UINavigationController,
avoiding nested-NavigationStack double nav bars.
Search result cells were inert because the search view model was built
without the detail dependencies, while V1 opened the detail screen from
search. Thread the existing optional dependencies through the search
views; the pushed detail screen owns its view model and lives on the
outer UIKit nav stack, so per-query view model teardown cannot strand it.
A dot segment in a media title ("Logo v2.0") was treated as a file
extension, so the MIME-derived extension was never appended and share
targets misidentified the file. Extensions now count only when UTType
recognizes them and they agree with the MIME type; truncation applies
to the stem so a real extension survives long names.
Preparing a share previously disabled the whole screen with no
feedback, and a slow download could not be stopped. The share toolbar
slot now shows a spinner that cancels the download when tapped, leaving
the screen cancels it too, and cancellation resolves silently instead
of surfacing an error alert.
@crazytonyli
crazytonyli force-pushed the task/media-v2-detail branch from 1bbb1d0 to 3714c13 Compare August 26, 2026 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants