Skip to content

PAINTROID-814 Add import tool - #175

Open
Amit-Matth wants to merge 2 commits into
Catrobat:developfrom
Amit-Matth:PAINTROID-814
Open

PAINTROID-814 Add import tool#175
Amit-Matth wants to merge 2 commits into
Catrobat:developfrom
Amit-Matth:PAINTROID-814

Conversation

@Amit-Matth

@Amit-Matth Amit-Matth commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

This PR completes and stabilizes the Import Tool, enabling refined external asset integration with smart scaling, auto-centering, and a multi-placement workflow.

PAINTROID-814

New Features and Enhancements

  • Official Sticker Gallery: Integrated a full-screen WebView that loads the official Catrobat figures download page, allowing for direct asset imports.
  • Auto-Alignment: Stickers are now automatically centered in the middle of the canvas when imported.
  • Intelligent Scaling: Tiny stickers are scaled up to a minimum interactable size (100px), and oversized stickers are scaled down to fit 80% of the canvas.
  • Sticker Stamping Mode: The bounding box handles now remain visible after applying a sticker, allowing for multiple placements of the same asset in one session.

Refactorings and Bug Fixes

  • Riverpod Service Migration: Encapsulated download and processing logic into a new StickerService and StickersGalleryProvider, moving away from local widget state.
  • Eliminated Disposal Crashes: Fixed the "ref after disposal" crash by capturing providers and the Navigator instance before asynchronous gaps in the tool selection logic.
  • Android Rendering Fixes: Enabled Hybrid Composition for the WebView to resolve flickering and the issue where content was hidden until scrolling.
  • Undo/Redo Stability:
    • Created a dedicated ImportCommand to ensure undoing a sticker placement doesn't incorrectly switch the tool to the Clipboard tool.
    • Restored the refresh signal in the project loader to ensure Undo/Redo buttons update immediately after loading a file.
  • Network & Compatibility: Added an SSL bypass for sticker downloads to support emulators with out-of-sync clocks and added missing INTERNET permissions to the manifest.
  • Cleanup & Maintenance: Removed the accidentally committed hex_dump.ps1 script and updated the test suite to support the new ImportTool API.

Checklist

Your checklist for this pull request

Please review the contributing guidelines and wiki pages of this repository.

  • Include the name of the Jira ticket in the PR’s title
  • Add the link to the ticket in Jira in the description of the PR: PAINTROID-814
  • 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 (Wiki)
  • 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 tests pass locally
  • Check that the commits’ message style matches the project’s guideline
  • Verify that your changes do not have any conflicts with the base branch
  • After the PR, verify that all CI checks have passed
  • Add new information to the Wiki

@Amit-Matth
Amit-Matth marked this pull request as draft August 7, 2026 13:21
@Amit-Matth
Amit-Matth marked this pull request as ready for review August 13, 2026 16:33
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.

1 participant