Commit graph

14548 commits

Author SHA1 Message Date
Bogdan Abaev
fc13255a7b darker --fill-secondary as qf section color 2024-07-19 11:45:22 -07:00
Bogdan Abaev
bac181fdce remove opacity when reference panel opens
Without the opacity on the reference panel, there is a shadow
appearing below and to the right of the panel which I don't think
we want. If we let the panel render with opacity:0.9 and only then
set opacity: 1, then the panel will no longer be transparent and
there will be no shadow.
2024-07-19 11:07:04 -07:00
Bogdan Abaev
d395dc54cf vpat 59: make qf ref box separator text darker
So that on windows, the separator text on white background
has a high enough contrast ratio for accessibility
2024-07-16 17:37:54 -07:00
Martynas Bagdonas
a46f1bcbbb Fix reader popups being covered by contextPane in Stacked View mode
Fixes #3542
2024-07-16 15:12:26 +03:00
Dan Stillman
220bb43830 Update reader submodule 2024-07-16 03:44:31 -04:00
Bogdan Abaev
ed1f3853b4 fix shift-Enter tagsbox inconsistent glitches (#4231)
- remove earlier shift-Enter behavior that makes tag's
input multiline.
- shift-Enter will function just as Enter by saving the
tag and allowing focus to return to reader or itemTree.
- except after pasting multiple tags which will still turn
the tags input into a multiline field. Then, shift-enter
will add a new line, just as with any other multiline
editable-text.
2024-07-16 02:36:10 -04:00
Bogdan Abaev
16a5b5b6bc add aria-label to tag edit fields (#4231) 2024-07-16 02:36:02 -04:00
Bogdan Abaev
a73035c848 vpat 66-68: fix focus within tagsBox popup (#4231)
- focus will always enter the tagsBox popup opened from the reader
- escape from within the popup with tagsBox will close the popup (vpat
  67)
- one should not be able to collapse the tagsBox. Added `collapsible`
  getter and setters to the collapsible panel to prevent the section
  from changing its open status. This may be also used in other cases,
  such as to prevent itemBox from being collapsed in duplicates mode.
- patched a glitch where tab from the last empty tab input would loose
  focus.
- changed the `menupopup` for `panel` to display the `tagsbox` because
  `menupopup` has implicit `role="menu"` which is not meant to contain
  inputs, so voiceover completely looses cursor when inputs are focused
  inside of the popup. Also, tweaked spacing a bit to avoid the
  focus-ring getting cutoff.

Addresses: #4222
Fixes: #4230
Fixes: #4226
Addresses: #4388
2024-07-16 02:35:53 -04:00
Tom Najdek
f227aeb6e0
File renaming: suppress duplicate suffixes #3317 (#4389) 2024-07-16 01:59:07 -04:00
abaevbog
25d0cf66bd
save itemPane title/abstract fields on blur (#4390)
As opposed to 'change' event.

Because if the field is editted and another window is focused
while the cursor is in the field, the change event will be
swallowed and when the field finally looses focus, it will not
be saved.

This may address the reported issue of edits not being saved in
title and abstract fields.

Addresses: #4388
2024-07-16 01:35:35 -04:00
Martynas Bagdonas
abad33116b Add reader text selection popup annotation mode toggle pref
Fixes #3352
2024-07-15 15:43:53 +03:00
Dan Stillman
06741ceb62 Add additional backslashes in Exec line in Linux desktop file
https://github.com/zotero/zotero/issues/4163#issuecomment-2220309854
2024-07-15 04:20:39 -04:00
Dan Stillman
d949748945 Update reader submodule 2024-07-15 04:15:27 -04:00
abaevbog
26f7c707ba
display emojis from color-less tag in itemTreeRow (#3330)
- display the first continuous span of emojis in the primary cell of
the itemTree for non-colored tags.
- the emojis appear after the colored tags' circles (if any)
- to keep things consistent with itemTree, sort tags in the tagsBox in
the following order: colored tags first sorted by their position,
emoji tags after sorted alphabetically, followed by remaining tags sorted
alphabetically.
2024-07-15 00:28:01 -04:00
Abe Jellinek
833ecca364
Set automatic titles in more or less all cases (#4369)
By moving the setAutoAttachmentTitle() calls to importFromFile() /
_addToDB().

Also:

- Chop off file extension when setting the parent's title based on the
  filename in Create Parent Item -> Manual Entry.
- Fix Manual Entry not renaming the attachment correctly by awaiting
  createEmptyParent().
2024-07-14 23:37:24 -04:00
abaevbog
ac1cb29c69
refresh library tab's icon cache on update (#4387)
When tabs' state is updated, refresh library tab's icon.
Do not skip it if the icon already exists (as for reader tabs).
Otherwise, when selected row from collectionTree changes,
the icons in the library tab will not update.

Fixes: #4385
2024-07-13 15:46:33 -04:00
windingwind
b16bbc4a8a Fix richlistitem inner element style
fix: https://github.com/zotero/zotero/pull/4339#issuecomment-2225908561
2024-07-13 23:51:56 +08:00
Abe Jellinek
174bde7451
Find Available PDF: Use translator-provided title (#4377) 2024-07-12 00:58:38 -04:00
windingwind
f79dab8f3e
No focus ring and background in CR readonly fields (#4380)
fix: #4138
2024-07-12 00:57:04 -04:00
abaevbog
c0f6671542
fixes to saved search dialog layout (#4378)
- remove padding between the <dialog> and the window edges
- explicit width for all zoterosearch fields because otherwise
a menulist with a long content (e.g. longer collection name) name
can push the + and - buttons outside of the window

Fixes: #4374
2024-07-12 00:55:49 -04:00
abaevbog
f387c67fbc
remove unneeded .trim from react-virt patch (#4379)
Followup to #4370, per https://github.com/zotero/zotero/pull/4370#discussion_r1674336402
2024-07-12 00:21:45 -04:00
Abe Jellinek
c3e927e52f Disable flaky Advanced Search test on CI
Re-enable after we figure out #4375, but this is breaking PR CI runs
right now.
2024-07-11 11:43:23 -04:00
abaevbog
0ea3d232f0
quickFormat rtl layout fixes (#4372)
- properly determine between which two bubbles a click landed
- set input direction
- delete the bubble on the left of the cursor
- in rtl, use selectionStart as the expected end of the input
and selectionEnd as the start. It fixes the issue of the
cursor getting stuck at the end of the input, as well as
fixes the Home/End not working from the right end.
- fix spacing issues for item descriptions in both layouts

Fixes: #4371
2024-07-11 05:39:24 -04:00
Dan Stillman
40a9ebc225 Update reader submodule 2024-07-11 01:47:42 -04:00
Tom Najdek
260709969e Improve RTF Scan UI
* Multiple accessiblity fixes
* Increase font size
* Nicer layout of the welcome screen
* Fix description in the welcome screen
* Add stripes to the table in citations matching screen
* Change icons for accept and resolve manually buttons
2024-07-11 01:46:16 -04:00
Tom Najdek
9cb7e7bb92 Few small tweaks to the wizards styling
* Align buttons with content on macOS
* Slightly reduce padding
* Remove font-size definition
2024-07-11 01:46:16 -04:00
Tom Najdek
843300c62d Use built-in color for the focus ring on macOS 2024-07-11 01:46:16 -04:00
Bogdan Abaev
80b5486991 fix some buttons not opening on space/Enter (#4243)
E.g., field-version button in itembox merge mode
2024-07-11 01:44:15 -04:00
Bogdan Abaev
8f9d5e190e fix itembox field-version button remaining visible (#4243)
Even after the merge mode is no longer active.
Fixes: #4240
2024-07-11 01:44:15 -04:00
abaevbog
a07117c938
Patch react-virtualized to fix react 18 scroll lag (#4370)
React 18 introduced automatic batching which tries to avoid unnecessary
re-rendering (https://react.dev/blog/2022/03/08/react-18-upgrade-guide#automatic-batching).
In some components based on react-virtualized (e.g. tag selector),
it leads to visible lagginess on scroll via keypress or
mouse wheel (not trackpad). This patch wraps setState of the scroll handler
of react-virtualized with ReactDOM.flushSync, which opts out
of automatic batching.

Fixes: #4368
2024-07-11 01:18:25 -04:00
Abe Jellinek
657d5c4c42 Fix skip() error on CI
Apparently you can't call skip() directly from a describe() block.
2024-07-10 14:03:06 -04:00
Dan Stillman
0b3eda5d82 Update styles and translators 2024-07-10 02:16:43 -04:00
Dan Stillman
d90f655513 Update locales from Transifex 2024-07-10 02:15:35 -04:00
Dan Stillman
5d67514705 Update reader submodule 2024-07-10 01:51:56 -04:00
Abe Jellinek
9ea56705a0 Don't change title when renaming from parent metadata (#4363) 2024-07-10 01:51:39 -04:00
Abe Jellinek
327206f931 Rename subsequent attachments after their file base names (#4363) 2024-07-10 01:51:33 -04:00
Abe Jellinek
13496afeb3
Use SelectedItemText color on SelectedItem backgrounds (#4350) 2024-07-10 01:20:47 -04:00
Bogdan Abaev
2f1aa19ae5 tweaks for tests to pass after React 18 upgrade (#4338)
- Wait for the itemsView to be initialized in the onload listener of the
  Advanced Search window
- moved waitForTagSelector in a few tests to avoid it resolving too
  early. For some tests these tweaks are always required, for others -
  tests would pass half the time. Again, not clear why it's necessary,
  potentially some flakiness from react 18?
2024-07-10 01:04:33 -04:00
Bogdan Abaev
fd93af8305 ReactDOM.unmountComponentAtNode => root.unmount() (#4338)
unmountComponentAtNode is deprecated, so save or
pass the root as a prop and call root.unmount when
the component is destroyed
2024-07-10 01:04:31 -04:00
Bogdan Abaev
37991e220e use Icons.getCSSIcon instead of getDOMElement (#4338)
- getDOMElement relied on React.renderToStaticMarkup,
which is react 18 was moved to a different file than the
one exposed with react-dom-server. To not add another
file just for that one function, replace getDOMElement
with getCSSIcon.
- getDOMElement was mainly used for a few remaining
png icons that were not replaced with svg. For those
few icons, just record which background-url should be
set when the module loads and add it in getCSSIcon if
applicable. Alternatively, background-image setting
could be moved into a stylesheet?
- a few hardcoded twisty svgs in icons.jsx are not used anywhere
(they would be fetched via IconTwisty), so those are
removed
2024-07-10 01:04:28 -04:00
Bogdan Abaev
af4bbd2c4d ReactDOM.render -> React.createRoot().render (#4338)
- await for promise that is resolved in ref attribute
of root.render() as an alternative for removed callback
from ReactDOM.render
- await-ing for promise every time when ref needs to be
used after render (e.g. tag selector container), otherwise
ref will be undefined
- additional window.sizeToContent calls to properly size
dialogs with react-rendered content (e.g. create parent),
otherwise the window can cut off some of the content.
2024-07-10 01:04:24 -04:00
Bogdan Abaev
4e0c89b352 react 18.3.1 updated dependency (#4338) 2024-07-10 01:04:17 -04:00
Abe Jellinek
6eea3704a9 Zotero.ItemFields.isAutocompleteField: Cache, use Set 2024-07-10 00:48:53 -04:00
Abe Jellinek
a334d9fdd8 Item box: Use startsWith, not includes, for field name checks 2024-07-10 00:48:53 -04:00
Abe Jellinek
c05d43fa8e Item box: Enable autocomplete on long fields 2024-07-10 00:48:53 -04:00
Abe Jellinek
38764efb5a editable-text: Allow autocomplete with wrapping 2024-07-10 00:48:53 -04:00
Abe Jellinek
3e6cc03e2e Add autocomplete-textarea CE
Exactly the same as the Mozilla autocomplete-input CE, with a different
base class. Seems to work perfectly fine.
2024-07-10 00:48:53 -04:00
Abe Jellinek
0f5fc2962a RTL: Reverse collapsible-section animation 2024-07-10 00:43:59 -04:00
Abe Jellinek
ddfe376900 RTL: Flip attachment preview arrows 2024-07-10 00:43:59 -04:00
Abe Jellinek
043c6e1795 RTL: Use direction-aware arrow key handling 2024-07-10 00:43:59 -04:00