Keep Edit Widget choices when an app moves an existing configurable widget to Voltra
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 40/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- json, react-native, swift, typescript
- Domain
- build-system, tooling
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- TypeScript
- Stars
- 865
- Forks
- 50
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 18
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from callstackincubator/voltra
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
callstackincubator/voltra#376 ·
Maintainers usually reply within 1 day
-
refactor-scout
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
callstackincubator/voltra#308 ·
Maintainers usually reply within 1 day
-
refactor-scout
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
callstackincubator/voltra#307 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
callstackincubator/voltra#400 ·
Maintainers usually reply within 1 day
-
iOS: `clearWidget` and logout keep the per-instance ETag and status of configurable widgetsPossibly taken @huytdps13400 claimed this 2 days ago. Open
Difficulty 3/5 Half a day Newbie friendliness 45/100
callstackincubator/voltra#398 ·
Maintainers usually reply within 1 day
All issues in callstackincubator/voltra
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
earendil-works/gondolin#222 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
endora-commerce/endora-commerce#2203 ·
Maintainers usually reply within 1 day
-
enhancement priority:medium ready-for-human
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
wondermoney/wondermoney#1079 ·
Maintainers usually reply within 1 day