Skip to content

Reconcile feature-detection docblock with implemented checks#75851

Merged
adamsilverstein merged 9 commits into
trunkfrom
update/feature-detection-docblock
Jun 19, 2026
Merged

Reconcile feature-detection docblock with implemented checks#75851
adamsilverstein merged 9 commits into
trunkfrom
update/feature-detection-docblock

Conversation

@adamsilverstein

@adamsilverstein adamsilverstein commented Feb 24, 2026

Copy link
Copy Markdown
Member

Summary

Updates the detectClientSideMediaSupport() docblock in packages/upload-media/src/feature-detection.ts so it matches the function's current implementation:

  • Reorders the bullet list to match the actual order of evaluation.
  • Removes the bullet for the unimplemented credentialless-iframe check.
  • Tightens the wording for each check to match the implemented thresholds and configuration (device memory ≤ 2 GB, hardware concurrency < 2 cores, saveData or 2g / slow-2g connection, blob-URL Worker CSP probe).

Resolves #77763.

Context

Part of #74333 (Client Side Media iteration for WordPress 7.0). The broader capability-detection effort is tracked in #75849; this PR is scoped to keeping the docblock honest about what the function does today.

Test plan

  • Verify the docblock renders correctly in editors / IDE tooltips.
  • Confirm each documented bullet matches the corresponding check in detectClientSideMediaSupport().

@github-actions

github-actions Bot commented Feb 24, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: adamsilverstein <adamsilverstein@git.wordpress.org>
Co-authored-by: andrewserong <andrewserong@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions

github-actions Bot commented Feb 24, 2026

Copy link
Copy Markdown

Size Change: 0 B

Total Size: 7.5 MB

compressed-size-action

Document the upcoming capability detection areas including
credentialless iframe support, device memory, network
conditions, and Web Worker checks. Notes that browsers
without credentialless support will have client-side media
disabled by default, with a server-side filter opt-in.
@adamsilverstein adamsilverstein force-pushed the update/feature-detection-docblock branch from e91ba49 to 17bc3aa Compare February 24, 2026 09:31
@adamsilverstein adamsilverstein self-assigned this Feb 24, 2026
@adamsilverstein adamsilverstein added [Type] Task Issues or PRs that have been broken down into an individual action to take [Status] In Progress Tracking issues with work in progress [Feature] Client Side Media Media processing in the browser with WASM labels Feb 24, 2026
@github-project-automation github-project-automation Bot moved this to 🔎 Needs Review in WordPress 7.0 Editor Tasks Feb 24, 2026
@adamsilverstein adamsilverstein requested review from andrewserong and removed request for andrewserong February 24, 2026 10:20
@adamsilverstein adamsilverstein marked this pull request as draft February 24, 2026 10:21
Add four new checks to detectClientSideMediaSupport():
Web Worker support, credentialless iframe support, device
memory (≤2 GB), and network conditions (data saver/2g).
These gate client-side media processing on low-end devices
and unsupported browsers before the expensive CSP check.
The saveData check already covers reduced data mode but the
docblock only referenced "data saver". This makes it explicit.
Union the PR's planned credentialless iframe bullet with trunk's
hardware concurrency addition. Flag the credentialless check as
planned so the docblock distinguishes implemented checks from
future additions.
@github-actions

github-actions Bot commented Apr 23, 2026

Copy link
Copy Markdown

Flaky tests detected in 61090ee.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/27819048572
📝 Reported issues:

Reorder the docblock list to match the actual order of evaluation in
detectClientSideMediaSupport(), and remove the placeholder for the
unimplemented credentialless iframe check so the documentation
reflects the current detection thresholds and configuration.
@adamsilverstein adamsilverstein changed the title Update feature detection docblock for planned checks Reconcile feature-detection docblock with implemented checks Apr 28, 2026
@adamsilverstein adamsilverstein enabled auto-merge (squash) June 19, 2026 10:01
@adamsilverstein adamsilverstein merged commit c9432ff into trunk Jun 19, 2026
40 checks passed
@adamsilverstein adamsilverstein deleted the update/feature-detection-docblock branch June 19, 2026 20:41
@github-project-automation github-project-automation Bot moved this from 🔎 Needs Review to ✅ Done in WordPress 7.1 Editor Tasks Jun 19, 2026
@github-actions github-actions Bot added this to the Gutenberg 23.5 milestone Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Client Side Media Media processing in the browser with WASM [Status] In Progress Tracking issues with work in progress [Type] Task Issues or PRs that have been broken down into an individual action to take

Projects

Development

Successfully merging this pull request may close these issues.

Document feature-detection thresholds in detectClientSideMediaSupport() docblock

2 participants