Repository navigation
Conversation
|
Size Change: +3.72 kB (+0.05%) Total Size: 7.72 MB 📦 View Changed
|
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
| '1.5x', | ||
| '1.75x', | ||
| '2x', | ||
| ]; |
There was a problem hiding this comment.
We don't need this because waveform player now validates this array.
df2e2ab to
a60995d
Compare
|
Flaky tests detected in 372ae29. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/31591337669 All navigation links should default to the body color and submenus and mobile overlay should default to a white background with black text in
|
There was a problem hiding this comment.
After this PR we will have no patches in the repo, let us remove the patches directory after rebase.
manzoorwanijk
left a comment
There was a problem hiding this comment.
Claude Code has some feedback.
| const element = createDeclarativePlayer(); | ||
| it( 'initializes declarative players only after an explicit request from the Playlist utility', () => { | ||
| const element = createDeclarativePlayer( { | ||
| 'data-play-icon': |
There was a problem hiding this comment.
This payload is never asserted. In 1.26.0 parseDataAttributes reads data-play-icon (src/js/utils.js:397) and core.js:330 interpolates it unescaped into innerHTML, so after init() the <img onerror> is actually rendered. Either assert it isn't (it would fail today) or drop the payload so the test doesn't imply coverage it lacks.
| if ( waveformGradient ) { | ||
| container.setAttribute( 'data-waveform-gradient', waveformGradient ); | ||
| } | ||
| const sanitizedPlayIcon = playIcon && sanitizeSvgIcon( playIcon ); |
There was a problem hiding this comment.
Nothing passes playIcon / pauseIcon today (playlist/view.js and utils/waveform-player.js don't), so sanitizeSvgIcon is unused in production. Maybe split it into its own PR once there's a consumer?
Nit: startsWith( 'on' ) at L274 is redundant, the ICON_ATTRIBUTES allowlist already excludes every on* name.
| ### Bug Fixes | ||
|
|
||
| - Footnotes: Treat unreadable `footnotes` post meta as no footnotes instead of throwing, so the block shows its placeholder rather than the block crash warning ([#81201](https://github.com/WordPress/gutenberg/pull/81201)). | ||
| - Playlist: Disable waveform player auto-initialization before loading the dependency, and sanitize custom SVG icons passed through the Playlist waveform utility. |
There was a problem hiding this comment.
Missing the PR reference ([#81489](https://github.com/WordPress/gutenberg/pull/81489)). Also, the sanitization half describes code nothing calls yet.
|
A gentle request, can we please prioritize this to get rid of the patch? |
|
I believe we can close this PR in favour of #83132. Feel free to re-open in case I misunderstood 🙏 |
What?
Disables waveform-player auto-initialization and initializes playlist waveforms explicitly from the Playlist block code path.
Why?
The waveform-player dependency scans the document for
[data-waveform-player]elements when it loads. That means any matching markup already on the page can be initialized outside the Playlist block's control. The Playlist block should own initialization so it can avoid unexpected behavior from arbitrary markup.How?
@arraypress/waveform-playerto a version that supports disabling auto-init.data-waveform-autoinit="false"to the document element before importing the waveform dependency.initWaveformPlayerutility.Testing Instructions
Automated tests
Run:
Manual testing
Also confirm the console has no messages beginning with
[WaveformPlayer] InvalidorUnsafe waveform icon.On trunk with only
@arraypress/waveform-playerupdated to1.26.0, this manual test should fail because the Custom HTML fixture is auto-initialized. The console should show output during page load, including:The console check should show:
Screenshots or screencast
N/A