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

Abierto
#393 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@mrevanzak ya está trabajando en esto.

Desde el 24/11/2026.

  • #394 de @mrevanzak — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
40/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
json, react-native, swift, typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
865
Forks
50
Merge medio
2 d 22 h
PR fusionados (30 d)
18

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de callstackincubator/voltra

Todos los issues de callstackincubator/voltra

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.