Commit graph

9843 commits

Author SHA1 Message Date
Abe Jellinek
4d7c641f7b Libraries & Collections: Make all collections clickable in context pane
Fixes #4201
2024-06-04 11:14:10 -04:00
Abe Jellinek
5539bd50ce Remove redundant click handler code from FeedAbstract actor
Missed when committing 8eedfd4a14.
2024-06-04 10:55:14 -04:00
windingwind
a6076ce76c
Fix item pane header (#4159)
* Improve feed item pane header (fixes #4141)
* Show item pane custom head when headerMode is none (fixes #4116)
* fx115: Fix button style on windows (fixes #4120)
* Move split-menu-button styles to SCSS
2024-06-04 02:14:20 -04:00
Abe Jellinek
845f11b1da Remove nonfunctional style repo CSS modification code 2024-06-04 02:06:32 -04:00
Abe Jellinek
8eedfd4a14 basicViewer: Open links externally 2024-06-04 02:06:32 -04:00
windingwind
fab20327a5 Fix QF titlebar on wayland 2024-06-03 11:23:36 +03:00
Dan Stillman
b20926aa75 Update CSL locales
https://forums.zotero.org/discussion/comment/464380/#Comment_464380
2024-06-03 00:53:10 -04:00
windingwind
066eda7315
Fix collection tree renaming background color (#3829) 2024-05-31 07:16:05 -04:00
Tom Najdek
d6d9979f19
Fix dates not following configured locale. Resolve #3559 (#3880) 2024-05-31 06:58:14 -04:00
abaevbog
709281db02
vpat 56: added tooltip for quickFormat Z-menu (#4000)
It could be a simple aria-label but tooltip is more functional
2024-05-31 06:28:33 -04:00
abaevbog
c4dbf19446
vpat 23: better aria label for itembox merge btn (#4173)
Added the field name for the label to be more descriptive.
The new announced label is e.g. "Select version of title field".

Followup to https://github.com/zotero/zotero/pull/4096#issuecomment-2121894422
2024-05-30 01:44:49 -04:00
Abe Jellinek
6b4cac1fb5
Allow item pane sections to declare dependencies for rerender, fix Libraries and Collections not updating (#4155) 2024-05-30 01:44:11 -04:00
Dan Stillman
4a9ce6b82b Use correct URL for beta builds for Windows 32-bit-on-64-bit warning
For #4172
2024-05-29 07:05:15 -04:00
Tom Najdek
14a0a8ab24 Show banner to 32-bit Windows users to reinstall 64-bit version (#4172)
Resolves #3940
2024-05-29 07:03:57 -04:00
Dan Stillman
08ffa64abf Add Zotero.isBetaBuild and fix Zotero.isDevBuild
Previously `isDevBuild` was true for beta, dev, or source builds (but
also wasn't used anywhere)
2024-05-29 06:59:17 -04:00
windingwind
fe3dae2d15
Refactor AttachmentPreview render and discard (#4161) 2024-05-28 00:05:29 -04:00
abaevbog
c8cf38cdf1
fix itembox creator btns not hiding in view mode (#4169)
Fixes: #4166
2024-05-25 04:09:19 -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
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
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
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
Abe Jellinek
90634fc5c8 numDistinctFileAttachmentsForLabel: Filter best attachment 2024-05-19 00:52:36 -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
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
windingwind
1e3ebc082e Rename PaneHeader to ItemPaneHeader
Addresses #4114
2024-05-15 06:45:09 -04:00
windingwind
4fc8850f1e Skip item pane section render when not in selected tab 2024-05-15 06:45:09 -04:00