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

Preview: Undo/Redo actions don't work for last deleted image (SVG or PNG) after Undo its deletion #5174

Closed
Zhirnoff opened this issue Jul 26, 2024 · 3 comments
Labels
bug Images Images support MMPK Scope for Pathway reactions, View-only mode, Static images, Custom buttons and Ketcher API changes Priority: Medium

Comments

@Zhirnoff
Copy link
Collaborator

Zhirnoff commented Jul 26, 2024

Steps to Reproduce:

  1. Refresh the page;
  2. Add images on canvas (PNG or SVG) Image files:
    image-png.zip
    image-svg.zip
  3. Move image to another place
  4. Delete image using erase
  5. Undo action - Deleting is canceled, image is on Canvas
  6. Make Undo again (or Redo)

Actual behavior:

  • In case of Undo - Movement action from step 2 isn't canceled and image is still displayed on the place
  • In case of Redo - Deleting isn't repeated and image is still displayed

Expected behavior:

  • In case of Undo - Movement action from step 2 is canceled and image is changed position accordingly
  • In case of Redo - Deleting is repeated and image isn't displayed

Desktop:

  • OS: Windows 11
  • Browser Chrome
  • Version 124.0.6367.79 (Official Build) (64-bit)

Ketcher version:

  • [Version 2.23.0-rc.3]

Indigo version:

  • [Version 1.22.0-rc.3]

Additional Details:

undo1.mp4
  • The issue is like that delete "resets" history of Undo/Redo of the last deleted image, you can see it on recording for two images - Undo/Redo doesn't work only for the last deleted image:
undo2.mp4
  • Example of issue for two images and Redo:
2024-07-26_12h56_03.mp4
@Zhirnoff Zhirnoff added bug Priority: Medium Images Images support MMPK Scope for Pathway reactions, View-only mode, Static images, Custom buttons and Ketcher API changes labels Jul 26, 2024
@Zhirnoff Zhirnoff changed the title Preview: Redo not working for SVG image Preview: Redo is not working for SVG image Jul 26, 2024
@Zhirnoff Zhirnoff changed the title Preview: Redo is not working for SVG image Preview: Redo is not working for SVG/PNG image Jul 26, 2024
@Zhirnoff Zhirnoff changed the title Preview: Redo is not working for SVG/PNG image Preview: Redo is not working for SVG image Jul 26, 2024
@Zhirnoff Zhirnoff changed the title Preview: Redo is not working for SVG image Preview: After deleting Redo is not working for images Jul 26, 2024
@ivanmaslow ivanmaslow changed the title Preview: After deleting Redo is not working for images Preview: Undo/Redo actions don't work after Undo for last deleted image (SVG or PNG) Jul 26, 2024
@ivanmaslow ivanmaslow changed the title Preview: Undo/Redo actions don't work after Undo for last deleted image (SVG or PNG) Preview: Undo/Redo actions don't work for last deleted image (SVG or PNG) after Undo its deletion Jul 26, 2024
@ivanmaslow
Copy link
Collaborator

The fix is verified on env with 5172-update-ket-image branch.

  • Ketcher version: [Version 2.23.0-rc.3] Build at 2024-08-01; 08:58:34
  • Indigo version: Version 1.23.0-dev.4.0-gb71e441d7-wasm32-wasm-clang-19.0.0
    It works as expected for all cases above.
    Undo/Redo actions work for the last deleted image (SVG or PNG) after Undo its deletion.

@daniil-sloboda
Copy link
Collaborator

Fixed as part of #5002

@Zhirnoff
Copy link
Collaborator Author

Zhirnoff commented Aug 7, 2024

Tested. Bug fixed.

2024-08-07_15h14_29.mp4
2024-08-07_15h16_29.mp4

Desktop:

  • OS: Windows 11
  • Browser Chrome
  • Version 124.0.6367.79 (Official Build) (64-bit)

Ketcher version
[Version 2.24.0-rc.1]
Indigo version
[Version 1.23.0-rc.1]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Images Images support MMPK Scope for Pathway reactions, View-only mode, Static images, Custom buttons and Ketcher API changes Priority: Medium
Projects
None yet
Development

No branches or pull requests

3 participants