Skip to content

Conversation

@Vishveshwara
Copy link
Contributor

@Vishveshwara Vishveshwara commented Nov 2, 2025

Fixes: #270
Fixes: #241
Fixes #208

Summary by Sourcery

Update the movable background image editor UI by replacing transparent backgrounds with black and removing the deprecated WhatsApp paint app bar

Enhancements:

  • Unify editor backgrounds to black for Material, overlay and bottom bar components
  • Remove unused WhatsAppPaintAppBar import and widget from the paint editor body

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Nov 2, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR consolidates the editor’s UI by switching all transparent backgrounds to black for a consistent dark theme and removes the unused WhatsApp paint AppBar from the movable background image feature.

Class diagram for removal of WhatsAppPaintAppBar from paint editor

classDiagram
  class WhatsappPaintColorpicker
  class ReactiveWidget
  class WhatsAppPaintAppBar
  class PaintEditor

  PaintEditor : configs
  PaintEditor : canUndo
  PaintEditor : done()
  PaintEditor : undoAction()
  PaintEditor : close()
  PaintEditor : activeColor

  WhatsappPaintColorpicker <|-- ReactiveWidget
  WhatsAppPaintAppBar <|-- ReactiveWidget

  %% WhatsAppPaintAppBar is removed from _buildPaintEditorBody
  %% Only WhatsappPaintColorpicker remains as child of ReactiveWidget in paint editor body
Loading

File-Level Changes

Change Details Files
Unified editor background to black
  • Changed Material widget color from transparent to black
  • Updated overlay background color to black
  • Set bottom bar background color to black in TextEditorStyle
lib/pro_image_editor/features/movable_background_image.dart
Removed redundant WhatsApp paint AppBar
  • Deleted import of whatsapp_paint_appbar.dart
  • Removed ReactiveWidget instance of WhatsAppPaintAppBar
lib/pro_image_editor/features/movable_background_image.dart

Assessment against linked issues

Issue Objective Addressed Explanation
#208 Replace the distorting background in the top area of the image editor view with the standard top layout in red, as used on other screens. The PR changes the background color in several places from transparent to black, but does not implement the standard top layout in red as requested. There is no addition of a red top layout or modification to match other screens' standard appearance.
#241 Ensure that only one undo icon is displayed when drawing shapes on the canvas, regardless of how many shapes are drawn.
#270 Ensure the initial image is displayed with the correct orientation (not rotated) in the editor UI.

Possibly linked issues

  • #Initial Image is rotated #270: The PR changes transparent backgrounds to black and removes an app bar, fixing the distorted top background described in the issue.

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!

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
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 there - I've reviewed your changes - here's some feedback:

  • Consider centralizing the repeated black background color into a shared constant or theme to avoid magic color values.
  • Double-check that removing the WhatsAppPaintAppBar doesn’t inadvertently remove essential paint editor controls like undo/done.
  • The PR title mentions initial image orientation, but I don’t see any orientation-handling changes here—please verify that the orientation fix has been included.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider centralizing the repeated black background color into a shared constant or theme to avoid magic color values.
- Double-check that removing the WhatsAppPaintAppBar doesn’t inadvertently remove essential paint editor controls like undo/done.
- The PR title mentions initial image orientation, but I don’t see any orientation-handling changes here—please verify that the orientation fix has been included.

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.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 2, 2025

Build Status

Build successful. APKs to test: https://github.com/fossasia/magic-epaper-app/actions/runs/19008812792/artifacts/4440835974.

Screenshots

Android Screenshots
iPhone Screenshots
iPad Screenshots

Copy link

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 removes unused code and updates background colors for consistency in the image editor. The changes clean up imports and UI elements that were no longer needed while standardizing the background color scheme to black.

  • Removed unused WhatsAppPaintAppBar import and widget instantiation
  • Changed background colors from transparent to black in three locations for visual consistency
  • Simplified the paint editor body by removing redundant UI components

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

Initial Image is rotated Remove duplicate undo icons when drawing shapes Image editor views with distorting background on top area

3 participants