API for real-time detection of widget dimensions (width and height), with automatic updates upon every resize
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 22/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- ios, react-native, swift, typescript
- Domain
- mobile-dev
Research direction
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.
Written by the indexing model from the issue text.
Description
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
- 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 74/100
melgarafael/DeskcommCRM#5614 · 1 comment ·
Maintainers usually reply within 1 day
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 76/100
slackapi/slack-health-score#253 ·
Maintainers usually reply within 1 day
-
feature needs triage site
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
owid/owid-grapher#8019 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
simstudioai/sim#10710 ·
Maintainers usually reply within 1 day
-
via-triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day