Skip to content

feat: Improved UI and added Filters(atkinson and false floyd Steinberg)#26

Merged
AsCress merged 3 commits intofossasia:mainfrom
Vishveshwara:filter_screen
Jun 3, 2025
Merged

feat: Improved UI and added Filters(atkinson and false floyd Steinberg)#26
AsCress merged 3 commits intofossasia:mainfrom
Vishveshwara:filter_screen

Conversation

@Vishveshwara
Copy link
Copy Markdown
Contributor

@Vishveshwara Vishveshwara commented Apr 23, 2025

fixes #22

Screenshots:
WhatsApp Image 2025-04-23 at 22 52 52_8a2eb3ad
WhatsApp Image 2025-04-23 at 22 52 52_a3ac3620

Changes:

  • Added 4 New Filters( False floyd steinberg, atkinson for black/white and black/white/red)
  • Added Preview of the filter chosen
  • UI improvements

Summary by Sourcery

Enhance image processing and UI for filter selection in the e-paper display application

New Features:

  • Added multiple dithering filters for black and white and tri-color image processing
  • Implemented a new filter preview and selection interface

Bug Fixes:

  • Refactored image processing methods to provide more specific and clear dithering techniques

Enhancements:

  • Improved image list and filter selection UI with interactive cards
  • Added detailed filter name mapping for better user understanding
  • Enhanced preview section with larger image display

@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Apr 23, 2025

Reviewer's Guide by Sourcery

This pull request introduces new image processing filters (False Floyd-Steinberg and Atkinson), adds a filter preview feature, and improves the UI of the image editor screen. The new filters are added for both black/white and black/white/red image processing. The UI improvements include styling and layout adjustments to enhance the user experience.

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

File-Level Changes

Change Details Files
Added new image processing filters, including False Floyd-Steinberg and Atkinson dithering, for both black/white and black/white/red image processing.
  • Added bwFalseFloydSteinbergDither function.
  • Added bwAtkinsonDither function.
  • Added bwrFalseFloydSteinbergDither function.
  • Added bwrTriColorAtkinsonDither function.
  • Added bwNoDither function.
  • Added bwrNoDither function.
lib/util/image_processing/image_processing.dart
lib/util/epd/gdey037z03.dart
lib/util/epd/gdey037z03bw.dart
Implemented a filter preview feature in the UI, allowing users to see the effect of each filter before applying it.
  • Added a previewWidget to display the selected filter.
  • Implemented a getFilterNameByIndex method to retrieve the filter name based on its index.
  • Added a filterCards list to display available filters.
  • Added a StatefulWidget to manage the selected filter.
  • Added a GestureDetector to the filter cards to allow the user to select a filter.
  • Added visual feedback to the selected filter card.
lib/view/widget/image_list.dart
Improved the UI of the image editor screen, including styling and layout adjustments.
  • Changed the background color to white.
  • Updated the AppBar with a centered title and adjusted styling.
  • Added padding to the main content area.
  • Modified the 'Import Image' button style.
  • Adjusted the layout of the filter selection area.
lib/view/image_editor.dart
lib/view/widget/image_list.dart

Assessment against linked issues

Issue Objective Addressed Explanation

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

Overall Comments:

  • Consider extracting the filter selection logic into a separate widget for better organization.
  • The filter name mapping could be moved to the ImageProcessing class to keep related logic together.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: 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.

@Vishveshwara Vishveshwara changed the title Improved UI and added Filters(atkinson and false floyd Steinberg) feat: Improved UI and added Filters(atkinson and false floyd Steinberg) Apr 23, 2025
@Vishveshwara
Copy link
Copy Markdown
Contributor Author

@kienvo @AsCress can you please review this? I haven't changed the internal logic of how filters are handled, if you guys have any suggestions to improve please suggest them.

@mariobehling mariobehling requested review from AsCress and kienvo April 26, 2025 08:17
@mariobehling
Copy link
Copy Markdown
Member

Please resolve conflicts. Thanks!

Comment thread lib/view/widget/image_list.dart
@Vishveshwara
Copy link
Copy Markdown
Contributor Author

@AsCress @Jhalakupadhyay can you please review this pr

Comment thread lib/view/widget/image_list.dart Outdated
Comment thread lib/view/widget/image_list.dart Outdated
@AsCress
Copy link
Copy Markdown
Collaborator

AsCress commented Jun 2, 2025

@Vishveshwara Please resolve conflicts here.
@kienvo Are we aligned on this ? Is this addition good to go ?

@kienvo
Copy link
Copy Markdown
Member

kienvo commented Jun 3, 2025

Rebasing. Good to go.

@AsCress
Copy link
Copy Markdown
Collaborator

AsCress commented Jun 3, 2025

Good to go from my side as well.

@AsCress AsCress merged commit e61ade4 into fossasia:main Jun 3, 2025
3 checks passed
github-actions Bot added a commit that referenced this pull request Jul 14, 2025
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.

Enhance Filter Screen Functionality and UI

4 participants