Commit graph

198 commits

Author SHA1 Message Date
Abe Jellinek
c6ad31ca0a Preload variants of item type SVG icons 2024-01-24 03:42:34 -05:00
Tom Najdek
c7286194f8 Convert theme to css variables
* Opt-in for light and dark color schemes
* Convert scss variables in _light.scss to css variables
* Add _dark.scss for dark color scheme
* Remove unused, theme-related variables
2024-01-24 03:42:29 -05:00
Tom Najdek
03d10f7de7 Switch to new svg icons for item types 2024-01-24 03:39:09 -05:00
Tom Najdek
61f9d65552 Add utils for css-based icons 2024-01-24 03:39:09 -05:00
Abe Jellinek
6cd44f19fe Fix more Z6/Z7 inconsistencies in Advanced Search
- 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
2023-08-24 11:14:59 -04:00
Dan Stillman
4b7a1e8607 Get rid of some console warnings
And some other unused CSS
2023-07-11 05:35:32 -04:00
Dan Stillman
4a8935eefd Guidance panel fixes
- Fix missing styling in Quick Format dialog
- Fix Book Section panel being immediately hidden
- Remove low-res Zotero icon
- Increase font size and tweak padding
2023-07-11 05:35:32 -04:00
Abe Jellinek
0a94e8fdf0
fx-compat: Make color picker CE accessible via keyboard and VoiceOver (#2933) 2023-06-17 02:43:24 -04:00
Abe Jellinek
b7626a1baa Remove min-width/height rules
Not actually necessary to get the sizing right in the dialog.
2023-06-17 02:33:59 -04:00
Abe Jellinek
c37e327330 Fix clicky sizing and appearance
- Set min-width and min-height to width and height so buttons never shrink
- Remove defunct .zotero-clicky-* styles from 2x block in zotero.css
- Include zotero-platform/content/zotero.css in searchDialog.xhtml
   - It seems only the defunct 2x styles from zotero.css were being applied, so
     the buttons would have been unstyled on a non-hiDPI display
2023-06-17 02:33:59 -04:00
Tom Najdek
a8c30362a1
Remove shadow root from PublicationsLicenseInfo #3082
* Fix legacy css path
 * Rename license-info.scss -> publicationsLicenseInfo.scss to match element name
2023-04-26 15:23:49 +02:00
Tom Najdek
842f474939
Remove shadow root from StyleConfigurator #3082
Also renamed style-configurator.scss -> styleConfigurator.scss
2023-04-26 15:23:49 +02:00
Abe Jellinek
fdcb12df92
Tab bar: Make bottom border span the whole window (#3066) 2023-04-08 18:19:46 -04:00
Dan Stillman
a6a69605c6
Mendeley citation relinking tweaks
- Show "More information" link next to relink option
- Automatically check relink option when coming from integration prompt
- Change done message to "[x] items were relinked" instead of "0 items
  were imported"
2023-04-06 17:10:13 +02:00
Tom Najdek
197d8d1f3b
Add option to Mendeley importer to relink items
New option only appears if importer version is < 1 or not present.
It will:
    * Skip fetching collections and attachments
    * Skip any new items
    * Update relations on existing items
2023-04-06 17:10:12 +02:00
Tom Najdek
4b523555d6
Mendeley Import: Auth using direct login
* Importer will now ask user for a login and password via form and will
  perform sign-in directly using credentials rather than oauth
* Signing in this way enables importer to obtain desktop document ID
  which is now stored for each item
* It's possible to switch back to the old method (ouath) by setting
  `import.mendeleyUseOAuth` pref to `true`.
* New option to only import new items. This options only appears if
  database contains previously imported items.
* Importer will now update mendeleyDB:documentUUID on existing items to
  match value used in Mendeley Desktop if available
* Importer will no longer create collections when no new items are
  imported * Importer will only report number of new items imported on
  re-import * Importer will now preserve dateAdded on re-import

Co-authored-by: Dan Stillman <dstillman@zotero.org>
2023-04-06 17:10:12 +02:00
Adomas Venčkauskas
05e9523cba fx102: Fix linux styling. Closes #3052 2023-04-06 09:46:27 +03:00
Abe Jellinek
4060acae41
fx-compat: Item box: Use custom text field styles on Windows (#3060) 2023-04-06 02:04:13 -04:00
Abe Jellinek
5d44089214 fx-compat: Fix some CE style conflicts
- Windows global styles make .header bold, so we'll override them
- Prefix IDs in <notes-box>
- Give <tags-box> Add button a normal margin
  - I think the CSS this removes was meant to apply to tags in the list, not the
    Add button, but that's handled elsewhere now
2023-04-05 12:39:32 -04:00
Abe Jellinek
4af158bf56 fx-compat: Item box: More padding tweaks
- Add same padding to item type menu as we have on field value labels
- Make comma flush with last name and slightly closer to first name
2023-04-04 15:08:07 -04:00
Abe Jellinek
da80ae1f89 fx-compat: Item box: Re-add padding on value labels 2023-04-04 14:40:03 -04:00
Abe Jellinek
aea1303119 fx-compat: Item box: Fix field sizing on all platforms
Layout should no longer shift when editing creators or fields.
(Linux untested.)
2023-04-04 14:39:57 -04:00
Abe Jellinek
94c5717052 fx-compat: Add missing element selectors to platform SCSS
Follow-up to 6b819e259c: fixes element-specific
selectors mistakenly being applied globally, and some selectors not having the
intended effect because of lower specificity.
2023-04-03 16:38:31 -04:00
Adomas Ven
6b819e259c
fx102: Cleans up scss files, removes shadow DOM use from CEs (#3051)
Removes a huge amount of excessive files and duplication for CE scss.
All CE css is now output in the single
zotero-react-client.css file.

Moving all CE styling into a single stylesheet required removing their
shadow DOMs. It is desirable anyway, since you want to
be able to style CEs from "outside", when embedding in different
contexts.

Shadow removal required some CE code changes to maintain
functionality.

Elements refactored:
- attachment-box (displayed when an attachment (like PDF) is selected in
the item tree)
- color-picker (in the tag color selector)
- guidance-panel (displayed on first run when editing authors for a book
section)
- item-box (info tab in the item pane)
- note-editor
- notes-box (note tab in the item pane)
- quick-search-textbox
- related-box (related tab in the item pane)
- tags-box (tags tab in the item pane)
- zoterosearch (advanced search condition builder form)
2023-04-01 01:37:55 -04:00
Tom Najdek
fc572ba2a6
fx-compat: Convert Publications dialog to CE 2023-03-23 14:16:51 +01:00
Tom Najdek
c65e8f1621
fx-compat: Convert rtfScan to use CE wizards
Also:
* Adds Style Configurator CE
* Extends "base" CE to enable fluent l10n
2023-03-23 14:16:51 +01:00
Tom Najdek
5ea43bd65c
fx-compat: Convert import wizard to use CE 2023-03-21 20:42:43 +01:00
Tom Najdek
13cc393840
fx-compat: long tag fixer (#2649)
* Manual tag splitting from tag selector
* Only apply split to the tag in current library
* Preserve tag type
2023-03-16 21:20:11 -04:00
Abe Jellinek
4b09edfa42
fx-compat: Add color picker CE (#2682) 2022-11-21 02:48:16 -05:00
Abe Jellinek
74492e40c4
Improve bidi & RTL support (#2415)
- Render cell text in its native direction
- Fix context menu positioning
- Fix item box (localizations needed)
- Fix column resizing
- Fix bidi text in collection tree
- Always right-align in RTL, always left-align in LTR.
  I'm going off advice from this excellent guide for RTL website design
  by Ahmad Shadeed: https://rtlstyling.com/posts/rtl-styling#tables
- Join creators in the tree ("Smith and Jones") using a format string to
  support languages like Arabic and Hebrew where there shouldn't be a
  space after the "and".
- Fix tabs
- Fix toolbar on Mac, flip icons on other platforms
2022-11-20 18:23:17 -05:00
Adomas Ven
aa1aac6adb
fx-compat: Restore word processor integration (#2841)
- Word for Windows not tested since there's no build yet
- Word for Mac currently causes a sigsev, and likely we'll see this on
windows too. This is happening on an API call where we pass a callback,
so likely an issue in ctypes that we'll have to work around.
- All integration UIs restored.
- Added a component for richlistitems with a checkbox with corresponding
interactions (spacebar/double-click to toggle).
2022-10-06 00:17:28 -04:00
Abe Jellinek
b646073dfa fx-compat: Fix style clash on disabled Export checkbox 2022-08-27 22:33:45 -04:00
Abe Jellinek
9ab813ebdc fx-compat: Item box: Vertically center field contents
Fixes alignment of the "y m d" label on the date field and the buttons to the
right of creator fields.
2022-08-11 16:46:03 -04:00
Abe Jellinek
1315d02b2c fx-compat: Item box: Correct value margins, remove type dropmarker 2022-08-05 16:12:28 -04:00
Abe Jellinek
d4cd382092 fx-compat: Fix quick search height shifting 2022-08-01 15:36:06 -04:00
Abe Jellinek
1ecb12048c fx-compat: Item box: Restore label top alignment 2022-08-01 14:20:34 -04:00
Abe Jellinek
dc0b2ceb8b fx-compat: Item box: Make sure input has room 2022-07-21 16:18:32 -04:00
Abe Jellinek
808375d5e3 fx-compat: Item box: Fix creator name field sizing
Not the exact same sizing as Fx60, because that relied on some quirks
of the Mozilla box model that I can't reproduce with flexbox, but still
works about as well.
2022-07-21 16:12:28 -04:00
Abe Jellinek
37a6cc4de4 fx-compat: Item box: Fix date added/modified alignment
This CSS needs some serious cleanup, but we're getting somewhere.
2022-07-21 11:30:35 -04:00
Abe Jellinek
aeef51bc76 fx-compat: Item box: Clean up spacing 2022-07-21 11:17:31 -04:00
Abe Jellinek
1a8057aba1 fx-compat: Item box: Restore drop marker 2022-07-21 10:20:42 -04:00
Abe Jellinek
26a2398399 fx-compat: Restore guidance panels as CE
Fixes #2711.
2022-07-20 11:12:52 -04:00
Tom Najdek
ea67ccc81a
fx-compat: Fix missing icon in tag selector #2679 (#2694) 2022-07-08 04:01:24 -04:00
Abe Jellinek
9a8e78aaf4
fx-compat: Restore quick search menu and update styles (#2684) 2022-07-06 23:42:23 -04:00
Abe Jellinek
137c82c690 fx-compat: Make item table container vertical
Fixes retraction notice appearing to the left of the item metadata.
2022-07-05 15:40:33 -04:00
Abe Jellinek
8face792c0
fx-compat: Fix search dialogs (#2631) 2022-07-04 01:48:52 -04:00
Abe Jellinek
d2dbf959b6 fx-compat: Restore old row highlight color on macOS
https://github.com/zotero/zotero/pull/2660#issuecomment-1159384470
2022-06-18 17:50:52 -05:00
Abe Jellinek
c31df4ae6b fx-compat: Display item box using CSS grid
- Widths are now correct
- Rows are a little too tall
- Field value vertical alignment is off
- Platform styling isn't done and some styles might be redundant
- Still can't scroll vertically
- Creator name inputs still displayed wrong
2022-06-16 16:27:16 -05:00
Abe Jellinek
7dd60abb11 fx-compat: Exclude menulist from clicky :active styling
Menulists only get :active for the split second when they're clicked but
the menupopup hasn't yet been shown.
2022-06-10 11:41:04 -05:00
Martynas Bagdonas
3eb65eef4f fx-compat: Fix tab text alignment 2022-06-09 16:41:24 +03:00
Martynas Bagdonas
2e5388af5b fx-compat: Implement tagsBox element 2022-06-07 17:13:48 +03:00
Abe Jellinek
496f34117c fx-compat: Fix attachment rename, remove <links-box> observer
<links-box> doesn't actually have a notify() method, so an error was
being thrown on each notification.
2022-05-27 13:28:07 -06:00
Abe Jellinek
1ef40d9423 fx-compat: Fix attachment box 2022-05-27 12:56:13 -06:00
Martynas Bagdonas
307701788f fx-compat: Fix and extract notesBox into a separate element 2022-05-27 13:21:18 +03:00
Abe Jellinek
ed572df563 fx-compat: 2xize clicky 2022-05-26 12:38:42 -06:00
Martynas Bagdonas
db0ac723fa fx-compat: Note editor and links box fixes:
- Add links-box component (inside noteEditor.js).
- Add related-box component and fix related pane.
- Use tagsBox.jsx instead of tagsbox.xml in note editor links box popup.
- Remove CSS styles and bindings for noteeditor, relatedbox and tagsbox.
2022-05-26 18:23:31 +03:00
Abe Jellinek
27e5e3ca29 fx-compat: Item box: Visual fixes
- Override normal cursor on Abstract label
- Disable textarea resize
- Show clicky hover/active backgrounds on Item Type menu
2022-05-25 13:34:57 -06:00
Abe Jellinek
fdd73d4ada fx-compat: Item box: Fix multiline fields & autocomplete 2022-05-24 15:42:54 -06:00
Dan Stillman
c82af749ac Don't force Lucida Grande in various components on macOS 2022-05-13 04:28:56 -04:00
Dan Stillman
260c110d05 fx-compat: Convert itembox XBL to custom element
Still lots of things to fix, particularly with styling, but the basic
functionality is there.
2022-05-13 04:28:56 -04:00
Dan Stillman
3c6f0b26af Move .zotero-clicky to its own SCSS component
This will allow it to be included in shadow DOM.
2022-05-12 05:18:47 -04:00
Adomas Ven
c49a05d486
Improve column resizing robustness (#2588)
Also:

* Add staticWidth and minWidth column properties
2022-05-03 03:00:23 -04:00
Martynas Bagdonas
01645c5e51
Pin library tab (#2589)
Fixes #2575
2022-05-03 01:21:59 -04:00
Martynas Bagdonas
c1fde1d3d9 Improve tab title visibility and adjust scroll arrow scroll step
Fixes #2554
Fixes #2553
2022-04-22 13:07:18 +07:00
Martynas Bagdonas
5d442b706e
Make tab bar scrollable (#2506)
Fixes #2232
2022-04-19 18:51:32 -04:00
Adomas Venčkauskas
01506b27e9 Allow moving cursor by clicking on collection name while editing
Closes #2513
2022-04-14 17:03:54 +03:00
Adomas Ven
4c445554a3
Item Tree: Attempt to fix OS font scaling (#2488) 2022-04-11 05:16:59 -04:00
Adomas Venčkauskas
eab63acab3 Item Tree: Fix twisty colours on macOS. Closes #2446 2022-03-22 13:57:44 +02:00
Adomas Venčkauskas
7182531ec9 HTML Tree: Improve Linux GTK styling (for dark theme support)
Closes #2424
2022-03-18 11:48:14 +02:00
Adomas Venčkauskas
3b8c16c155 Adjust HTML Tree styling on Windows. Closes #2393 2022-03-14 14:58:22 +02:00
Adomas Venčkauskas
8e2790e2d2 Temporarily disable tooltip display for truncated cells (8de1ddc)
Closes #2392, reopens #2321
2022-03-14 14:57:59 +02:00
Adomas Venčkauskas
12cd201b48 HTML Tree: Multi-selection fixes
- Clarification between focused row and pivot:
  - Pivot is only the row from which shift-selection pivots
  - Focused row is the one with the border around it
- Fixed an issue where clicking the focused row didn't select it.
  Closes #2402
- Allows to create a non-contiguous range-selection with ctrl/cmd+shift.
  Closes #2403
2022-03-14 14:57:59 +02:00
Martynas Bagdonas
c7972b3d38
Improve keyboard navigation in PDF reader tab (#2395) 2022-03-12 02:22:13 -05:00
Adomas Ven
b38d7107d8
HTML Tree: Add a dotted border to pivot rows (#2375) 2022-03-02 05:41:59 -05:00
Adomas Venčkauskas
8de1ddcaf4 HTML Tree: Display a tooltip with full cell contents when truncated
Closes #2321

Also added tooltips for cells that use an icon in their contents
2022-02-03 16:09:40 +02:00
Dan Stillman
5e1504f33b Don't show ellipsis in Attachments column
Was showing next to the new PDF icons after af622da78
2021-12-23 01:15:22 -05:00
Adomas Venčkauskas
af622da78f HTML Tree: fix columns not being vertically aligned. Closes #2286 2021-12-22 13:37:27 +02:00
Dan Stillman
b0ba7e4646 Show small PDF icon in Attachments column when there's a PDF
Closes #2265

There's also new code for showing a different icon for snapshots, files,
and DOI/URL links, like the web library and iOS app, but it's commented
out for now. The bitmap icons create too much visual noise with the
greater information density and hierarchical tree of the desktop app
(not to mention many more low-DPI displays). We can revisit after
switching to SVGs across the board.
2021-12-22 03:38:12 -05:00
Lingfeng Zhang
b2ad6c8a41
Fix autosuggestion background color in dark mode (#2276) 2021-12-20 00:17:57 -05:00
Dan Stillman
57c9da6df3 Spaces → tabs in _item-tree.scss 2021-09-17 06:11:51 -04:00
Martynas Bagdonas
61e3e339bb Restore tags and related tabs, display note links box 2021-09-14 01:50:58 -04:00
Adomas Venčkauskas
6c5e35ad73 HTML tree: multi-line cell text overflowing. Closes #2171 2021-08-30 12:55:20 +03:00
Martynas Bagdonas
89d1899690 Add UI feedback when moving tab
Fixes #1988
2021-08-26 08:23:19 +03:00
Adomas Venčkauskas
3ca236f057 Fix sort chevron overlapping column label. Closes #2154 2021-08-25 18:24:35 +03:00
Adomas Venčkauskas
6010390525 HTML Tree: Fix column separators misaligned at startup. Closes #2153 2021-08-24 16:44:55 +03:00
Dan Stillman
f9035c8fda Show emoji colored tags directly in items list
We can do fun things now.

Also:

- Make colored tag swatches resize with the font size
- Increase border radius for color swatches, and adjust with size
2021-08-22 04:41:34 -04:00
Dan Stillman
102dac58f8 Reduce tree header height
The previous height is close to what macOS does, but it's a bit much.
2021-08-21 06:58:12 -04:00
Adomas Venčkauskas
deaeb46ae8 Increase Linux twisty size 2021-08-21 06:58:12 -04:00
Adomas Venčkauskas
55c758c9d0 Fix header columns being misaligned with table columns in item tree
And reindent _virtualized-table.scss
2021-08-21 06:58:12 -04:00
Adomas Venčkauskas
efc009f724 Fix collection tree header alignment on macOS 2021-08-21 06:58:12 -04:00
Adomas Venčkauskas
36ed9d302b Make item tree header height adjust based on font size 2021-08-21 06:58:12 -04:00
Adomas Venčkauskas
b671611b51 Fix item tree message not being centered outside of main window 2021-08-21 06:58:12 -04:00
Adomas Venčkauskas
47094fc4c3 Misc new tree cleanup 2021-08-21 06:58:12 -04:00
Adomas Venčkauskas
cbbff600a6 XUL -> JS tree megacommit
- Just a single huge commit. This has been developed over too long a
time, required many tiny changes across too many files and has seen too
many iterations to be separated into separate commits.
The original branch with all the messy commits will be kept around for
posterity
bb220ad0f2...adomasven:feature/react-item-tree
- Replaces XUL <tree> element across the whole zotero client codebase
with a custom supermegafast virtualized-table inspired by
react-virtualized yet mimicking old XUL treeview API. The
virtualized-table sits on top on a raw-to-the-metal,
interpreted-at-runtime JS based windowing solution inspired by
react-window. React-based solutions could not be used because they were
slow and Zotero UI needs to be responsive and be able to
display thousands of rows in a treeview without any slowdowns.
- Attempts were made at making this screen-reader friendly, but yet to
be tested with something like JAWS
- RTL-friendly
- Styling and behaviour across all platforms was copied as closely as
possible to the original XUL tree
- Instead of row-based scroll snapping this has smooth-scrolling. If
you're using arrow keys to browse through the tree then it effectively
snap-scrolls. Current CSS snap scroll attributes do not seem to work in
the way we would require even on up-to-date browsers, yet alone the ESR
version of FX that Zotero is on. JS solutions are either terrible for
performance or produce inexcusable jitter.
- When dragging-and-dropping items the initial drag freezes the UI for
a fairly jarring amount of time. Does not seem to be fixable due to
the synchronous code that needs to be run in the dragstart handler.
Used to be possible to run that code async with the XUL tree.
- Item tree column picker no longer has a dedicated button. Just
right-click the columns. The column preferences (width, order, etc) are
no longer handled by XUL, which required a custom serialization and
storage solution that throws warnings in the developer console due to
the amount of data being stored. Might cause temporary freezing on HDDs
upon column resize/reorder/visibility toggling.
- Context menu handling code basically unchanged, but any UI changes
that plugins may have wanted to do (including adding new columns) will
have to be redone by them. No serious thought has gone into how plugin
developers would achieve that yet.
- Opens up the possibility for awesome alternative ways to render the
tree items, including things like multiple-row view for the item tree,
which has been requested for a long while especially by users switching
from other referencing software
2021-08-21 06:58:12 -04:00
Dan Stillman
a6172ff9e8 Use Lucida in $font-family-base SCSS variable (currently unused) 2021-06-23 21:56:11 -04:00
Dan Stillman
9a7016ad64 Spell checker improvements
- Add/Remove Dictionaries window
- Better account for the (unlikely) possibility that a dictionary could
  be replaced by another more popular dictionary provided by a different
  extension id (tested)
- Better account for the (very unlikely) possibility that an extension
  could bundle multiple dictionaries (untested)
- Use toolkit version comparator for proper extension version
  comparisons
- Localize strings
- Add tests for updating
2021-06-23 21:56:11 -04:00
Martynas Bagdonas
a5fe49b866 Remove sync buttons from PDF reader toolbar
Fixes #2045
2021-06-02 20:39:44 +03:00
Martynas Bagdonas
a418d5ae8d Fix RTL mode in pdf-reader, note-editor, contextPane 2021-06-01 11:37:07 +03:00
J. Ryan Stinnett
3424f456f3 Fix import syntax to resolve SCSS build error
This adds a missing semicolon to the SCSS import, which resolves a build error
introduced by e7f93cb548.
2021-05-17 16:48:49 +01:00
Dan Stillman
e7f93cb548 Fix appearance of error report text in dark mode on Linux
Closes #2021
2021-05-16 05:08:44 -04:00