Commit graph

11 commits

Author SHA1 Message Date
Dan Stillman
dc6d55a137 Remove collectionTreeRow from the plugin menu context
Menu plugins reading it acted on one arbitrary row of the selection.
Reading it now throws and names collectionTreeRows, which the context
has already provided since multi-collection selection landed.

The context now copies property descriptors rather than values, since
copying values would evaluate the throwing collectionTreeRow getter for
every menu.
2026-07-29 13:22:58 -04:00
Dan Stillman
15c2c95470 Support multiple-collection selection (#5954)
Allow selecting multiple collections, saved searches, or library roots in the
collection tree -- within a library or across libraries -- and show the union
of their items. The selection is threaded through the pane as an array
(getCollectionTreeRows(), changeCollectionTreeRows(), etc.); the item pane, tag
selector, reports, and export operate on all selected rows.

Adding items (new items and notes, drag-and-drop, the attachment dialog,
import, Add by Identifier) targets every selected collection. Only rows that can
share an items view may be combined: collections, saved searches, and library
roots mix freely, and multiple Recently Read rows can be combined across
libraries, but other special views (Trash, Duplicates, etc.) and rows from
different visibility groups can't be shown together, so a selection mixing them
keeps only the focused row. In-window advanced search runs across all selected
collections.

Advanced search value autocomplete is now scoped to the searched library, fixing
a long-standing TODO where suggestions were drawn from all libraries regardless
of the search scope; for a cross-library selection it spans the selected
libraries.

For a cross-library selection, the tag selector shows the union of tags
(colored tags only when a single library is in scope, since colors are
per-library), and deleting a tag spans all selected libraries while
rename/color/split are disabled. If advanced search is open, the
collection and saved-search conditions are omitted, since each is scoped
to a single library.
2026-06-18 14:05:55 -04:00
windingwind
55672ba933
Fix removal logic for menu added by MenuManager (#5886)
Add the registered main key to menu class list so that they can be found when plugin is removed.
Add test for the fix.
2026-04-17 10:13:36 -04:00
windingwind
c4df6b2151
Fix should register other main window menus test (#5812) 2026-03-04 22:56:18 -05:00
Abe Jellinek
7abc35bc02
Notes context pane: Create context menus locally (#5508) 2025-08-27 00:41:21 -04:00
windingwind
7f9418fe98
Implement custom menu API (#5028) 2025-08-20 02:10:35 -04:00
windingwind
d1c6ee33be Fix plugin API test failure
Fix: #5411
2025-07-30 22:31:09 -04:00
windingwind
0b8b4c0ff6
Draggable item pane sections (#5094) 2025-04-03 21:32:37 -04:00
windingwind
7296583f2a
Fix item pane custom info row render after item change (#4875)
Add test for info row render after item change
fix: #4874
2024-11-29 16:18:31 -05:00
windingwind
f5b653e7fd
Add item tree and info box refresh API (#4850)
For APIs that have lifecycle control, e.g. item
pane section, the `update` is passed in the init
hook.
For APIs without lifecycle, we can't pass a value.
Instead, we provide a method to refresh in the API
instance.
2024-11-20 08:35:56 -05:00
windingwind
aec6e61cb3 Add ItemPaneManager.registerInfoRow API
Unify plugin API classes

Add info box custom row API tests

Refactor itemBox.js create element

Wrap hooks in API for safe call

Add test for item tree api and hook error handling

Remove try/catch from #4816

Move plugin API definitions to xpcom/pluginAPI
2024-11-11 11:27:47 -05:00