Commit graph

14283 commits

Author SHA1 Message Date
Dan Stillman
a7ae98c4c8 Remove Firefox 102 patch 2024-05-28 06:44:19 +01:00
windingwind
fe3dae2d15
Refactor AttachmentPreview render and discard (#4161) 2024-05-28 00:05:29 -04:00
Martynas Bagdonas
a3857cb5e0 Update reader and pdf-worker submodules to fix test issues 2024-05-27 18:56:10 +03:00
Martynas Bagdonas
a15e185318 Update reader and pdf-worker submodules 2024-05-27 17:29:29 +03:00
abaevbog
c8cf38cdf1
fix itembox creator btns not hiding in view mode (#4169)
Fixes: #4166
2024-05-25 04:09:19 -04:00
Dan Stillman
17255e4f5b Update Word for Windows submodule and revert ui.window_class_override
Addresses #3930
2024-05-25 03:21:47 -04:00
Abe Jellinek
f906fee819 Allow item tree to shrink further in Stacked view
Fixes #4081
2024-05-24 14:58:39 -04:00
Abe Jellinek
bbde79818f Snapshot resource handler: Use attachmentReaderType
isSnapshotAttachment() checks the link mode (needs to be IMPORTED_URL),
but we actually allow viewing all attachments with text/html MIME types
as "snapshots" in the reader. Don't throw on any HTML attachment that
the reader is willing to open.
2024-05-24 11:25:37 -04:00
Abe Jellinek
2776d21ba0 Fix leak warning when indexing snapshots
Closes #4133
2024-05-24 11:19:04 -04:00
Abe Jellinek
b68957debe Item box: Show View Online button in feeds
Fixes #4167
2024-05-24 10:34:54 -04:00
Abe Jellinek
81954d74d1
Item box: Save text selection along with focus (#4165) 2024-05-24 10:12:12 -04:00
Abe Jellinek
3176516b79 Feeds: Fix error parsing items with rights information
- 59afef6 added a duplicate assignment to item.rights that was putting
  a TextConstruct(!!!!) in the item JSON field instead of a string
- info.rights was being set to a TextConstruct (preexisting issue!)
2024-05-23 14:20:44 -04:00
Abe Jellinek
92bb96ac49 Feeds: De-prioritize prism:copyright
Seems to be more used for copyright owner names than license
information, which is probably what we want in that field when it's
available.
2024-05-23 14:16:38 -04:00
Abe Jellinek
e20b02c124 Fix broken feeds due to rights fields missing in _textConstructs
And warn instead of throwing in the future.

Fixes #4162
2024-05-23 10:46:08 -04:00
abaevbog
9325f773cc
fix tagsbox enter glitch (#4160)
The 'blur' event needs to be dispatched by editable-text
before its state is reset (not after) because tagsbox uses
.initialValue in the 'blur' handler.

followup to 101e6d55d5

Fixes: #3575
2024-05-23 00:16:36 -04:00
Dan Stillman
721f54fe49 Disable tagsbox test again due to CI failures (#3575) 2024-05-22 23:22:05 -04:00
Dan Stillman
debe5590f2 Temporarily disable intermittently failing tests (#4139) 2024-05-22 23:02:56 -04:00
Abe Jellinek
59afef6c2e
Feeds: Refactor to move field extraction to FeedProcessor (#4158)
And support more PRISM fields.
2024-05-22 18:29:58 -04:00
abaevbog
101e6d55d5
fix itembox creator row glitches (#4152)
- fix the infinite loop glitch. Tweak of editable-text to only
dispatch 'blur' event if the input was actually blured. It prevents
the hideEditor from being locked in an infinite loop due to the
call stack hideEditor -> modifyCreator -> moveCreator -> blur -> hideEditor
- refactor blurOpenField to not be async and to not be used in most
places. It is mainly redundant now that editable-text handles blur
if clicked anywhere outside of it, so it helps to avoid confusion.
- since moveCreator does not await or yield for anything anymore, remove the
Zotero.spawn part. The rest of the function is unchanged.
- on focusin of the empty unsaved creator row, use its future unsaved id
that reflects its positioning instead of its real id (which technically is
the very last creator row). That way, a tab from a creator row that was just
filled will land to the proper component after render, as opposed to
focusing the very last row.
- similar approach to removing the unsaved creator row when the focus is
in it - focus the row above it, as opposed to the last row.

Fixes: #4145
Addresses part of: #4143
2024-05-22 18:26:52 -04:00
Abe Jellinek
d24b923542 Use text color for icons in New Collection dialog
See 19f4509, which fixed #3869. This changes that fix to use the current
text color instead of always using --fill-secondary.

Fixes #4153
2024-05-22 14:41:02 -04:00
Tom Najdek
6d71b2f6e4
Update note-editor submodule. Fix #4151 2024-05-22 14:23:46 +02:00
Abe Jellinek
d5cbb0fa03 Allow item tree to shrink further in Standard view
Addresses #4081 for Standard
2024-05-21 11:07:51 -04:00
Dan Stillman
9de70613a8 Update note-editor and reader submodules 2024-05-21 03:04:52 -04:00
Bogdan Abaev
2071a7c4cf enable + button on all creator rows
- plus button is enabled on all creator rows, not just the last one
- enabled plus button will add an empty unsaved creator row below
  current creator row. After that, plus button is disabled as long as
  the next row is unsaved.
- the grippy of a newly added unsaved row is disabled
- adding an unsaved creator row will remove another unsaved creator row
  if one exists. That way, only one unsaved row can exist at a time
- once the unsaved creator row is added, it is tentatively perceived as
  the "last" creator row based on its id. That is to avoid shifting all
  other creators' indicies and saving the item too many times.  When the
  field is blurred, that new creator is moved into its "unsavedIndex"
  before saving the item
2024-05-21 02:50:52 -04:00
Bogdan Abaev
fe01113935 fix wrong suggestions for creators
Fix to a glitch where after switching creator field mode, the
autocomplete suggestions for creators would still be for the old mode.
This only happened if the field mode was changed on an empty, unsaved
creator row.
2024-05-21 02:50:47 -04:00
Bogdan Abaev
c6799bc3c2 itembox focus edits and refactoring (#4096)
- removed ztabindex logic from itemBox. It is no longer needed, adds
  unnecessary complexity and is likely at the root of multiple glitches
  if a plugin inserts an arbitrary row that does not have ztabindex set.
- if a creator row is deleted when the focus is inside of the row, focus
  another creator row to not loose the focus.
- more centralized button handling in `_ensureButtonsFocusable` and
  `_updateCreatorButtonsStatus`
- refactoring of hidden toolbarbuttons css so that the icons are still
  hidden and don't occupy space (if desired) but are still visible for
  screen readers, so they are focusable without JS changing their
  visibility (this with ztabindex removal fixes vpat 24)
- removed `escape_enter` event from `editable-text`. It was a workaround
  to know when itemBox should move focus back to itemTree. Unhandled
  Enter on an input or Escape should focus itemTree (or reader) from
  anywhere in the itemPane/contextPane (not just itemBox), so that logic
  is moved to itemDetails.js. To avoid conflicts with Shift-Enter, do
  not propagate that event outside of multiline editable-text. Fixes:
  #3896
- removed not necessary keyboard nav handling from itemDetails.js. It
  was only needed for mac, and is redundant if "Keyboard navigation"
  setting is on
- using `keydown` instead of `keypress` for itemDetails keyboard nav
  handling because `Enter` `keypress` does not seem to get out of
  `editable-text` but `keydown` does.
- old handleKeyPress from itemBox is no longer relevant for most
  elements, so it is removed and substituted with a dedicated handler
  just for creator row.
- moved the creator's paste handler into its own dedicated function
  from the autocomplete handler (which was confusing)
- special handling for `enter` and `escape` events on `editable-text`
  with autocomplete to not stop event propagation, so that the events
  can bubble and be handled in `itemDetails`. It avoids some cases of
  the focus being lost and returned to the `window`. It was unnecessary
  earlier due to `escape_enter` workaround but only within itemBox and
  only within itemPane.
- removed explicit tab navigation handling from `collapsible-section`
  header. Currently, it may get stuck when buttons are hidden (e.g. in
  the trash mode). It was only added to enable keyboard navigation on
  mac before special "Keyboard navigation" setting was discovered (it
  was never an issue on windows), so now it's easier to just let mozilla
  handle it.
- always use `getTitleField` to find and focus the proper title field in
  itemBox
- on shift-tab from the focused tab, just move focus to the first
  focusable element before the splitter without any special handling for
  attachments, notes and duplicates pane as before. It ensures a more
  consistent and predictable keyboard navigation, especially now that
  itemPane is fairly keyboard accessible.

Fixes: #4076
2024-05-21 02:45:19 -04:00
Dan Stillman
1394381257 Include unixMode in OS.File.stat() shim 2024-05-21 01:56:38 -04:00
Dan Stillman
03be938444 Don't try to use Zotero.isWin in OS.File shim 2024-05-21 01:56:28 -04:00
Abe Jellinek
eed7acff08 Ignore sort keyboard shortcuts in non-library tabs
Fixes #4140
2024-05-20 10:34:13 -04:00
windingwind
7fa7cf310e Fix merge window (#4130)
- Fix render issues
- Fix merge pane min-width
- Use no-titlebar modal for merge window on MacOS
- Disable section collapsing in merge pane
- Disable section open state caching in merge pane

fix: #3611
2024-05-19 00:58:14 -04:00
windingwind
1f322cddb8 Fix eslint errors in mergeGroup.js 2024-05-19 00:55:10 -04:00
Dan Stillman
14c6d26f20 Clarify comment for numDistinctFileAttachmentsForLabel() test 2024-05-19 00:54:13 -04:00
Dan Stillman
47bf4de08a Add test for numDistinctFileAttachmentsForLabel() filter function 2024-05-19 00:52:36 -04:00
Abe Jellinek
90634fc5c8 numDistinctFileAttachmentsForLabel: Filter best attachment 2024-05-19 00:52:36 -04:00
Abe Jellinek
bc64f06352 Item pane header: Don't reserve space for scrollbar
https://github.com/zotero/zotero/issues/4129#issuecomment-2117158647
2024-05-17 11:38:35 -04:00
Abe Jellinek
f9dc083771 _paneHeader.scss -> _itemPaneHeader.scss
Match the CE name.
2024-05-17 11:37:57 -04:00
Dan Stillman
95d5a54174 Fix file-import breakage from 8e7d9927ef
https://forums.zotero.org/discussion/114465/zotero-7-bug-report-latest-beta-build-78-5be5ca941-broke-file-import
2024-05-17 10:05:35 -04:00
Sean Takats
a3b1558f00
Updated icon file with corrected shade of white (#4135) 2024-05-17 05:49:28 -04:00
Dan Stillman
cd0ec45dc8 Make all publicationTitle fields multi-line, not just bookTitle
For some reason applied only to Book Title in #890

https://forums.zotero.org/discussion/comment/463195/#Comment_463195
2024-05-17 05:27:40 -04:00
windingwind
126d12905b Revert menulist type=radio
Partially revert 5438247, 63012a8 because the menulist style is fixed by 4a0bb2d in SCSS
See also #4052
2024-05-17 17:23:22 +08:00
Abe Jellinek
f6ee160186 editable-text: Reset state after programmatic blur()
Regardless of whether the window is active.

Fully fixes #4101
2024-05-16 11:07:47 -04:00
Abe Jellinek
b4c5c5d539 Item pane header: Use focused getter instead of :focus-within
:focus-within doesn't match when the window is inactive but the field
is focused.

Addresses #4101, except that focusing the new item's title field and
pressing Escape will clear the field (without modifying the item).
2024-05-16 11:07:15 -04:00
Abe Jellinek
c7159a5fa6 Revert "Fix item type menuitem type attribute"
This reverts commit 6db62c6705.

Fixes #4106
2024-05-16 10:16:11 -04:00
Dan Stillman
5be5ca9416 Always return from numDistinctFileAttachmentsForLabel() once we're >1 2024-05-16 01:41:55 -04:00
Dan Stillman
834ee0ff6c Switch to separate localized strings for "Show File"/"Show Files"
https://github.com/zotero/zotero/pull/4124#issuecomment-2114036702
2024-05-16 01:41:17 -04:00
Abe Jellinek
1bf0fd7d57 Scaffold: Manage blank lines before test cases automatically 2024-05-15 12:42:00 -04:00
abaevbog
1e990f3ca0
vpat 42: link url label to input in scaffold (#4017) 2024-05-15 06:58:52 -04:00
windingwind
f1d8a1c289 Fix splitMenuButton dropdown icon 2024-05-15 06:45:10 -04:00
windingwind
bc47ee46c8 Fix item pane buttons after CEification
Fixes #4115
2024-05-15 06:45:10 -04:00
windingwind
9a23031c12 Rename ItemPaneHeader CE localName to item-pane-header
Closes #4114
2024-05-15 06:45:09 -04:00