Commit graph

11321 commits

Author SHA1 Message Date
Abe Jellinek
ee0df08cfb Locate menu: await l10n translation
Should reduce jank when opening the item context menu and sidenav
Locate menu, especially on Windows (where the flash of blank menuitems
lasted an especially long time for some reason).
2024-07-03 11:33:08 -04:00
Abe Jellinek
595eeeff6d TranslationParent: Don't throw on removeHandler() if none added 2024-07-03 10:45:41 -04:00
Abe Jellinek
3e6cfaf9ac RemoteTranslate: Use ZOTERO_CONFIG 2024-07-03 10:29:06 -04:00
Abe Jellinek
4619949678 Fix RemoteTranslate null ref error when translation fails 2024-07-03 10:18:49 -04:00
windingwind
54721652b3
Fix colorpicker styling on Windows (#4326) 2024-07-03 03:26:20 -04:00
Dan Stillman
694ccecf4a Merge new English strings 2024-07-03 02:37:47 -04:00
abaevbog
668c84fed5
always open duplicatesPane itembox (#4323)
Since the header of the collapsible section is not visible,
there is no way to expand the itemBox if it was collapsed
before dulicate items are selected. With this, itembox
is always opened when a new set of duplicate items is selected.

Fixes: #4318
2024-07-03 01:58:04 -04:00
Abe Jellinek
f6a0ea6282
Use span in hiddenDOMWindow to measure text width (#4316) 2024-07-03 01:41:15 -04:00
abaevbog
63615f1f09
vpat 15: more detailed labels for itemPane (#4050)
- added dynamic tooltip whose label is set only when it appears.
It allows us to have a visible tooltip without screen readers
announcing it
- fetch the pane name string and pass it as an argument to
fluent to set the appropriate label on expand/collapse buttons
- tooltiptext is set dynamically on expand/collapse buttons to
avoid having screen readers read both the label and the tooltip text
that are almost identical
2024-07-03 01:27:35 -04:00
Abe Jellinek
5f47a3d41d
Translation: Treat EPUBs as primary attachments (#4321) 2024-07-03 01:18:23 -04:00
Abe Jellinek
222125c1a2 Add menu type classes to separators
Fixes #4317
2024-07-02 13:43:00 -04:00
Dan Stillman
8211934d97 Update connector strings 2024-07-02 05:43:31 -04:00
Dan Stillman
ea5194f206 Update locales from Transifex 2024-07-02 04:08:31 -04:00
Dan Stillman
27b439a052 Update en-US strings for Transifex 2024-07-02 01:13:57 -04:00
Abe Jellinek
92bb6b3403 Remove duplicate ID 2024-07-02 01:02:54 -04:00
Abe Jellinek
d96938f6cd Attachments box: Build Add menu locally instead of cloning
Avoids having to refactor various ZP methods to be aware of the current
tab.
2024-07-02 01:02:54 -04:00
abaevbog
2d1b8a21db
Strings for reader aria-live announcements (#4293)
used to announce which annotation is selected during
keyboard navigation, as well as the index of the current
search result

Followup to zotero/reader#130
2024-07-02 00:59:11 -04:00
Tom Najdek
390b65f2ab
Fix Import Wizard navigates to the incorrect page. Fix #4300
"Continue" button is now disabled until all checks are completed.
2024-07-01 12:55:23 +02:00
Dan Stillman
ecd6c66750 Additional logging when changing linked attachment base directory 2024-07-01 03:56:29 -04:00
Dan Stillman
d73a6f8a11 Fix PathUtils.joinRelatve() error when changing LABD on Windows
We store relative paths with forward slashes, but PathUtils requires
platform-specific slashes, so it was failing with
NS_ERROR_FILE_UNRECOGNIZED_PATH.

https://forums.zotero.org/discussion/115552/zotero-7-path-problem
2024-07-01 03:56:10 -04:00
Abe Jellinek
3df1a9b812 Code style fixes 2024-07-01 03:32:14 -04:00
Abe Jellinek
d8eae4cd3b Enable Undo Retrieve Metadata when translator added note (#4267)
Closes #2977
2024-07-01 03:31:45 -04:00
abaevbog
a054831a3a
Prevent focus from being lost in itemBox (#4287)
- always render options and link buttons - just do
not display them if their respective field is empty.
That allows us to easily handle focus after refresh
because otherwise, the node may does not exist.
If we try to restore focus to such hidden component,
simulate a "tab" from it to focus the next possible node.
This fixes the issue of focus being lost on tab after all
content of editable-text is cleared.
- add tabindex=0 to itemType menulist, otherwise it was
not perceived as a candidate to return focus to.
- somewhat special treatment for restoring focus to
creator rows. If the desired node is not found, we'll
try to focus the respective node in the last creator row.
It prevents focus from being lost on tab after clearing
the very last creator.

Fixes: #4241
2024-07-01 03:01:33 -04:00
abaevbog
7dc68209a5
fix to unwanted empty creator row in itemBox (#4275)
this._addCreatorRow needs to be properly initialized to
false (as opposed to being undefined) because 'false'
is the value we check against to decide if an empty
row should be added and focused after rendering.

Fixes: #4268
2024-07-01 02:24:01 -04:00
Dan Stillman
cc3bdb59c1 Add an index on itemData.valueID
Hopefully this will drastically speed up purging after people delete
huge numbers of items.

https://forums.zotero.org/discussion/comment/466885/#Comment_466885
2024-07-01 01:48:22 -04:00
Dan Stillman
16ae145d6c Don't purge data tables before syncing
This was copied over from classic syncing, and while I noted in
1100015d2c that it wasn't necessary before syncing anymore, I didn't
remove this call.
2024-07-01 01:48:22 -04:00
windingwind
c270069639
Redesign Document Preferences and Create Bibliography dialogs (#4265) 2024-07-01 00:24:35 -04:00
abaevbog
2dfb243924
Show correct context menu and itemPane header for collections in trash (#4297)
- only have enabled "Permanently delete" and "Restore to library"
options in the context menu for collections and searches in the trash
- display the custom header with buttons to delete or restore
in the itemPane when a collection or search in the trash is selected

Fixes: #4295
2024-06-28 16:42:45 -04:00
Dan Stillman
df8a4799e1 Use numbered variables in another new string
https://forums.zotero.org/discussion/115566/new-strings-with-multiple-variables-on-transifex
2024-06-28 16:28:59 -04:00
Dan Stillman
78507161df Use numbered placeholders in localized string
https://forums.zotero.org/discussion/115566/new-strings-with-multiple-variables-on-transifex
2024-06-28 16:22:41 -04:00
Dan Stillman
6942506eba Rework object type checking in items list
a532cfb475 added `isCollection()`, `isSearch()`, and `isItem()` methods
to data objects to handle collections and searches in the trash, with
`isItem()` checking whether `._ObjectType` was `Item`. That left out
feed items (`._ObjectType` == `FeedItem`), and when c384fef867 made
`getSelectedItems()` return only items, it used `isItem()`, so feed
items were excluded, which broke feed-item toggling between read and
unread [1] and possibly some other things.

The simple fix would be to make `isItem` match feed items as well (which
could potentially fix other bugs related to feed items), but there was
actually no need to add new methods (which can get confused with
`CollectionTreeRow` methods) when we can just check the object type with
`obj instanceof Zotero.Item`, which gets the benefit of inheritance and
matches `Zotero.FeedItem` instances as well.

[1] https://forums.zotero.org/discussion/115571/cannot-change-the-status-of-title-in-subscribtion
2024-06-28 02:09:49 -04:00
Abe Jellinek
5a6b1a9f76
Add hyphenation and text appearance options for EPUBs (#4256)
And remove duplicate string
2024-06-27 06:02:47 -04:00
Adomas Venčkauskas
87f7a6a7bd Integration: Don't activate document after clicking Manage Styles in Doc Prefs
Closes #4290
2024-06-27 10:09:23 +03:00
Dan Stillman
d5bb667fb3 Merge new English strings 2024-06-27 02:34:24 -04:00
abaevbog
f6b47987e9
fix tab duplication breakage (#4286)
Fix to breakage after 3f45def that would not open a duplicate
tab but instead create another reader instance in the same tab.
Instead of finding a tab for a specific item, use tabID that
is passed when reader should be loaded in an unloaded tab. That
allows us to know if the tab is being duplicated or not.

Fixes: #4272
2024-06-27 01:19:25 -04:00
Abe Jellinek
4eb4741795 Prevent pinning Notes button in reader sidenav
Sidenav button pane IDs usually correspond to sections with the same
IDs, but `context-notes` actually corresponds to two sections
(`context-all-notes` and `context-item-notes`). We were preventing
those sections from being pinned, but not the button that reveals them.

Fixes #4283
2024-06-26 11:17:17 -04:00
Abe Jellinek
c52ca2ee32
EPUB / Snapshot: Support printing (#4279) 2024-06-26 10:48:36 -04:00
Dan Stillman
a2dc0f7e37 Sort related items by title
Closes #4281
2024-06-26 01:02:07 -04:00
Abe Jellinek
0861710245 Style Editor: Indent with 2 spaces
Closes #4269
2024-06-24 11:14:39 -04:00
Dan Stillman
9c519948bc Add missing async to CollectionTree::selectSearch() 2024-06-24 02:45:20 -04:00
Dan Stillman
c61892e4b6 Fix Collections.getCollectionsContainingItems() when no ids are passed
Previously it would return all collections
2024-06-23 05:09:31 -04:00
Dan Stillman
c384fef867 Add getSelectedObjects() and limit getSelectedItems() to items
This adds an explicit function on ZoteroPane and the item tree for
getting objects -- including collections and searches in the trash --
and limits `getSelectedItems()` to returning actual items from the
selection. We shim various item properties on the collections and
searches in the trash, but code that's getting the selection should be
explicit about what it wants. Outside of the trash, they're equivalent,
except `getSelectedObjects()` does have an `asIDs` mode.

This switches to using getSelectedObjects() in various places and fixes
collections in the trash appearing as belonging to My Publications when
using the collections-containing-an-item highlight [1].

This also adds support for highlighting the parent collections of
collections in the trash.

[1] https://forums.zotero.org/discussion/115449/zotero-7-beta-deleted-collection-appears-as-belonging-to-my-publications
2024-06-23 05:09:31 -04:00
Dan Stillman
a612c1227e Fix collections in trash showing up in menus
New Collection menu and Add to Collection menu

https://forums.zotero.org/discussion/115447/zotero-7-beta-deleted-collections-still-appear-in-the-ui
2024-06-22 16:33:11 -04:00
abaevbog
3c6625f3cf
Tweaks to itembox unsaved creator row (#4178)
- Remove unsaved creator row on blur or escape
- Rename "unsavedRow" for "position" as we want to be able to find
the relative position of creators after the next refresh not only
for unsaved rows. In many cases "unsavedRow" as returned by getCreatorFields
is the actual index of the creator row.
- Calculate and use "position" in getCreatorFields for all creator rows, not
only unsaved one, when a new row is being added.
This fixed a bug where wrong row gets focused if an unsaved creator row is
added, some text is typed and then another creator row below this unsaved row is clicked.
- fixed a bug where autocomplete options would not be updated after creator mode
is switched for the default empty row (if there are no creators)
- simplified paste handler of creators to use modifyCreator that
also shifts creators if a creator is unsaved. Fixed bug brought up in
https://github.com/zotero/zotero/pull/4165#issue-2313280474 where
pasting creators does not always focus the last added creator.
- Fixed another bug brought up in https://github.com/zotero/zotero/pull/4165#issue-2313280474
where shift-enter from creator before "_ more creators" label
will add a new row in the end instead of focusing the next creator.
- Fixed bug where adding a row right before "_ more creators" label
and blurring it will remove all creators after it. Now, clicking +
on a creator right before the "_ more creators" label will display
all creators and add a row after it.
- Fixed a bug where if "_ more creators" is present, editing
a creator name and pressing shift-enter would loose focus
instead of adding and focusing a new row in the end.
- Fixed a bug where focus got lost from some buttons

Fixes #4143
Fixes #4241
2024-06-21 01:28:28 -04:00
Dan Stillman
6b5b47a83a Sidenav: Only show context menu with "Pin Section" on section buttons
Don't show on Locate menu button

Addresses #4253
2024-06-21 01:02:22 -04:00
abaevbog
bb3d9ccf8f
vpat 46: more aria for preferences inputs (#4264)
- linked color scheme radio buttons to their label. Using
aria-describedby on individual radio buttons instead of
linking color scheme label to radiogroup because voiceover
does not announce the label in that case.
- linked item pane header dropdown to its label
- linked markdown and richtext note format checkboxes to their labels.
- added aria description to linked attachments base directory
so the input and "choose" button
- linked virtualized tables to their labels

Data directory location setting needs some more labeling as well
but it's mechanics should be generally reworked per vpat 50.
2024-06-20 23:34:23 -04:00
Abe Jellinek
3231e24bd5 Local API: Use getByLibraryAndKeyAsync() 2024-06-20 13:20:09 -04:00
abaevbog
3f45def928
tabs startup loading optimization (#4174)
- if an unloaded tab is being opened, do not close the
tab and have reader re-open a fresh tab. Instead, keep the
tab as is, have reader use the tab as a container and
just change the tab's type. It should fix a glitch on
windows when if you click on a tab during initial loading,
it will disappear until reader re-adds it. A few tweaks
to allow unloaded tabs be generally "selectable".
Fixes: #4149
- during startup loading, select the yet-unloaded tab right
away. That way, a tab is almost immediately selected,
instead of being stuck on the library tab until the reader is ready.
- if the items are not loaded yet, use a placeholder
icon for tabs. Fixes: #4150
- special handling for reader loading message during initial
load. When an unloaded tab is selected, the loading message
needs to be displayed but, since there is no reader yet, we
add it in Zotero_Tabs.select and try to remove by the reader
when it's loaded.
2024-06-20 05:41:14 -04:00
Dan Stillman
d188857e06 Fix Reset not graying out after resetting note font size
https://forums.zotero.org/discussion/115372/zotero-7-beta-reset-is-not-greyed-when-using-default-note-font-size
2024-06-20 03:08:27 -04:00
abaevbog
13812f46b4
open itembox creator type menu on arrowUp/down (#4257)
To preserve behavior from zotero 6. We likely want to make
the creator type menu a proper menulist in the future.

Addresses: #4248
2024-06-19 02:28:26 -04:00