Skip to content

Do not show carousel topBar if no images in report#642

Merged
epou merged 1 commit intomainfrom
not_show_carousel_if_not_photos
Nov 13, 2025
Merged

Do not show carousel topBar if no images in report#642
epou merged 1 commit intomainfrom
not_show_carousel_if_not_photos

Conversation

@epou
Copy link
Member

@epou epou commented Nov 13, 2025

No description provided.

@epou epou requested a review from Copilot November 13, 2025 08:06
@epou epou self-assigned this Nov 13, 2025
Copy link
Contributor

Copilot AI left a comment

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 modifies the report detail page to conditionally hide the carousel top bar when a report contains no images. The change prevents displaying an empty carousel area for reports without photos.

Key changes:

  • Made the topBarBackgroundBuilder callback return a nullable Widget? instead of non-nullable Widget
  • Added logic to buildPhotoCarousel to return null when report.photos is empty
  • Cached the result of topBarBackgroundBuilder callback to avoid duplicate invocations

Reviewed Changes

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

File Description
lib/pages/my_reports_pages/widgets/report_detail_page.dart Updated to handle nullable top bar background and cache the callback result
lib/pages/my_reports_pages/detail/shared_report_widgets.dart Modified buildPhotoCarousel to return null when no photos exist

@codecov
Copy link

codecov bot commented Nov 13, 2025

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 25.46%. Comparing base (221e724) to head (8eb8b33).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...my_reports_pages/detail/shared_report_widgets.dart 0.00% 2 Missing ⚠️
...s/my_reports_pages/widgets/report_detail_page.dart 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #642      +/-   ##
==========================================
+ Coverage   25.45%   25.46%   +0.01%     
==========================================
  Files          25       25              
  Lines        1662     1661       -1     
==========================================
  Hits          423      423              
+ Misses       1239     1238       -1     
Flag Coverage Δ
unittests 25.46% <0.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...s/my_reports_pages/widgets/report_detail_page.dart 0.00% <0.00%> (ø)
...my_reports_pages/detail/shared_report_widgets.dart 9.23% <0.00%> (-0.15%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@epou epou added this pull request to the merge queue Nov 13, 2025
Merged via the queue into main with commit 2c88732 Nov 13, 2025
6 checks passed
@epou epou deleted the not_show_carousel_if_not_photos branch November 13, 2025 09:12
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.

2 participants