New icons and new scaffold.scss go into chrome://zotero/skin. The separate root
for Scaffold is mostly a historical relic, and adding special cases to build
scripts, SCSS mixins, and so on would just make things complicated.
While looking for the first matching row to select, stop looking
and move focus to the tree only after the selection succeeded.
Some matching rows, like groups header, are not selectable. If it's the
first matching row, it will now be skipped.
- Actually show un-deleted rows as context rows within trash
- Add all rows, hide ones that shouldn't be shown
- Check whether attachment is file before calling getAnnotations()
- Fixes errors on update and new link attachments being shown as empty rows
In d4f8c7c an entry has been removed from zotero.properties that is still being
used in items table. If `numNotes` column is visible, items table would not
render.
Instead of re-adding to zotero.properties, I've migrated this string to
zotero.ftl to fix this problem.
* Render a colored dot for colored tags
* Improve spacing and positioning, especially on 2x screens
* Add scss map for tag colors in light/dark scheme
* Add support for compact/comfortable in tag selector
* Restyle filter box, add a placeholder and a new icon
1. Swap focus direction for ArrowUp and ArrowDown events when applicable.
ArrowUp = Shift-Tab, ArrowDown - Tab.
2. Remove ArrowLeft, ArrowRight event listeners from quicksearch menus
to not prevent cursor navigation within the actual text field.
3. Tweaks to fix advanced search mode from quicksearch when " is typed.
.icon-item-type is now global, with extra styling to handle row selection when
it's inside the item tree.
getImageSrc() is still used for progress windows, which is probably OK for now
because those don't stay on screen for very long. I've updated it to return SVGs
based on the current UI color scheme.
Other code uses treeitem-* images directly; getting rid of those references will
cause a lot of conflicts and be a bit more involved than this initial pass, so
I'll put that in a separate PR.
1. Toolbarbuttons changes:
1. “New Library” moved from toolbar to File menu
2. “New note” on click makes a standalone note
3. “New attachment” on click adds stored copy of a file
4. Menuitems from old note or attachment menus moved to the File menu
5. “Advanced search” removed. Sync and Locate buttons moved to the top-right corner (Locate - temporarily)
6. Added “Opened tabs” toolbarbutton
7. Updated tooltips
2. Added a toolbarbutton that reveals collection search field on click. Search field is hidden on blur if empty. Keyboard accessibility via tab/shift-tab.
3. Tab based navigation restructuring. For each component, create a mapping of target ids with desired focus destination for each relevant keyboard event and use that to determine where to move focus next. Fixed bugs with focus wraparound not working when a note or attachment is opened in contextMenu.
4. Make quick-search dropmarker a sibling of the textfield. QuickSearchTextbox does not extend search-textfield anymore. It serves as a container to house dropmarker and textfield as siblings. This is needed to remove focus ring from quick search textbook when focus moves onto the dropmarker.
5. Separate toolbars for item and collection trees. Removed unused code manually setting the width of toolbar section
6. Focusable tabs + keyboard navigation:
1. Shift-tab from opened tabs menu moves focus to the currently opened tab
2. When a tab has focus, use left/right arrows to select tabs, or CMD/Ctrl + arrows to move focus between tabs
3. Enter or Space on a focused tab will select it if needed and move focus to the contentPane of the reader of this tab
4. Shift-tab from tabs wraps focus around to itemTree or itemPane
7. “New collection” creates collection contextually within currently selected library or collection.
8. Items pane minimum width increase to avoid quicksearch from being squashed
9. Do not move focus to title field of itemBox after itemTypeMenu is closed with ESC.
10. Display all itemTypes without "Show more" submenu in "New Item" meunu. Removed "Store Copy of File" and "Link to File" from "New Item" menu.
- new icons
- new twisty (also for items tree)
- new mixin focus-states that can be re-used for less boilerplate
- dark/white compatible with tweaks for when tree is focused (these changes also affect items tree)
- removed macOS specific behaviour (blue-ish background, gradient for selected row)
- border-radius on highlight + spacing tweaks
- tweaked colors and fonts
- Support for "compact"/"comfortable"
This new XPCOM module handles font size and UI density and automatically keeps
registered roots up to date when prefs change. Roots receive a
UIPropertiesChanged event after their properties are updated.
- Sort the Open Documents section by reverse-open order and further by
reverse tab order (if unopened in this session).
- If Library is selected in the Zotero window, automatically show and
filter at the top selected items
- Currently enabled only for ScienceDirect. Can be enabled via a whitelist
- Matches the HiddenBrowser loaded HTML page for a captcha element. If
the captcha element class changes, this will break (but the
alternative is potentially displaying a captcha clearing window when
something else that is not a captcha guard is loaded).
- Captcha clear timeout for 60s.
- Doesn't automatically switch focus back to the browser which intiated
the item save via the Connector.
- Stores the cookies used to clear the captcha for future saves from the
same domain. Discards Connector supplied User Agent, since CF bot
detector checks UA header against actual UA behavior like TLS handshake
and if the UA acts different to what it's supposed to, the bot
challenge is not cleared.
Other changes:
- Adjusted the cookie sandbox to allow multiple cookie sandboxes to be
active (and simplified some legacy code that was meant to cover a bug
in old FX codebase).
- HiddenBrowser API changed to be Object oriented, translator tester
in the translate repo will need to be updated after a merge (have the
change ready).
- Improved Connector Server attachment progress handling
This is needed to let itemBox, tagBox, etc. to handle ESC
events to revent any edits made to textfields. Only applied
if the currently focused element is input or textarea.
Fixes: #3246
1. Trigger ZoteroPane.handleBlur on focusout instead of blur
to remove highlight when itemTree entries loose focus
even if ctrl/alt is still being held.
2. Prevent default event on Alt click on linux to avoid moving
focus to menubar
3. Avoid re-triggering focus multiple times
when ctrl is being held on windows to prevent highlight from becoming
stuck and not going away.
Fixes: zotero#3410
- The underlying changes are in windowed-list, which the item tree and
all virtualized tables are based on, so if there are bugs they might
show up outside of the collection tree.
- The expensive operation is adding/removing rows, since row offsets
have to be recalculated (this includes collapsing/expanding rows).
- The cost on further drawing while scrolling is constant and shouldn't
affect performance much.
Without the /u (Unicode) flag, [\ud800-\udfff] matches *all* surrogate pair code
points, even when they're in a valid position in the string.
Fixes#3421
Some pages (notably the first DOI.js test case) never get to "complete". I don't
know why! But for practically all translators that don't use defer: true,
"interactive" is ready enough.
Amends 30c70a6ecd.
On some machines, the callback added in that change would never actually run, so
memory usage would grow quickly when switching between tabs. By wrapping in
setTimeout() instead of requestIdleCallback(), we keep the performance gains
from removing once the element is no longer visible (so we can avoid repaints,
rebuilding the layout tree, etc.), but we make sure that the callback gets
called nearly immediately.
#3321
It's now possible to tab through the panes and the buttons, and
left/right-arrow also change the selection, so you can use Left/Right +
Return to move through multiple conflicts.
Fixes#3395
In Z7 on Windows 10 (but not 11 for me), nsIZipReader doesn't properly
close the file after `findEntries()` is called (as discovered by
@abaevbog), so a `remove()` on the downloaded ZIP file during file
syncing triggers an access-denied error. Setting the zip-reader variable
to null and forcing garbage collection seems to fix it. Doing this
everywhere we use nsIZipReader just to be safe.
I found the `forceGC()` in only one test file in fx102, but setting the
reader to null is done more widely, so maybe they just don't try to
delete ZIP files before GC happens and manage to avoid this bug.
Fixes#3369
Prevents flashes of unlocalized labels and controls without values set.
Makes switching panes feel speedier overall because of preloading.
I thought there was an issue for the flashes of uninitialized content but can't
find it now.
- Prevent row height from changing when switching between text input conditions
and menulist conditions
- Replace some of (far from all of) the XUL layout with flexbox
- Restore groupbox appearance
- A little retro? We probably want some kind of border like we used to have
- Replace some duplicate IDs with classes for styling
Improves EPUB close performance.
By wrapping with requestIdleCallback(), we ensure:
1. remove() won't be called right away, so the DOM elements being removed
won't be visible and won't trigger a relayout.
2. remove() won't be called while there are pending UI events, so it
shouldn't cause the UI to hang/lag/stutter.
Combined, these two improvements make the UI hang when closing a large EPUB
mostly imperceptible on my machine.
Addresses #3321; doesn't completely fix it because there's likely more to be
done on the reader side to optimize the DOM.
Fixes various logic around what gets selected when collections and
searches are moved to or restored from the trash (which has never been
exposed) or when they're erased
- Move open-in prefs into reader prefs
- Move reader prefs up below File Handling
- Move new strings to Fluent
- Fix clicking on labels to focus open-in drop-downs
- Tweak text
- Need to set width/height for macOS native menu
- CSS named grays are too light to show well on the background, so use #555
- type="checkbox" menuitems don't show their icons, so use the icon stroke
instead
- Move file-renaming prefs to separate prefs section
- Fix template preview not updating on paste
- Update documentation URL
- Tweak text, styling, and ids
- Change "Automatically rename attachment files using parent metadata"
to "Automatically rename locally added files" to reflect that
downloaded files are always renamed, and add an intro saying so
Now that Scaffold remembers and automatically loads the last edited translator
(65048fd624), it needs to be easier to create a
new translator without saving (and bumping the lastModified date on) the
translator you had open.
And actually return -1 if it returns false.
Before this fix, attempting to rename an attachment file to a name that already
exists on disk would never return -1 as the docs say it should. Instead:
1. rename() would fail and return false
2. newName would be set to false
3. renameAttachmentFile() would pass false as the second argument to
OS.Path.join()
4. OS.Path.join() would ignore it because it was falsy and return the attachment
directory path without any modification
5. relinkAttachmentFile() would be called with path set to the attachment
directory
6. relinkAttachmentFile() would notice that path's dirname wasn't the attachment
directory - it was the attachment directory's parent - and attempt to copy it
and its contents, recursively, into itself, using copyToFollowingLinks()
...which created a directory structure on disk over 100 directories deep -
not deeper only because the OS started returning errors due to paths exceeding
32,767 characters (the limit on my filesystem).
Passing unformatted = true to Item#getField() now returns a bidi control
character-less result, and we use that in Reader#updateTitle() and
getFileBaseNameFromItem() to prevent bidi control characters from showing up in
filenames and window titles (the former everywhere, the latter on Windows only).
We also strip bidi control characters in getValidFileName() to be extra safe.