Keep Edit Widget choices when an app moves an existing configurable widget to Voltra

オープン
#393 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@mrevanzak がすでに取り組んでいます。

2026年11月24日 から。

  • #394 @mrevanzak による — オープン

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
40/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
json, react-native, swift, typescript

調査の方向性

Start in the config plugin's app.json schema and prebuild validation, then follow the codegen that emits the VoltraWidget_<id>_Intent and VoltraWidget_<id>_<param>_Choice Swift types. Read #391 for the dynamicOptions parameter handling and #392, which this proposal is a patch on top of. Done means intentName and entityName are accepted, default to today's names, invalid Swift identifiers are rejected at prebuild, and two widgets sharing a name generate one intent type.

索引モデルが issue の本文から書いたものです。

説明

An app that moves a configurable widget from hand-written WidgetKit code to Voltra resets every placed widget's Edit Widget choices on update. iOS saves a placed widget's configuration under the Swift type names of its WidgetConfigurationIntent and of the AppEntity values in it. Voltra generates its own names (VoltraWidget_<id>_Intent, VoltraWidget_<id>_<param>_Choice), so the saved configuration no longer matches and each widget falls back to its default. Ours had a masjid picker, so after updating, people who picked a masjid other than their first would see the wrong one until they picked it again.

Proposal: let app.json name those types.

"appIntent": {
  "intentName": "SelectMasjidConfigurationAppIntent",
  "parameters": [
    { "name": "masjid", "title": "Masjid", "dynamicOptions": true, "entityName": "FollowedMasjid" }
  ]
}
  • appIntent.intentName names the generated WidgetConfigurationIntent.
  • entityName on a dynamicOptions parameter (#391) names the generated AppEntity, and its query becomes <entityName>Query.
  • Widgets can share an intent, as ours did: two widgets with the same name use one type, generated once.

Both default to today's names, and prebuild rejects a value that isn't a Swift identifier.

We run this as a patch on top of #392. On a simulator, a widget placed and configured with our old hand-written build kept its choice after installing the Voltra build over it. The old entity's id was an Int and the generated one is a String, and the extension's module name changed too; neither stopped the configuration from carrying over.

主要言語
TypeScript
スター
865
フォーク
50
平均マージ
2日 22時間
マージ済み PR(30日)
18

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

callstackincubator/voltra のほかの issue

callstackincubator/voltra の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。