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

When you try to add a structure to a canvas with an expanded functional group, an EDIT ABBREVIATION window appears #2471

Closed
Zhirnoff opened this issue Apr 10, 2023 · 6 comments · Fixed by #2643
Assignees

Comments

@Zhirnoff
Copy link
Collaborator

Steps to Reproduce

  1. Launch Ketcher
  2. Open file ketcher.zip
  3. Try put it on canvas

Actual behavior
The structure is under mouse cursor and when you try to put it on canvas, EDIT ABBREVIATION window appears.
Note: Perhaps this is due to the fact that the Oxygen atom is located close to the Carbon atom. The Oxygen atom is highlighted and, apparently, when clicked on canvas, editing of the abbreviation is triggered.
Expected behavior
A structure with an expanded Functional Group is added to the canvas

Screenshots
2023-04-10_14h25_04
2023-04-10_14h23_58

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Chrome
  • Version 109.0.5414.120 (Official Build) (64-bit)

Ketcher version
Version 2.9.0-rc.5

@kaluginserg
Copy link
Collaborator

this bug is affected by changes #2110. Continue investigating.

@kaluginserg
Copy link
Collaborator

Found the details.
I checked how Ketcher works now, for a couple of cases.
Screenshot:
Screenshot 2023-05-22 at 16 29 15

A) Whole structure is from the clipboard (PASTE tool triggered). Oxygen and Carbon are not considered to be merged, as there is a space between them.
So the 'Paste' functionality works fine.

B) Whole structure is from the clipboard (PASTE tool triggered). [Incorrect current implementation] Oxygen and Carbon are considered to be merged (there is a highlight for AttachmentPoint).
So the 'Paste' functionality doesn't work well for this case.

The decision, TODO:
We should allow users to put the structure with minor issues (possible attachment points between structures inside Clipboard) on Canvas. But if there is a conflict with the existing structure on Canvas - should be handled in the old way (it must be prevented).

@kaluginserg
Copy link
Collaborator

An additional issue found with tool select and moving:

Screen.Recording.2023-05-22.at.17.49.45.mov

Video explanation:
first case: When we move the structure without potential attachment point (merge Oxygen and Carbon) - everything is going as expected, after finishing moving, the structure is the same as before.

second case: When we move the structure with a potential attachment point (merge Oxygen and Carbon) - after completing the move we can see that merge has triggered and the structure has changed.

Decision TODO:
Need to allow a user to move an existing structure with a potential attachment point without triggering a merge inside the structure that has been moving.

@kaluginserg
Copy link
Collaborator

An additional issue with the current implementation found with the tool Paste and SGroup:

Screen.Recording.2023-05-23.at.16.21.33.mov

Video explanation:
third case: has two scenarios - one when we open a file and paste SGroup from the file, and also it is valid for cases with simple copy/paste logic.

Decision TODO:
Methinks we should consider this as a bug also.
@KonstantinEpam23 any suggestions?

@KonstantinEpam23
Copy link
Collaborator

@kaluginserg Hmm, this is definitely a bug, I believe we might already have a task for this.

@Zhirnoff can you please double-check

@Zhirnoff
Copy link
Collaborator Author

I have looked at this behavior. The user should be able to copy a functional group and attach to a structure atom(CTRL+C then CTRL+V) or cut a functional group and attach to an atom(CTRL+X then CTRL+V)

2023-05-23_21h22_42.mp4

KonstantinEpam23 pushed a commit that referenced this issue May 25, 2023
…functional group, an EDIT ABBREVIATION window appears (#2643)

* #2471 – fix the paste tool issue with attachment point

* #2471 – fix the issue with select and paste tools with collapsed SGroup

---------

Co-authored-by: sergei_kalugin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants