Skip to content

Add selection mode and bulk actions to the V2 Media Library - #25944

Draft
crazytonyli wants to merge 3 commits into
task/media-v2-detailfrom
task/media-v2-selection-mode
Draft

Add selection mode and bulk actions to the V2 Media Library#25944
crazytonyli wants to merge 3 commits into
task/media-v2-detailfrom
task/media-v2-selection-mode

Conversation

@crazytonyli

Copy link
Copy Markdown
Contributor

Note

This PR will be merged after #25943.

@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 WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress
ConfigurationRelease-Alpha
Build Number34026
VersionPR #25944
Bundle IDorg.wordpress.alpha
Commit3488faf
Installation URL43ifnq1sqm3f8
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 Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack
ConfigurationRelease-Alpha
Build Number34026
VersionPR #25944
Bundle IDcom.jetpack.alpha
Commit3488faf
Installation URL774macnbvv408
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

Add the model layer for the V2 Media Library selection mode: selection
state, bulk delete, and bulk share on MediaLibraryViewModel, with the
bulk-share download owned by the view model so it survives the view
leaving the window (e.g. a tab switch) rather than a view-lifetime task
that a disappearance would silently cancel.

Serialize loads so a cancelled, still-unwinding load can't strand the
library half-loaded, and route every share-payload dismissal through a
single cleanup chokepoint that releases temp files, including the
swipe-dismiss path that never fires the activity controller's
completion handler.
Add the selection-mode view layer for the V2 Media Library: a Select /
Done navigation control, per-item selection badges, and a bottom
selection bar (trash / count / share) rendered as a safe-area inset,
since a UIHostingController pushed on a UIKit navigation controller
drops .bottomBar toolbar items.

Suppress the search field in selection mode without resetting the
screen's identity by hanging the conditional .searchable off a
zero-size background leaf, so toggling selection mode keeps grid scroll
position and doesn't re-fire the load/observe/analytics tasks. Derive
the minimized search-bar behavior from real UIKit containment via a
host context the hosting controller writes, and end selection mode when
the screen is popped.
@crazytonyli
crazytonyli force-pushed the task/media-v2-selection-mode branch from 79b6f38 to 3488faf 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