Playlist block can't open the native media library
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 74/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript, kotlin, swift, typescript
- 領域
- mobile-dev
調査の方向性
useNativeMediaLibrary から始めてください。そこでは openMediaLibrary ブリッジメッセージが構築されるので、Playlist ブロックの multiple 値が、edit.jsx で multiple="add" を MediaPlaceholder と MediaReplaceFlow に指定している箇所からそこにどのように届くかを追跡してください。イシューで示されているネイティブデコーダー — iOS の OpenMediaLibraryAction と Android の parseMediaLibraryConfig — と比較してください。どちらも Boolean を期待しており、onSelect コールバックがすでに multiple を truthy として扱っていることに注意してください。送信前に multiple を Boolean に正規化してください。完了条件は、「Media Library」と「Add track」をタップするとピッカーが開き、選択したオーディオが両方のプラットフォームで追加されることです。
索引モデルが issue の本文から書いたものです。
説明
Description
Choosing "Media Library" in a Playlist block should open the native media picker and add the selected audio to the playlist. Nothing happens instead, on both iOS and Android.
The Playlist block passes multiple="add" to MediaUpload. Upstream types this as boolean | 'add'. GutenbergKit forwards the string unchanged in the openMediaLibrary bridge message, but both native decoders expect a Boolean:
- iOS:
OpenMediaLibraryActionfails to decode. Before #917 this hit afatalErrorand crashed the app. Since #917 the message is logged and dropped. - Android:
parseMediaLibraryConfigthrows onrequireBoolean("multiple"), and the message is logged and dropped.
A likely fix is to normalize multiple to a Boolean in useNativeMediaLibrary before sending it, which covers both platforms. The onSelect callback already passes an array when multiple is truthy.
Step-by-step reproduction instructions
- Open the editor in a host app or the demo app.
- Insert a Playlist block.
- Tap "Media Library" in the placeholder, or "Add track" in the toolbar on an existing playlist.
- The media picker doesn't open. The native logs show a dropped
openMediaLibrarymessage.
Screenshots, screen recording, code snippet
// @wordpress/block-library/src/playlist/edit.jsx
<MediaPlaceholder multiple="add" … />
<MediaReplaceFlow multiple="add" … />
Environment info
GutenbergKit trunk (@wordpress/block-library 12.2.0). The crash was reported on the iOS app's 27.5 beta, before #917.
Please confirm that you have searched existing issues in the repo.
- Yes
- 主要言語
- JavaScript
- スター
- 29
- フォーク
- 6
- 平均マージ
- 2日 1時間
- マージ済み PR(30日)
- 76
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
wordpress-mobile/GutenbergKit のほかの issue
-
[Type] Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
wordpress-mobile/GutenbergKit#884 ·
メンテナーはふだん 1 日以内に返信
-
[Type] Bug Android
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
wordpress-mobile/GutenbergKit#847 ·
メンテナーはふだん 1 日以内に返信
-
[Type] Bug iOS
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
wordpress-mobile/GutenbergKit#846 ·
メンテナーはふだん 1 日以内に返信
-
[Type] Bug [Type] Code Quality iOS
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
wordpress-mobile/GutenbergKit#668 ·
メンテナーはふだん 1 日以内に返信
-
[Type] Bug [Type] Performance iOS
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
wordpress-mobile/GutenbergKit#666 ·
メンテナーはふだん 1 日以内に返信
wordpress-mobile/GutenbergKit の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
TarteelAI/quranic-universal-library#1111 ·
メンテナーはふだん 1 日以内に返信
-
area:ryoku type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
google-ai-edge/LiteRT-LM#4783 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信