feat: more time ranges on the Location tab (30m, 6h, 12h, 3d)
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 88/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- android, react, typescript
- Lĩnh vực
- frontend
Hướng nghiên cứu
Các khoảng thời gian nằm trong LOCATION_RANGES trong web/src/pages/deviceDetailFormat.ts, và rangePhrase trong cùng tệp cần thêm một trường hợp mới cho khoảng dưới một giờ (“the last 30 minutes”). Hãy đọc trước locationSince và bài kiểm thử khoảng thời gian hiện có trong deviceDetailFormat.test.ts. Công việc hoàn thành khi bộ chọn hiển thị 30m, 1h, 6h, 12h, 24h, 3d, 7d và All, và vitest chạy đạt với bài kiểm thử khoảng thời gian đã cập nhật.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Area
Admin console (web)
The problem
The Location tab’s time range (from #139, thanks for porting it) offers 1h, 24h, 7d and All. On a phone in Accurate mode that reports
often, the jumps are large:
1h is often too long to see only the last trip, and 24h already mixes several trips;
between 24h and 7d there is nothing, so “the last few days” means scrolling through a whole week.
When I proposed #139 I used 30 min, 1 h, 6 h, 12 h, 24 h, 3 days, 7 days and All, and the in-between steps are the ones I use most.
Proposed solution
Add four entries to LOCATION_RANGES (web/src/pages/deviceDetailFormat.ts): 30m, 6h, 12h and 3d, so the picker reads
30m · 1h · 6h · 12h · 24h · 3d · 7d · All.
locationSince needs no change. rangePhrase needs one more case for under an hour (“the last 30 minutes”); 6h, 12h and
3d already read well (“the last 6 hours”, “the last 3 days”).
All stays the default, so the rail keeps the device’s latest fix.
The Segmented control fits on one line next to the title at 1440 px, and wraps under it at 1024 px (screenshot below).
I have this running locally on 0.5.1, with the range test in deviceDetailFormat.test.ts updated; vitest passes. Happy to open
a PR against the right branch if you’d like it.
Alternatives considered
Keep 4 ranges and add a custom from/to picker: more flexible, but more UI and code than a few presets.
Keep it as a local patch: works, but every update means carrying it again.
Before submitting
- I searched existing issues and discussions for the same idea.
- Ngôn ngữ chính
- Java
- Star
- 44
- Fork
- 25
- Merge trung bình
- 1 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 80
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- 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 MDMesh-app/MDMesh
-
Change Kiosk TitleĐang mởenhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
MDMesh-app/MDMesh#253 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
MDMesh-app/MDMesh#232 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
enhancement
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 45/100
MDMesh-app/MDMesh#205 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
MDMesh-app/MDMesh#204 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
MDMesh-app/MDMesh#199 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của MDMesh-app/MDMesh
Issue tương tự
-
status: waiting-for-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
spring-projects/spring-ai#7459 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Fix a typo in H5Centry.cĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Type: Possible bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
AntennaPod/AntennaPod#8946 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Core Documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Default exclude patterns drop production files whose names end in "test" or "spec" (Contest.java, Latest.swift, Aspec.hs)Có thể đã có người làm @alex09x đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
alibaba/open-code-review#2078 ·
Maintainer thường phản hồi trong vòng 1 ngày