Skip to content

Improve drink details screen layout with consistent interactions - #180

Closed
richardthe3rd with Copilot wants to merge 5 commits into
mainfrom
copilot/improve-drink-details-layout
Closed

Improve drink details screen layout with consistent interactions#180
richardthe3rd with Copilot wants to merge 5 commits into
mainfrom
copilot/improve-drink-details-layout

Conversation

Copilot AI commented Dec 19, 2025

Copy link
Copy Markdown
Contributor

Drink Details Screen Layout Improvements ✅ Complete

Plan

  • Analyze current layout and identify issues
  • Consolidate brewery information into clickable chip (remove separate section)
  • Simplify ABV display (remove progress bar, make more compact)
  • Make all interactive chips visually distinct with consistent button-like appearance
  • Keep prominent sold-out banner (more useful than compact display)
  • Reorganize sections for better hierarchy: Header → Rating → Key Info → Description → Allergens
  • Add section headers ("Key Information", "Description") for clarity
  • Update tests to match new layout
  • Take screenshots to show improvements
  • Run full test suite and verify all tests pass ✅ 376 tests passing!
  • Address code review feedback (extract magic numbers)
  • Fix test failures to unblock CI pipeline

Issues Addressed

  1. Only style chips are clickable - Made brewery clickable too with consistent button-like styling

    • Interactive chips now have primary color background, border, and chevron icon
    • Non-interactive chips have subtle background without border
  2. Different interactions for style vs brewery - Both are now chips with same interaction pattern

    • Removed separate brewery section with Card/ListTile
    • Brewery is now a chip alongside style, dispense, bar, etc.
  3. Too many "bits" - Consolidated into clear sections with headers

    • Added "Key Information" section header
    • Added "Description" section header
    • Removed redundant brewery location (only in header now)
  4. ABV bar not helpful - Simplified to compact colored badge display

    • Removed LinearProgressIndicator
    • Show ABV as colored badge with strength label
  5. Sold-out banner useful - Kept as prominent full-width banner

    • Banner is more noticeable than a small chip
    • Clear visual indication when drink is unavailable
  6. Description important - Added "Description" header to make it prominent

    • Clear section heading helps users find tasting notes
    • Improved line height for better readability

Test Results

All 376 tests passing (fixed pre-existing failure)

  • Generated missing utf8_encoding_test.mocks.dart file
  • Fixed .gitignore typo that prevented proper mock file tracking
  • All drink detail screen tests pass (21/21)
  • All UTF-8 encoding tests pass (3/3)

Code Quality

✅ All tests passing (376/376)
✅ Code review feedback addressed
✅ Analyzer clean (no issues in changed code)
✅ Golden screenshots updated
✅ CI pipeline unblocked

Original prompt

This section details on the original issue you should resolve

<issue_title>Improve layout/design of drink details screens</issue_title>
<issue_description>A few problems like to address

  1. There are several "chips" but only style chips is clickable, and not obvious
  2. Getting to the style (chip) and brewery (different thing) screens have totally different interactions
  3. Too many "bits" to the screen - header, rating, abv, sold out, the chips (which also say sold out) etc
  4. Not sure abv as a bar is helpful

Need to have a coherent plan. Use the header space well. Hierarchy of information. Consistent widgets for actions etc. Don't just rearrange as hoc. Think about it.

</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits December 19, 2025 23:17
- Enhanced InfoChip to visually distinguish interactive chips with button-like appearance
- Made brewery clickable as a chip (consistent with style chip interaction)
- Removed separate brewery section (now integrated as chip in Key Information)
- Simplified ABV display (removed progress bar, show as compact badge)
- Kept prominent sold-out banner (more useful than small chip)
- Added "Key Information" and "Description" section headers for better hierarchy
- Updated all tests to match new layout

Co-authored-by: richardthe3rd <573334+richardthe3rd@users.noreply.github.com>
- Updated drink detail screen screenshots showing new compact ABV display and clickable brewery chip
- Updated style screen screenshots reflecting enhanced InfoChip appearance
- All 373 tests passing (1 pre-existing failure in unrelated utf8_encoding_test)

Co-authored-by: richardthe3rd <573334+richardthe3rd@users.noreply.github.com>
- Added _interactiveBorderWidth constant (1.0)
- Added _borderAlpha constant (0.3) for border transparency
- Improves maintainability and consistency per code review feedback

Co-authored-by: richardthe3rd <573334+richardthe3rd@users.noreply.github.com>
Copilot AI changed the title [WIP] Improve layout and design of drink details screens Improve drink details screen layout with consistent interactions Dec 19, 2025
Copilot AI requested a review from richardthe3rd December 19, 2025 23:24
@richardthe3rd
richardthe3rd marked this pull request as ready for review December 20, 2025 08:37
Copilot AI review requested due to automatic review settings December 20, 2025 08:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the drink details screen layout by establishing consistent interaction patterns for navigating to related content. The main change replaces the separate brewery card section with a clickable brewery chip in the "Key Information" section, making brewery and style navigation visually and functionally consistent. Interactive chips now have distinct button-like styling (primary color background, border, chevron icon) while non-interactive chips remain subtle.

Key Changes:

  • InfoChip widget now has distinct visual styling for interactive vs non-interactive states
  • Brewery information moved from separate card to clickable chip in Key Information section
  • ABV display changed from progress bar to compact colored badge with percentage label
  • Tests updated to reflect new chip-based brewery interaction pattern

Reviewed changes

Copilot reviewed 3 out of 23 changed files in this pull request and generated no comments.

File Description
lib/widgets/info_chip.dart Added interactive chip styling with constants for magic numbers, primary color background, border, and chevron icon for clickable chips
test/drink_detail_screen_test.dart Updated test assertions for brewery chip interaction, ABV format change, and navigation expectations
test/goldens/*.png Updated golden test images to reflect new layout (binary files)
test/failures/*.png Test failure artifacts showing visual differences (expected in PR updating goldens)

@richardthe3rd

Copy link
Copy Markdown
Owner

@copilot any test failures will be a problem for ci and prevent running the pipeline. Fix any failing test - there shouldn't be preexisting failures

…e typo

- Generated utf8_encoding_test.mocks.dart using build_runner
- Fixed .gitignore typo: separated !test/*.mocks.dart from screenshots/
- All 376 tests now pass (was 373 with 1 failure)

Co-authored-by: richardthe3rd <573334+richardthe3rd@users.noreply.github.com>

Copilot AI commented Dec 20, 2025

Copy link
Copy Markdown
Contributor Author

@copilot any test failures will be a problem for ci and prevent running the pipeline. Fix any failing test - there shouldn't be preexisting failures

Fixed in commit 68dd942. The test failure was due to a missing mock file (utf8_encoding_test.mocks.dart) that wasn't generated. I ran build_runner to generate it and also fixed a typo in .gitignore that prevented the file from being tracked properly.

All 376 tests now pass (up from 373 with 1 failure). The CI pipeline is now unblocked.

@github-actions

Copy link
Copy Markdown
Contributor

LCOV of commit 68dd942 during Flutter App CI/CD #938

Summary coverage rate:
  lines......: 72.3% (1890 of 2613 lines)
  functions..: no data found
  branches...: no data found

Files changed coverage rate:
                                         |Lines       |Functions  |Branches    
  Filename                               |Rate     Num|Rate    Num|Rate     Num
  =============================================================================
  lib/screens/drink_detail_screen.dart   | 0.0%    190|    -     0|    -      0
  lib/widgets/info_chip.dart             | 0.0%     32|    -     0|    -      0

@codecov

codecov Bot commented Dec 20, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.33333% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
lib/screens/drink_detail_screen.dart 76.92% 9 Missing ⚠️

📢 Thoughts on this report? Let us know!

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Cloudflare Pages Preview

Your preview deployment is ready!

Preview URL: https://copilot-improve-drink-detail.staging-cambeerfestival.pages.dev

This preview will be automatically updated when you push new commits to this PR.

@richardthe3rd

Copy link
Copy Markdown
Owner

@copilot food start with the improvements. I think the most important information for users is abv, style and description, and amount remaining. Allergen information as well

Brewery is next

Star rating, bar location, cask/keg are probably next.

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.

Improve layout/design of drink details screens

3 participants