Feature Request: Add Configurable Precision Display for Nutritional Values
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ó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- react, typescript
- Lĩnh vực
- frontend
Hướng nghiên cứu
The reporter already sketched a implementation (NutritionPrecisionContext, a precision parameter on numberGramLocale, a PrecisionToggleButton) touching the nutrition tables, but the placement (page header vs. user preferences) is an open question with no maintainer decision after ~13 months and zero comments. Start by locating the nutritional value, logged-vs-planned and ingredient detail tables and the numberGramLocale helper, then check open pull requests before doing anything. Done means a maintainer has agreed on where the toggle lives and the display change is covered by tests.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description:
Hello Wger team;
I've been using wger and noticed that the rounding behavior in nutritional value tables can sometimes lead to confusing calculations. When values are displayed as whole numbers but the underlying calculations use decimal precision, the totals don't always add up correctly, which can be a bit confusing.
Proposed Solution
I've implemented a feature that allows users to toggle between whole number display (current behaviour) and one decimal place display for nutritional values. This gives users more control over how they want to view their nutritional data.
Implementation Details
Here's what I've added:
-
Created NutritionPrecisionContext to manage precision state across all nutrition components
-
Extended numberGramLocale function to accept a precision parameter
-
Added PrecisionToggleButton component with clear visual indicators
This affects all nutrition-related tables including the main nutritional values table, logged vs planned comparison table, and ingredient detail tables.
here is how it looks like
https://youtu.be/41xVraHh9LA
Questions for Discussion
I'm honestly not sure if this precision issue bothers other users or if it's just something I noticed. I built this feature to explore the problem and see if it would be helpful, but I'd love to hear your thoughts on whether this is something users actually need.
Currently I've placed toggle buttons in the page headers, but I'm curious about other options such as move it to user preferences as a permanent setting or try a completely different UI approach.
Any suggestions for improvement? I'm open to feedback on the implementation approach or UI design.
- Ngôn ngữ chính
- TypeScript
- Star
- 37
- Fork
- 94
- Merge trung bình
- 2 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 13
Chuẩn bị môi trường
- Không có Dockerfile hay 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 wger-project/react
-
Use exercise thumbnailsCó thể làm lại được @whoaryu đã nhận 127 ngày trước và không có pull request nào đang mở. Đang mởgood first issue
wger-project/react#1250 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 45/100
wger-project/react#1131 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Update the UI after uploading a video to an exerciseCó thể làm lại được @TDotH đã nhận 388 ngày trước và không có pull request nào đang mở. Đang mởgood first issue
wger-project/react#1128 · 2 bình luận · 1 người được giao ·
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 55/100
wger-project/react#1118 ·
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 45/100
wger-project/react#1114 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của wger-project/react
Issue tương tự
-
area: triage theme: undefined
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
jhipster/generator-jhipster#35895 ·
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 85/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 78/100
paperclipai/paperclip#18396 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
lingdojo/kana-dojo#33380 · 1 bình luận · 5 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
chore other
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
alastair-smith/card-games#342 ·
Maintainer thường phản hồi trong vòng 1 ngày