Keep Edit Widget choices when an app moves an existing configurable widget to Voltra
维护者通常 1 天内回复
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 40/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- json, react-native, swift, typescript
- 领域
- build-system, tooling
调研方向
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.intentNamenames the generatedWidgetConfigurationIntent.entityNameon adynamicOptionsparameter (#391) names the generatedAppEntity, 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 小时
- 30 天内合并 PR
- 18
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
callstackincubator/voltra 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
callstackincubator/voltra#376 ·
维护者通常 1 天内回复
-
refactor-scout
难度 2/5 1-3 小时 新手友好度 88/100
callstackincubator/voltra#308 ·
维护者通常 1 天内回复
-
refactor-scout
难度 2/5 1-3 小时 新手友好度 88/100
callstackincubator/voltra#307 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 15/100
callstackincubator/voltra#400 ·
维护者通常 1 天内回复
-
难度 3/5 半天 新手友好度 45/100
callstackincubator/voltra#398 ·
维护者通常 1 天内回复
查看 callstackincubator/voltra 的全部 Issue
相似的 Issue
-
api bug priority:low ready-for-agent
难度 2/5 1-3 小时 新手友好度 78/100
wondermoney/wondermoney#862 ·
维护者通常 1 天内回复
-
good first issue help wanted
难度 2/5 1-3 小时 新手友好度 84/100
rootsiemen/seo-agent-tools#70 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
alvinunreal/oh-my-opencode-slim#1971 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
elecnix/bellwether#467 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复