Skip to content

fix: Hide duplicate floating player in phone layout#218

Merged
PartyDonut merged 1 commit intodevelopfrom
fix--Improve-miniplayer
Feb 8, 2025
Merged

fix: Hide duplicate floating player in phone layout#218
PartyDonut merged 1 commit intodevelopfrom
fix--Improve-miniplayer

Conversation

@PartyDonut
Copy link
Copy Markdown
Collaborator

Pull Request Description

Improvements to floating video player visuals
Fixes floating video player duplicates when layout == Phone

@PartyDonut PartyDonut added the bug Something isn't working label Feb 8, 2025
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai bot commented Feb 8, 2025

Reviewer's Guide by Sourcery

This pull request addresses the duplicate floating video player issue on phone layouts by refining the conditions governing the player's rendering and appearance. The changes include additional layout checks, incorporating home route verification, and standardizing the floatingActionButtonAnimator configuration across multiple screens. Minor UI enhancements, such as adjusting the elevation and applying a theme-based color to the player’s card, are also implemented.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Enhanced layout conditions for displaying the floating video player in the navigation scaffold.
  • Imported an additional routing package to access the current route name.
  • Added a check to determine if the current route is among the home routes.
  • Updated the floatingActionButton condition to include view size check and home route validation.
  • Included a conditional assignment for floatingActionButtonAnimator when the player is minimized.
lib/widgets/navigation_scaffold/navigation_scaffold.dart
Standardized floatingActionButtonAnimator configuration across multiple screens.
  • Added floatingActionButtonAnimator configuration in the library search screen when the player state is minimized.
  • Inserted floatingActionButtonAnimator handling in the detail scaffold.
  • Introduced floatingActionButtonAnimator in the nested scaffold for consistency.
lib/screens/library_search/library_search_screen.dart
lib/screens/shared/detail_scaffold.dart
lib/screens/shared/nested_scaffold.dart
Improved visual styling for the floating player bar.
  • Increased the elevation of the card to enhance prominence.
  • Applied a theme-based primary container color to the card for better visual alignment.
lib/widgets/navigation_scaffold/components/floating_player_bar.dart

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @PartyDonut - I've reviewed your changes - here's some feedback:

Overall Comments:

  • The floatingActionButton configuration is duplicated across multiple screens; consider extracting it into a helper widget for better maintainability.
  • Consolidate repeated conditional logic for setting the floatingActionButtonAnimator into a utility function to reduce future inconsistencies.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Review instructions: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@PartyDonut PartyDonut merged commit cf53f02 into develop Feb 8, 2025
1 check passed
@PartyDonut PartyDonut deleted the fix--Improve-miniplayer branch February 8, 2025 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant