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 atoms #1899

Closed
Tracked by #1896
Nitvex opened this issue Dec 8, 2022 · 0 comments · Fixed by #1981
Closed
Tracked by #1896

Add right-click menu for atoms #1899

Nitvex opened this issue Dec 8, 2022 · 0 comments · Fixed by #1981
Assignees

Comments

@Nitvex
Copy link
Collaborator

Nitvex commented Dec 8, 2022

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

  • Edit. Opens dialog which is currently opens on double click
  • Enhanced stereochemistry:
    – Should be grayed out if enhanced stereochemistry can not be added.
    – Opens the following dialog:
  • Delete. Deletes atom
@Nitvex Nitvex added this to the Release 2.8.0 milestone Dec 8, 2022
@Nitvex Nitvex assigned Nitvex and yuleicul and unassigned Nitvex Dec 8, 2022
yuleicul added a commit that referenced this issue Dec 22, 2022
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
@yuleicul yuleicul linked a pull request Dec 22, 2022 that will close this issue
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