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

Allow plugins/extensions to request specific positions in menus, choose order of commands, layout of dialogs #1498

Closed
matterhorn103 opened this issue Dec 4, 2023 · 6 comments · Fixed by #1503

Comments

@matterhorn103
Copy link
Contributor

Currently anything added to a menu or dialog by a plugin seems to be displayed in alphabetical order. Ideally the plugin could choose how these things are displayed.

If I understand correctly, in the code, menu options are given an integer as a sort of "priority" and are ordered by that, and dividers are added every 100. So ideally what would be implemented:

  1. When a script specifies its location using --menu-path, it would be able to provide a number to use for sorting at each level so that it could affect both the plugin's location in the menus, but also the relative order of the plugin's commands if it has multiple.

Secondly, the options for customizing script-specific dialogs are fantastic and allow for a lot of flexibility, but the way things are displayed is not controllable:

  1. The relative order of dialog widgets specified in "userOptions" should be settable.

I am not sure what the mechanism is for the latter in other dialogs in the program.

@ghutchis
Copy link
Member

ghutchis commented Dec 4, 2023

Adding "menu priority" wouldn't be too hard. Maybe there's a way to add it to --menu-path, like:

"Build|Insert{32}" to indicate the priority.

I guess you also want to add an "order" attribute to change the sort of the "userOptions"? Makes sense.

@matterhorn103
Copy link
Contributor Author

Exactly that would be perfect :)

@ghutchis
Copy link
Member

ghutchis commented Dec 5, 2023

See #1501

I'll have to do some work on the "order" attribute.

ghutchis added a commit to ghutchis/avogadrolibs that referenced this issue Dec 5, 2023
Fix OpenChemistry#1498

Signed-off-by: Geoff Hutchison <geoff.hutchison@gmail.com>
Copy link
Contributor

github-actions bot commented Dec 5, 2023

Here are the build results
Avogadro2.AppImage
macOS.dmg
Win64.exe
Artifacts will only be retained for 90 days.

@matterhorn103
Copy link
Contributor Author

Remind me to add stuff to the docs about this before you close the issue!

Copy link
Contributor

github-actions bot commented Dec 5, 2023

Here are the build results
Avogadro2.AppImage
macOS.dmg
Win64.exe
Artifacts will only be retained for 90 days.

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