Add the V2 Media Library detail and edit screen - #25943
Draft
crazytonyli wants to merge 4 commits into
Draft
Conversation
Collaborator
Generated by 🚫 Danger |
Contributor
|
| App Name | Jetpack | |
| Configuration | Release-Alpha | |
| Build Number | 34025 | |
| Version | PR #25943 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | 3714c13 | |
| Installation URL | 4fdl1pp2dacdg |
Contributor
|
| App Name | WordPress | |
| Configuration | Release-Alpha | |
| Build Number | 34025 | |
| Version | PR #25943 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | 3714c13 | |
| Installation URL | 3kdgtvvk7cc1o |
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
force-pushed
the
task/media-v2-detail
branch
from
August 26, 2026 23:49
1bbb1d0 to
3714c13
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Note
This PR will be merged after #25623.