API for real-time detection of widget dimensions (width and height), with automatic updates upon every resize
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 22/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- ios, react-native, swift, typescript
- Lĩnh vực
- mobile-dev
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- TypeScript
- Star
- 865
- Fork
- 50
- Merge trung bình
- 2 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 18
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của callstackincubator/voltra
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
callstackincubator/voltra#376 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
refactor-scout
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
callstackincubator/voltra#308 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
refactor-scout
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
callstackincubator/voltra#307 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
callstackincubator/voltra#400 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 45/100
callstackincubator/voltra#398 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của callstackincubator/voltra
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
audacity/audacity.github.io#118 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
crxjs/chrome-extension-tools#1261 ·
-
Resources: Update work of fuzhouCó thể đã có người làm @rmt-svc đã nhận hôm nay. Đang mởresources
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
railmapgen/rmp-gallery#4245 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
mike-north/AgentMonitors#717 ·
Maintainer thường phản hồi trong vòng 1 ngày