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

Add preview for hovering over a bond #4884

Closed
ljubica-milovic opened this issue Jun 25, 2024 · 1 comment · Fixed by #5293
Closed

Add preview for hovering over a bond #4884

ljubica-milovic opened this issue Jun 25, 2024 · 1 comment · Fixed by #5293
Assignees
Labels
feature request Test Cases Written Test cases has been written for that issue

Comments

@ljubica-milovic
Copy link
Collaborator

ljubica-milovic commented Jun 25, 2024

Background

  • Currently the user doesn't see any preview when hovering over a bond in macromolecules mode.
  • There should be a preview of both monomers that participate in a bond when hovering over a bond. That preview should contain the name, the structure, and the atoms contained within the attachment points for both monomers. If some attachment points that do not participate in that bond are occupied, they should be marked in gray. The attachment points that participate in that bond should be marked in teal.

Requirements

  1. Preview for hovering over a bond should appear with a delay of 0,5 seconds.
    .....1.1. The preview should contain information about both monomers:
    the name of the monomer,
    the structure of the monomer,
    the atoms contained within the attachment points,
    the attachment point that participates in the bond (that the user is hovering over) should be marked in teal,
    and if the monomer has any other attachment points that participate in other bonds (not the bond that the user is hovering over), that attachment point should be marked in gray.
image . . 2. Preview placement is described bellow.

.....2.1. The preview should appear in relation to the center of the bond (consider that the bond starts in the centers of monomers).

.....2.2. If the bond is vertical, the preview should appear on the left or on the right, depending on availability of space.
.....2.3. If the bond is horizontal, the preview should appear above or bellow, depending on availability of space.

.....2.4. The preview should appear at the appropriate distance from the bond so it doesn't overlap with the monomers who participate in the bond.

..........For example: if the preview shows up on the left side of the bond, the right edge of the preview should be a certain distance from the left edge of the monomer who is further left.

image
(Image for better understanding)
.
.
4. Hovering over the bond with the select tool should highlight the monomers and the bond the same way it currently is highlighted for hovering over with the bond tool.

Currently, hovering over a bond with the tool bond:
image

Currently, hovering over a bond with the select tool:
image

@ljubica-milovic ljubica-milovic added draft feature request Micromolecules canvas Bucket: Micromolecules canvas related issues labels Jun 25, 2024
@ljubica-milovic ljubica-milovic added this to the Ketcher 2.24.0-rc.1 milestone Jun 25, 2024
@ljubica-milovic ljubica-milovic removed the Micromolecules canvas Bucket: Micromolecules canvas related issues label Jun 26, 2024
@ljubica-milovic ljubica-milovic changed the title Add previews for hovering over a bond and while establishing a bond Add preview for hovering over a bond Jun 26, 2024
@AlexeyGirin AlexeyGirin added the Test Cases Written Test cases has been written for that issue label Jul 8, 2024
@matejaivosevic matejaivosevic self-assigned this Jul 29, 2024
@svvald svvald self-assigned this Aug 8, 2024
@svvald svvald linked a pull request Aug 14, 2024 that will close this issue
9 tasks
svvald added a commit that referenced this issue Aug 22, 2024
svvald added a commit that referenced this issue Aug 22, 2024
svvald added a commit that referenced this issue Aug 22, 2024
svvald added a commit that referenced this issue Aug 22, 2024
rrodionov91 pushed a commit that referenced this issue Aug 23, 2024
* #4884 – Add on mouse move handlers to bonds to hide preview
* #4884 – Refactor labels styling in previews, add correct color for bond previews
* #4884 – Update screenshots
@AlexeyGirin
Copy link
Collaborator

Verified.

Versions

  • Ketcher Version 2.25.0-rc.1 Build at 2024-09-03; 15:31:03
  • Indigo Toolkit Version 1.24.0-rc.1.0-gb8f099851-wasm32-wasm-clang-19.0.0
  • Chrome Version 128.0.6613.120 (Official Build) (64-bit)
  • Win10

Guch1g0v pushed a commit that referenced this issue Oct 17, 2024
* #4884 – Add on mouse move handlers to bonds to hide preview
* #4884 – Refactor labels styling in previews, add correct color for bond previews
* #4884 – Update screenshots
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Test Cases Written Test cases has been written for that issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants