Skip to content

feat(statistics): update QuickStatCard to especially handle favourite drink display - #68

Merged
marfavi merged 1 commit into
mainfrom
favourite-drink-dont-show-0
Oct 31, 2026
Merged

marfavi merged 1 commit into
mainfrom
favourite-drink-dont-show-0

Conversation

@marfavi

@marfavi marfavi commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

now doesn't show a 0 and "No drinks yet" when no favourite drink can be determined (user has no swiped drinks)

fixes #67

Summary by CodeRabbit

  • Quick Stats
    • Quick-stat values are now displayed consistently as text.
    • The favourite-drink card displays a dash when no drinks are recorded. When a count is available, it continues to show the supplied supplementary text.

@marfavi
marfavi force-pushed the favourite-drink-dont-show-0 branch from 5917d08 to 8ba9419 Compare October 20, 2026 21:03
… drink display

now doesn't show a 0 and "No drinks yet" when no favourite drink can be determined (user has no swiped drinks)
@marfavi
marfavi force-pushed the favourite-drink-dont-show-0 branch from 8ba9419 to 925e80a Compare October 24, 2026 15:10
@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 742ff439-bc38-4481-ac5b-c06bfea8a9c5
Commits

Reviewing files that changed from the base of the PR and between e049dd9 and 925e80a.

Files selected for processing: 2
  • lib/features/statistics/presentation/widgets/quick_stat_card.dart
  • lib/features/statistics/presentation/widgets/quick_stats_section.dart

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Walkthrough

QuickStatCard now stores its displayed count as text. The favourite-drink card uses a dedicated constructor that displays - and empty extra text when the number is zero.

Changes: Favourite drink quick stat

Layer / File(s) Summary
Set and display the quick stat count
lib/features/statistics/presentation/widgets/quick_stat_card.dart, lib/features/statistics/presentation/widgets/quick_stats_section.dart
The default constructor stores the number as text. The favourite-drink constructor displays - and empty extra text when the number is zero; otherwise, it stores the number as text and preserves the supplied extra text. The statistics section uses this constructor, and the widget displays the stored count.

Priority: Low

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix · Severity of issue fixed: Low

Suggested reviewers: monirmooghen

Merge Risk: Minimal · up to 925e8

The requested empty-state display is implemented without an established merge-blocking risk.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title identifies the main change: updating QuickStatCard to handle the favourite drink display. It is relevant and specific enough, although “especially handle” is awkward wording.
Linked Issues check Passed Issue #67 requires the Favourite drink quick stat to show - and omit No drinks yet when no drink is available. QuickStatsSection now uses QuickStatCard.favouriteDrink. That constructor sets `c…
Out of Scope Changes check Passed The changes are limited to QuickStatCard and its Favourite drink call site. The constructor split supports the required special rendering while preserving the generic card behaviour. No unrelated pr…
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Full details: Linked Issues check

Explanation

Issue #67 requires the Favourite drink quick stat to show - and omit No drinks yet when no drink is available. QuickStatsSection now uses QuickStatCard.favouriteDrink. That constructor sets count to '-' and extraText to an empty string when number == 0. The widget therefore renders - and no extra text for the zero case. Non-zero cards preserve the number and supplied extra text.

Full details: Out of Scope Changes check

Explanation

The changes are limited to QuickStatCard and its Favourite drink call site. The constructor split supports the required special rendering while preserving the generic card behaviour. No unrelated product behaviour or files are changed.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)

Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@marfavi
marfavi merged commit 4e37c10 into main Oct 31, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stats: When No drinks yet for "Favourite drink" quick stat, don't show the 'No drinks yet' text & show '-' instead of '0'

1 participant