Skip to content

Fixes incorrect overlay box keys usage#39

Merged
feduke-nukem merged 5 commits intomainfrom
issue/incorrect-overlay-box-keys
Aug 7, 2025
Merged

Fixes incorrect overlay box keys usage#39
feduke-nukem merged 5 commits intomainfrom
issue/incorrect-overlay-box-keys

Conversation

@feduke-nukem
Copy link
Owner

@feduke-nukem feduke-nukem commented Aug 6, 2025

Status

READY

Breaking Changes

NO

Description

closes #37
closes #38

  • Fixed usage of dialog ID when adding/removing it from the overlay.
  • Fixed potential concurrent modification of dialog controller entries.
  • Relaxed behavior when attempting to hide a dialog that is not shown.
  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • 📝 Documentation
  • 🗑️ Chore

@feduke-nukem feduke-nukem requested a review from Copilot August 6, 2025 14:39
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 fixes bugs related to incorrect dialog overlay key usage, concurrent modification issues, and improves error handling for dialogs that aren't shown. The changes replace custom insertion/removal classes with default implementations and use dialog IDs as keys instead of class types.

Key changes:

  • Replaced position-based and dialog type-based keys with dialog ID-based keys for overlay box entries
  • Consolidated custom insertion/removal classes into default implementations that use dialog IDs
  • Made hiding non-shown dialogs return normally instead of throwing assertion errors

Reviewed Changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
lib/src/core/easy_dialogs_controller.dart Updates hide dialog logic to handle missing dialogs gracefully and fixes concurrent modification by creating a copy of entries
lib/src/core/easy_overlay.dart Adds default insertion/removal classes and removes generic type parameters from mutation interfaces
lib/src/positioned/dialog/positioned_dialog.dart Removes custom insertion/removal classes, uses default implementations with position as ID
lib/src/full_screen/dialog/full_screen_dialog.dart Removes custom insertion/removal classes, uses default implementations with dialog ID
lib/src/core/widget/overlay_provider.dart Updates method signatures to remove generic type constraints
test files Updates test cases to use new default insertion/removal classes and corrected key references
pubspec.yaml Version bump to 4.0.4
CHANGELOG.md Documents the bug fixes

@codecov
Copy link

codecov bot commented Aug 6, 2025

Codecov Report

❌ Patch coverage is 90.90909% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.49%. Comparing base (13126b4) to head (61a5d0d).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
lib/src/core/easy_dialogs_controller.dart 71.42% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #39      +/-   ##
==========================================
- Coverage   96.66%   94.49%   -2.18%     
==========================================
  Files          18       18              
  Lines         750      726      -24     
==========================================
- Hits          725      686      -39     
- Misses         25       40      +15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@feduke-nukem feduke-nukem merged commit 24f53cb into main Aug 7, 2025
2 checks passed
@feduke-nukem feduke-nukem deleted the issue/incorrect-overlay-box-keys branch August 7, 2025 06:52
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.

[Bug]: Incorrect usage of id in EasyOverlayBoxMutation [Bug]: Crash on hide method in EasyDialogsController on Profile Build

2 participants