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 right-click menu for bonds #1872

Closed
Nitvex opened this issue Nov 28, 2022 · 0 comments · Fixed by #1896
Closed

Add right-click menu for bonds #1872

Nitvex opened this issue Nov 28, 2022 · 0 comments · Fixed by #1896
Assignees

Comments

@Nitvex
Copy link
Collaborator

Nitvex commented Nov 28, 2022

It is required to add right-click menu for bonds to simplify user interaction.
It shall contain the following items:

  • Edit. Opens dialog which is currently opens on double click
  • Bond type. Should contain vertical submenu with icons and names of bonds. Click on corresponding type changes bond type.
  • Delete. Deletes bond

Nov 29, 2022 updated

And regarding the second point, it can look like: (green square is icon)
MicrosoftTeams-image (3)


Dec 8, 2022 updated

Q: In what situation the context menu needs to show when you right click?
A: Right-click menu should always appear without any dependency on selected tool. A selected tool shouldn't reset, when right-click.

@Nitvex Nitvex added this to the Release 2.8.0 milestone Nov 28, 2022
@Nitvex Nitvex assigned Nitvex and yuleicul and unassigned Nitvex Nov 28, 2022
yuleicul added a commit that referenced this issue Dec 8, 2022
@yuleicul yuleicul linked a pull request Dec 8, 2022 that will close this issue
7 tasks
Nitvex pushed a commit that referenced this issue Jan 3, 2023
* Add new dependency react-contexify

* Add new right-click menu for bonds

Resolves: #1872

* Fix stylelint and typo

* Divide context menu items into two components

* Change error handler to do nothing

* Remove the word `bond` out of context submenu item

* Extract common util functions to `utils.ts`

* Rename `ci` to `closestItem`

* Fix context menu not hiding when click left/bottom toolbar

* Make context menu id more readable

* Simplify usage of `fromBondsAttrs`
Nitvex pushed a commit that referenced this issue Jan 4, 2023
* Add new dependency react-contexify

* Add new right-click menu for bonds

Resolves: #1872

* Fix stylelint and typo

* Divide context menu items into two components

* Change error handler to do nothing

* Remove the word `bond` out of context submenu item

* Extract common util functions to `utils.ts`

* Rename `ci` to `closestItem`

* Fix context menu not hiding when click left/bottom toolbar

* Make context menu id more readable

* Simplify usage of `fromBondsAttrs`

* Add right click menu for atoms

Depends on: #1896
Resolves: #1899

* Add atom single/batch operations
* Update logic in bond operations (more details in PR description)
* Make `changeAtomsStereoAction` static for invoking outside the class

* Refactor single atom stereo edit

* Update display orders of context menu items

Order before:
- Edit selected bond(s)
- Bond type
- Delete selected bond(s)
- Edit selected atom(s)
- Enhanced stereochemistry
- Delete selected atom(s)

Order after:
- Edit selected bond(s)
- Edit selected atom(s)
- Bond type
- Enhanced stereochemistry
- Delete selected bond(s)
- Delete selected atom(s)

* Update z-index of context menu
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 a pull request may close this issue.

2 participants