API for real-time detection of widget dimensions (width and height), with automatic updates upon every resize
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 22/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- ios, react-native, swift, typescript
- Área
- mobile-dev
Línea de trabajo
Start by tracing how widget cell dimensions are computed on the Swift side and how any values currently cross into JS — look for the existing native module/bridge and the VoltraAndroid component definitions the example references. Read the widget layout code and the example app that renders VoltraAndroid.LazyVerticalGrid to see where a size hook would attach. Done means a documented hook or callback returning live { width, height } in cells that fires on resize, plus an example and tests showing the value updating.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Feature Description
I would like an API that provides the actual number of cells occupied by the widget in terms of width and height, in real time.
These values should update automatically and immediately whenever the user resizes the widget, allowing the layout to be dynamically adjusted based on the actual dimensions.
Problem Statement
Currently, it is not possible to determine the actual number of cells occupied by a widget when it is resized.
This limits the ability to create dynamic and responsive layouts.
Being able to access the width and height in real time would allow for the automatic adjustment of content and the number of columns based on the widget's actual dimensions, eliminating the need for manual calculations and approximate solutions.
Proposed Solution
Add an API or callback that returns the actual number of cells occupied by the widget, in terms of both width and height.
These values must update in real time whenever the user resizes the widget.
For example, if the widget occupies 2 columns, the API should return width = 2
if it is resized to 5 columns, it should automatically return width = 5.
This will make it possible to dynamically adapt components, such as VoltraAndroid.LazyVerticalGrid to the widget's actual dimensions.
const [widgetSize, setWidgetSize] = useState({
width: 2,
height: 2
});
VoltraAndroid.onWidgetResize((size) => {
setWidgetSize({
width: size.width,
height: size.height
});
});
<VoltraAndroid.LazyVerticalGrid
columns={widgetSize.width}
>
</VoltraAndroid.LazyVerticalGrid>
Alternatives Considered
No response
Current Library Version
2.6.0
Implementation
- I would be willing to submit a pull request for this feature
Additional Context
No response
- Lenguaje dominante
- TypeScript
- Estrellas
- 865
- Forks
- 50
- Merge medio
- 2 d 22 h
- PR fusionados (30 d)
- 18
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de callstackincubator/voltra
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
callstackincubator/voltra#376 ·
Los mantenedores suelen responder en 1 día
-
refactor-scout
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
callstackincubator/voltra#308 ·
Los mantenedores suelen responder en 1 día
-
refactor-scout
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
callstackincubator/voltra#307 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 15/100
callstackincubator/voltra#400 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 Medio día Aptitud para principiantes 45/100
callstackincubator/voltra#398 ·
Los mantenedores suelen responder en 1 día
Todos los issues de callstackincubator/voltra
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
audacity/audacity.github.io#118 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
crxjs/chrome-extension-tools#1261 ·
-
Resources: Update work of fuzhouPosiblemente ocupada @rmt-svc la tomó hoy. Abiertoresources
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
railmapgen/rmp-gallery#4245 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
mike-north/AgentMonitors#717 ·
Los mantenedores suelen responder en 1 día