Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PAINTROID-634 : Add Eraser tool #31

Merged
merged 2 commits into from
Aug 28, 2023

Conversation

bakicelebi
Copy link
Contributor

@bakicelebi bakicelebi commented Jul 29, 2023

PAINTROID-634
PAINTROID-533
PAINTROID-646

New Features and Enhancements

  • Eraser Tool: Added an eraser tool that functions similarly to the brush tool but utilizes a different BlendMode.
  • Constant Identifier Names Analysis: Added a new analysis option constant_identifier_names which is set to false to stay consistent with Paintroid-Kotlin.
  • Clipboard Icon: Copied the clipboard icon asset from Paintroid-Kotlin.
  • BlendMode and StrokeJoin Serialization: Expanded the paint serializer to include support for BlendMode and strokeJoin properties.
  • ToolType Differentiation: Assigned a ToolType to each tool, enhancing tool management and identification.
  • ModalBottomSheet for Tools: Implemented a ModalBottomSheet that displays a list of available tools.
  • Navigation Enhancement: Added the BottomNavBar functionality to highlight the active tool.
  • Toast Package Update: Replaced the toast package with this package for better toast notifications.
  • Integration Test Improvements: Changed integration testing through the addition of utility functions and the reorganization of existing tests.

Refactorings and Bug Fixes

  • Component Renaming: Renamed the component "BottomControlNavigationBar" to "BottomNavBar" for consistency and clarity.
  • Background and PaintingLayer Refactoring: Refactored the BackgroundLayer and PaintingLayer widgets for improved readability.
  • PaintSerializer Optimization: Optimized the PaintSerializer class.
  • Image Saving Improvement: Reworked the image-saving mechanism to fix JPG transparency issues that arose when using the eraser tool.
  • Bug Fix: Addressed a bug where strokes were saved with incorrect stroke widths in projects/images.
  • API Permission Handling: Fixed permission issues for API versions greater than 28.

Checklist

  • Include the name of the Jira ticket in the PR’s title
  • Include a summary of the changes plus the relevant context
  • Choose the proper base branch (develop)
  • Confirm that the changes follow the project’s coding guidelines
  • Verify that the changes generate no compiler or linter warnings
  • Perform a self-review of the changes
  • Verify to commit no other files than the intentionally changed ones
  • Include reasonable and readable tests verifying the added or changed behavior
  • Confirm that new and existing unit tests pass locally
  • Check that the commits’ message style matches the project’s guideline
  • Stick to the project’s gitflow workflow
  • Verify that your changes do not have any conflicts with the base branch
  • After the PR, verify that all CI checks have passed
  • Post a message in the #paintroid Slack channel and ask for a code reviewer

Comment on lines 62 to 63
final bgPicture = backgroundRecorder.endRecording();
final bgImage = await bgPicture.toImage(
Copy link
Contributor

Choose a reason for hiding this comment

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

I would write the whole name like you did with the others
backgroundPicture
backgroundImage
Also those 2 are synonyms, maybe specify what makes them different in the name

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Refactored the function, it should be more readable now

Copy link
Contributor

@juliajulie95 juliajulie95 left a comment

Choose a reason for hiding this comment

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

Added some comments, looks good to me though!

@juliajulie95 juliajulie95 merged commit 0ed17ab into Catrobat:develop Aug 28, 2023
1 check passed
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