Commit graph

11215 commits

Author SHA1 Message Date
windingwind
4fc8850f1e Skip item pane section render when not in selected tab 2024-05-15 06:45:09 -04:00
windingwind
8b083aa426 Fix context pane unnecessary update
Fixes #4029
2024-05-15 06:45:09 -04:00
windingwind
91c0c28b5d Fix attachments & annotation box refresh bugs and add tests (#4031)
Fixes #3993
Fixes #3995
Closes #4082
2024-05-15 06:45:01 -04:00
Dan Stillman
0c8d3f0829 Improve counting of file attachments for Show File and Export PDFs
If a parent item and its primary attachment are selected, it should
still say "Show File" rather than "Show Files". This adds the
questionably named `Zotero.Items.numDistinctFileAttachmentsForLabel()`
to try to figure out if we're operating on 0, 1, or >1 items.

Follow-up to #4124
2024-05-15 05:50:47 -04:00
Abe Jellinek
c47617c809 Move "Show File" out of Locate menu and into File menu (#4124) 2024-05-15 05:50:42 -04:00
Dan Stillman
e1f1003318 Add Zotero.Item::numFileAttachments() 2024-05-15 05:48:03 -04:00
Abe Jellinek
bb146328b8
Update default locate engines (#4125) 2024-05-15 05:45:38 -04:00
Abe Jellinek
099c8e9958 Locate manager window: Support Accel-W to close 2024-05-14 14:58:45 -04:00
Abe Jellinek
c94c0bae8f Locate manager window: Update list after Restore Defaults 2024-05-14 14:57:31 -04:00
Abe Jellinek
9eabc169c4
Move Locate to sidenav (#3747) 2024-05-14 04:19:58 -04:00
abaevbog
7091fa3a58
touchscreen longpress displays context menu (#4104)
Fixes the issue where long press would not open up
context menu in a virtualized table and tab bar because
it was handled in mousedown events that longpress on a
touchscreen does not dispatch.

This behavior is still observed in the scrollable area
of the reader and the note editor.

Addresses: zotero#4094
2024-05-13 19:03:29 -04:00
Abe Jellinek
5dae581ad3
Lazy load CEs (#4112) 2024-05-11 04:11:22 -04:00
Bogdan Abaev
be1c890051 After new item creation, focus title in itemBox (#4113)
When item is created manually, title field in itemBox
will be focused instead of the title in the itemPane as before.
If the itemBox is collapsed, it will be opened.

Added 'open' setter to item pane section for brevity

Fixes #4111
2024-05-11 04:09:05 -04:00
Dan Stillman
c01b3ae270 Don't use [ztabindex] in selector when finding metadata fields 2024-05-11 03:47:51 -04:00
abaevbog
ffef57eed1
redone fix of focus sticking to tab after click (#4087)
- revert debcb9944d since it breaks
drag-drop reordering of tabs
- when reader is being refocused by contextPane, add a small delay
so that the focus settles on the tab before focusing the reader
- also explicitly refocus the reader tab after drag, since then focus
also lands on the tab and finds itself outside of the reader
2024-05-11 03:21:59 -04:00
Abe Jellinek
59b1d75b98
Item pane header customization (#3791) 2024-05-10 08:23:26 -04:00
abaevbog
8278140492
Prevent empty item type menu from appearing after Cmd-Shift-N when info section is collapsed (#4105)
If the info section is collapsed, do not try to focus and
open the itemType menu as it can lead to an empty dropdown.
Just focus the header title in that case
2024-05-10 03:23:20 -04:00
Dan Stillman
85f58cc97d Fix Utilities.Internal.md5Async() on missing files and empty strings
https://forums.zotero.org/discussion/114208/zotero-7-beta-bug-report-consistent-error-when-syncing
2024-05-08 01:16:37 -04:00
Abe Jellinek
634e27c621 Scaffold: Don't use cookie sandbox by default
Instead, just set an empty cookie sandbox when running tests without
"Remember cookies" enabled. The cookie sandbox doesn't remember cookies
set in JS, which breaks some sites in the Scaffold browser.

https://forums.zotero.org/discussion/114239/z7-beta77-scaffold-bugs-report
2024-05-07 15:11:03 -04:00
Abe Jellinek
19ab6b6643 Scaffold: Fix duplicate text in test status label 2024-05-07 14:30:56 -04:00
Abe Jellinek
387210e139 Scaffold: Fix Open URL 2024-05-07 14:28:50 -04:00
Abe Jellinek
655575eb77 Monaco / Scaffold: Use LF line endings on all platforms
https://forums.zotero.org/discussion/114239/z7-beta77-scaffold-bugs-report
2024-05-07 12:10:57 -04:00
Abe Jellinek
5f8ea3af9c PageDataChild: Return null channelInfo on non-HTTP channel
Rather than throwing. Fixes requireSuccessfulStatus on file: (etc.)
URIs.
2024-05-07 04:51:49 -04:00
Abe Jellinek
9b7d3edbb3 HiddenBrowser: Block all downloads 2024-05-07 04:51:49 -04:00
Abe Jellinek
8e7d9927ef Create Bibliography: Use HiddenBrowser to fix printing 2024-05-07 04:33:51 -04:00
Abe Jellinek
120d4cfacd HiddenBrowser: Add print support 2024-05-07 04:33:51 -04:00
Abe Jellinek
a473002663 Extract zoteroPrint() 2024-05-07 04:33:51 -04:00
Abe Jellinek
7f993a1528 Tab shortcuts: Use event.code for better keyboard layout compat 2024-05-07 04:29:20 -04:00
Abe Jellinek
13c96c6520 Sort shortcuts: Use Alt for better keyboard layout compat 2024-05-07 04:29:20 -04:00
Abe Jellinek
7e225c4517 Feed abstract: Load CSS asynchronously
Probably won't fix #4091, but can't hurt.
2024-05-06 14:12:23 -04:00
Abe Jellinek
e7b792e2d5 HiddenBrowser: options is optional, support data: URIs 2024-05-03 10:33:37 -04:00
abaevbog
debcb9944d
prevent focus from sticking to tab after click (#4078)
After clicking on a reader tab, the reader will get focused
but the default mousedown event handler can then shift
focus onto the actual tab. It looks like the focus gets "lost",
and breaks reader keyboard shortcuts so we want to avoid it.
Mainly happens on windows.

Fixes: #4077
2024-05-01 23:59:10 -04:00
Abe Jellinek
729b5a2082 Quick Search: Don't run on mode switch if field is empty
Fixes #4075
2024-05-01 14:43:42 -04:00
abaevbog
adaa61f2cf
Make opened tabs menu scrollable (#3833)
- If there are too many tabs opened to fit onto the screen,
the tabs menu can be scrolled
- When tabs menu is opened, scroll to the selected tab
- Use margins instead of padding to that the scrollbar does not
overlap with the cross button
- Make sure that if the tabs menu is long, there will
be a gap between it's top/bottom and the edge of the
screen
- On linux, screen.availTop and screen.availHeight are not always
correct and the menu can go outside of what is supposed to be
the available screen area. Special treatment for those
edge cases
2024-05-01 02:00:15 -04:00
abaevbog
9f453b55ad
post vpat-57: qf locator string tweak (#4067) 2024-05-01 01:18:28 -04:00
abaevbog
fa647459ac
set quicksearch placeholder as fluent argument (#4074)
Fluent seems to clear out label/placeholders attributes set directly
(not via .ftl file). So quicksearch placeholder added directly ends
up being emptied out.
This is the cleanest workaround found so far: add the placeholder
as the fluent argument

Fixes: #4073
2024-05-01 01:11:15 -04:00
windingwind
63012a816f Fix library menu type attribute
A follow up fix after #4052
Fix the padding of library menu on MacOS
2024-05-01 11:44:00 +08:00
abaevbog
638efad3eb
properly refocus tag from tag selector on re-enter (#4035)
- do not erase the last recorded tag on blur of the tag selector
- on tab from collectionTree or shift-tab from tag selector input,
try to refocus that last focused tag. If one does not exist,
try to focus the first non-disabled tag.

Fixes: #4008
2024-04-30 10:31:55 -04:00
Abe Jellinek
d5194f234d
Update progress window to use SVG icons (#4047)
* Fix translation progressWindow
* Use SVG icons, don't use determineAttachmentIcon() / getImageSrc()
* FeedItem#translate(): Pass itemDone params in correct order
* Why does FeedItem#clone() return JSON?
* Fix text misalignment
2024-04-30 05:32:54 -04:00
windingwind
6db62c6705 Fix item type menuitem type attribute
A follow up fix after #4052
Fix the padding of item type menu on MacOS
2024-04-30 16:46:30 +08:00
windingwind
dc06c699ec
Fix notes context handling issues (#4036)
fix: #4024
2024-04-30 03:03:17 -04:00
Abe Jellinek
da1eb6fda9 Feeds: Prefer content to summary when available 2024-04-30 02:14:57 -04:00
Abe Jellinek
4fe7d6fa0e Feed abstract: Add <base>
Fixes broken relative (or protocol-relative) images.
2024-04-30 02:14:57 -04:00
Abe Jellinek
302d8e925e
Remove a bunch of unused PNG icons (#4071) 2024-04-30 02:13:17 -04:00
Abe Jellinek
472ee72093
Fix column-sorting shortcuts on Windows (#4068) 2024-04-30 02:10:03 -04:00
Abe Jellinek
b9a93faabb Fix color picker tiles only showing outline
The @windows-form-element-base mixin sets background-image, so we need
to override that instead of just setting background-color.

Fixes #4065
2024-04-29 13:06:38 -04:00
Adomas Venčkauskas
1626ecf48e Limit related-items dialog to same library
Add ability to filter collection tree based on list of library IDs
Closes #4060
2024-04-29 17:19:32 +03:00
windingwind
54382475be Fix advanced search menu issues
Fix needsgutter padding of menupopup in menulist on MacOS
fix: #4052
Fix advanced search operator menu multi-select status
2024-04-29 11:45:09 +08:00
windingwind
3ec1a64a6b Fix QuickSearchTextbox value property
fix: #4057
2024-04-29 10:56:14 +08:00
Dan Stillman
81ed1f6ebb Strip line and paragraph separators in filenames
And don't fail on existing filenames with these characters in
`Item::attachmentFilename`

https://forums.zotero.org/discussion/114025/pdf-files-renaming-casuing-syncing-issue
2024-04-28 07:51:25 -04:00
Dan Stillman
41726fef84 Fix error message trying to add related item in another library
https://forums.zotero.org/discussion/114027/zotero-7-beta-remove-other-libraries-from-the-add-related-window
2024-04-28 04:08:04 -04:00
Martynas Bagdonas
7afbdd2150 Render PDF annotation images using PDF worker
Fixes #3191
2024-04-26 11:17:57 +01:00
Abe Jellinek
a5393ca0e5 Merge: Keep external annotations on master, don't erase on other
PDFWorker only re-imports external annotations when the file changes on
disk. Keep annotation items corresponding to external annotations so
that they don't disappear after the merge (and then come back when the
file is edited).

Tweaks behavior introduced in 2aa34a6.

https://forums.zotero.org/discussion/113943/zotero-7-beta-merging-pdf-files-leaves-ghost-external-annotations
2024-04-25 16:35:09 -04:00
Abe Jellinek
f609578250 Remove more unused zotero.css styles 2024-04-25 06:25:20 -04:00
Abe Jellinek
627f840c4b Remove unused #zotero-progress-box styles 2024-04-25 06:25:20 -04:00
Abe Jellinek
3a7145f4d5 Fix progress queue dialog overflow 2024-04-25 06:25:20 -04:00
Bogdan Abaev
fbfe4b2dfa qf: fix prepending multiple inputs to the editor
Fixes: #4041
2024-04-24 08:31:03 +03:00
Abe Jellinek
12b6645a1f
CookieSandbox: Fix attachToInterfaceRequestor() for XHRs (#4043) 2024-04-23 18:53:46 -04:00
Bogdan Abaev
0077c3f07a post vpat 57: revert layout changes to locator
Locator type dropdown just has aria-label "Locator type".
The locator input is labelled by a hidden label with "Locator input"
string, as well as the locator type. That way both are announced
when it is focused.

Fixes: #4039
2024-04-23 16:36:33 +03:00
Adomas Venčkauskas
19f0e9369a Fix citation dialog reference list not being scrollable 2024-04-23 16:34:42 +03:00
Dan Stillman
60fd0829b0 fx-compat: Fix positioning and size of progress popups
In Firefox 115, overwriting `outerHeight` caused it to not report the
correct value later, and whatever issue were were working around seems
to have been resolved since Firefox 3.

https://forums.zotero.org/discussion/113633/zotero-7-beta-bug-report-the-progresswindow-shows-at-incorrect-position
2024-04-23 04:28:57 -04:00
Bogdan Abaev
784ccdd996 vpat 57/58: classic citation editor aria fixes
- vpat 57: remove tabindex values, set tabindex=0 on all focusable
fields. It allows mozilla to determine the best focus sequence
for keyboard navigation and fixes wrong order where some inputs would
go before the "Ok" and "Cancel" buttons and some - after
- vpat 58: added labels to all inputs to be announced when focused.
Added separate labels for locator menulist and for the locator input so
that the locator type has a proper label. It is also better to have
visible explicit labels when possible
2024-04-23 09:09:52 +03:00
Abe Jellinek
d815476a14 fx115: Scaffold: Fix Tests listbox sizing
- Remove splitter for now - no longer works with flex, so we'll need to
  rethink it
- Borrow selectItemsDialog richlistbox sizing fix via mixin
2024-04-22 15:02:30 -04:00
Abe Jellinek
fde33e7100 fx115: Scaffold: Center Open window (ex-sheet) 2024-04-22 15:02:30 -04:00
Abe Jellinek
5d760c9304 fx115: Scaffold: Fix window sizing 2024-04-22 15:02:30 -04:00
Tom Najdek
25b9c677e3
Import into current collection if not creating new collection. Resolve #2291 2024-04-22 19:24:44 +02:00
Dan Stillman
5d580f049a Merge new English strings 2024-04-22 06:51:42 -04:00
Abe Jellinek
c9fc68658b
fx102: Hidden window: Bring back "Zotero" menuitem in Window menu (#4019)
Also:

- Make Zotero window opened via Window menu resizable
2024-04-20 04:52:06 -04:00
Abe Jellinek
e516fc8354
Add sorting options and column picker to View menu (#2543) 2024-04-20 04:43:48 -04:00
Dan Stillman
a7b5648733 Tweak Quick Format/Add Note instructions for screen readers
Mostly for brevity, but also:

- "Down Arrow" → "space bar" because down-arrow doesn't open the
  citation dialog with VoiceOver enabled -- it starts reading individual
  words.
- In some cases (selected/open items and notes), Tab takes you to search
  results without your needing to type something first.

Follow-up to #4002, #4004, #4005
2024-04-20 01:14:11 -04:00
abaevbog
ad1cfa7c98
vpat_29: aria labels for insert note dialog (#4005) 2024-04-19 17:31:46 +03:00
Dan Stillman
91104ebe46 Center saved-search dialog 2024-04-19 07:44:59 -04:00
windingwind
3e30ae1797
Fix dialog window titlebar on macOS (#4011)
After #4010
2024-04-19 07:32:50 -04:00
abaevbog
1dbbb708a7
vpat 26: quickformat more detailed instructions (#4004) 2024-04-19 09:11:31 +03:00
Abe Jellinek
76a9b58914 fx115: Hidden window: Fix missing/wrong data-l10n-ids
Follow-up from 4e912b84c003d6b38e106412358b05e137e63f18; fixes #4016
2024-04-18 13:38:33 -04:00
Abe Jellinek
6d93ab1e71 Zotero.openMainWindow(): Make window resizable
Fixes #4007
2024-04-18 13:25:15 -04:00
Abe Jellinek
5d263e2f4c Note Editor & Quick Copy: Don't use bidi control characters
Since Word can't handle FSI/PDI.

This affects dragging items into notes and dragging/copying annotations
in the reader. Citations inserted from within the note editor already
didn't include bidi control characters.

Fixes #4013
2024-04-18 11:41:46 -04:00
Abe Jellinek
402538457e
Reader: Add hook for setting zoom on iframe element (#4003) 2024-04-18 10:05:18 -04:00
Dan Stillman
ff3c249b6d Remove elements from pane.persist that no longer persist anything 2024-04-18 08:35:32 -04:00
Dan Stillman
9d49d4623d Don't restore persisted attributes that are no longer valid 2024-04-18 08:35:32 -04:00
windingwind
5bef61b748 fx115: fix element width/height persist 2024-04-18 08:35:32 -04:00
Abe Jellinek
f7dc68c7f4
Render RSS description as HTML (#3956) 2024-04-18 06:39:17 -04:00
abaevbog
2835d6fe83
tag selector focus edits, fix windowing breakage (#3984)
* tag selector focus edits

- no tabstop on the tag selector scrollable area
- change tag selector's role from default "grid" to "group".
"grid" is not quite correct semantically and leads to
voiceover suggesting irrelevant commands.
- move all keyboard handling logic to tagSelectorList.jsx.
Tabbing through tag selector is now handled in ZoteroPane,
so the only logic left there is arrow navigation
between tags, and there's no reason to not have it
together with the tags list.
- a workaround to deal with focused tags when windowing
kicks in. When a tag is focused, record its index.
Each time tags are re-rendered, if the saved index is not
among rendered tags, refocus it, otherwise, move focus
to the tags list.
2024-04-18 08:39:36 +03:00
abaevbog
816aaca380
vpat 5: do not include separator in qf list count (#4001)
Screen readers announce the index of the selected item
from the list of citations in the panel. This removes
the separators from the count, since they are not focusable
and should be skipped.
2024-04-18 00:35:27 -04:00
windingwind
e2b72944be
Fix attachments section not updated when attachments are changed (#3992)
fix: #3989
2024-04-17 05:12:32 -04:00
abaevbog
80ac628d98
vpat 52: added aria label to quick search button (#3986)
Plus minor tweaks to get fluent to work in shadow doms
of the search textbox components
2024-04-17 04:15:47 -04:00
windingwind
e2970f242c
fx115: Fix popupset display (#3998)
fixes #3979
2024-04-17 03:34:02 -04:00
Adomas Venčkauskas
c9561f1041 Prevent itemlist in classic cit and edit bibl dialogs from expanding
Also
- Cleanup the XUL of said dialogs
- Refactor, spearate and clarify custom CSS injection into FX XUL
  elements
2024-04-16 11:47:01 +03:00
Adomas Venčkauskas
76b7f4be4f Fix styling in the generate bibliography dialog 2024-04-16 11:47:01 +03:00
abaevbog
363f97325f
vpat 9: set aria properties on the sync button (#3988)
Set the aria-label on the sync button. On focus,
register the sync status and set the aria-description
to be the last sync status.
2024-04-16 04:12:51 -04:00
abaevbog
d4905854eb
vpat 18: added aria labels to inputs in settings (#3985) 2024-04-16 00:51:49 -04:00
windingwind
687ba53afd
Fix attachment preview of the first added attachment (#3980)
Fixes #3973
2024-04-16 00:47:00 -04:00
Dan Stillman
86ee56cfac Automatically focus collection name in New Collection window
https://forums.zotero.org/discussion/113706/zotero-beta-7-adding-new-collection
2024-04-15 23:49:13 -04:00
Adomas Venčkauskas
cdacc42fd2 Set a reasonable min-height for classic citation and edit bibl dialogs 2024-04-15 14:54:54 +03:00
Dan Stillman
c6e5850e1c Update utilities submodule
Includes capitalizeTitle() fix:

https://forums.zotero.org/discussion/113653/zotero-7-beta-incorrect-behaviour-applying-title-case-action-to-titles-with-rich-text-markup
2024-04-14 03:22:41 -04:00
abaevbog
c7c3784413
fix focus test breakage after zotero@6859614 (#3977)
- edits to zoteroPaneTest.js focus tests to expect the updated focus
sequence: selected tab -> tabs menu -> sync button -> collectionTree
toolbar -> collectionTree -> tags selector -> itemTree toolbar
- updated tags selector keydown handling to explicitly handle all
tab/shift-tab events using moveFocus. It is more readable and explicit
focus handling for all components is required for programmic tab/shiftTab
events dispatched in tests to actually move focus
Fixes: #3975
2024-04-14 02:16:16 -04:00
Abe Jellinek
fc648a949a
Set main window min-width/height dynamically (#3841)
Correctly calculates minimums when window is too small, so it grows
when the collection tree is made bigger.
2024-04-13 03:44:17 -04:00
Abe Jellinek
860e2ce7ca Import AppConstants globally, lazily 2024-04-13 01:07:00 -04:00
Abe Jellinek
210d815173 Prevent duplicate main window
Fixes #3964
2024-04-13 01:07:00 -04:00
Dan Stillman
c31c091cb0 Fix size of progress meter at startup
(Though it still doesn't animate, for some reason)

Addresses #3961
2024-04-13 00:32:36 -04:00