Commit graph

56 commits

Author SHA1 Message Date
windingwind
23da0d70b0
Implement Windows redesign for native elements (#3727) 2024-03-02 02:51:55 -05:00
Adomas Venčkauskas
beb7b51cb3 Adjust the titlebar/menubar xml and styling.
Reasoning:
- Different Linux DEs specify different titlebar button (min, max,
close) locations which we did not and could not support before.
- Previous approach copied from Firefox depended on custom offsets
specified in CSS instead of allowing the browser engine to place
elements

Changes:
- Titlebar and menubar no longer collapsed into each other with a
negative margin, instead just a single flexbox (on macOS the titlebar
is still collapsed into the tab bar)
- Support for -moz-gtk-csd-reversed-placement to correctly place the
titlebar buttons on Linux
- Removed/changed some code copied from Firefox that does not apply or
uses the wrong selectors
- Fixed the display of Linux Unity DE buttons with icons appearing outside
of button borders
- Removed the Z in the titlebar on Linux since only a few DEs use that.
- Aligned the tabbar on Linux and Windows to the left margin of the
window.
2024-02-14 06:24:00 -05:00
windingwind
6af4605bd0 Implement attachment preview
- Implement attachment preview
- Implement attachment-box redesign
- Make filename editable
- Use new reindex icon
- Update attachment note layout
- Fix reader.js eslint errors
- Add fallback attachment icon and use redesign
- Use attachment preview for regular items
- Fix pinned pane not exists error
- Double click preview to open to page
- Fix itemPane pin bug
- Preload preview iframe
- Fix item pane scroll
- Add media preview support
- Fix item pane scroll bar on macos
- Fix reader sidebar with standalone attachment
- Fix attributeChangedCallback
- Add attachmentBox _updateAttachmentIDs
- Make attachment notes readonly and simplify note window script
- Implement convert attachment note to new note
- Support preview dragging
- Annotations box redesign
- Support custom buttons in the collapsible-section
- Add preview toggle button
- Fix collapsible section attribute listener
- Make attachment box notify sync to fix errors in test
2024-01-24 23:32:15 -05:00
yexingsha
d06ad5c14a update toolbar, tabbar, and paneheader 2024-01-24 23:32:14 -05:00
windingwind
cae1bf3ab0 Fix macos tab bar safe-area-start when maximized 2024-01-24 23:32:11 -05:00
windingwind
af97b3e66f Fix macos tab bar safe-area-start when fullscreen 2024-01-24 23:32:11 -05:00
Bogdan Abaev
13de06cd52 itemBox redesign
- Table structure rewrite to use grid layout instead
of the <table> component so that screen readers can see the content
- Added icons to mirror right-click actions
- Moved creator actions to the options menu
- Drag-drop to reorder creators
- Using editable-text instead of clicky component
- Consolidated autocomplete logic in one function
- Added @focus-ring to all components of the itemBox
- Fields are focusable and navigatable via keyboard in non-edit modes
- General refactoring to consolidate stylesheets across platforms
and remove code that's not more used (mainly related to handling old
clicky text component).
- Retractions panel background set for --material-background instead
of light pink in dark mode.
2024-01-24 23:31:52 -05:00
windingwind
a3dec4be45 Fix Scaffold for redesign 2024-01-24 23:31:51 -05:00
windingwind
f9a2f2f3e0 Fix Linux UI bugs 2024-01-24 23:31:51 -05:00
windingwind
91ec79401d Add window inactive opacity to toolbar and tabs 2024-01-24 23:31:50 -05:00
windingwind
8b5047f992 Decrease opacity of tab's background when window is inactive 2024-01-24 23:31:50 -05:00
Abe Jellinek
55415607bb Fix partially unstyled menuitem showing when moving between items 2024-01-24 23:31:50 -05:00
windingwind
a8016b1b2f Fix MacOS non-native checkbox menu options should be indented even if no checkbox 2024-01-24 23:31:46 -05:00
windingwind
df0c2e2fd2 Toolbar redesign 2024-01-24 04:03:36 -05:00
Tom Najdek
bd067df4f6 Tabs redesign 2024-01-24 04:03:36 -05:00
windingwind
82a9aee21c Unify item tree & v-table style on Windows & Linux 2024-01-24 04:03:13 -05:00
Tom Najdek
374b5337d8 Items table redesign 2024-01-24 04:03:13 -05:00
windingwind
7da00957ef Unify tab bar on Windows/Linux 2024-01-24 04:03:12 -05:00
Tom Najdek
9ff76d2dd9 Restyle Tag Selector
* 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
2024-01-24 04:03:12 -05:00
abaevbog
200e1d7564 toolbar and keyboard navigation updates
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.
2024-01-24 03:42:42 -05:00
Tom Najdek
3f91729141 collections tree redesign
- 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"
2024-01-24 03:42:42 -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
Abe Jellinek
fdcb12df92
Tab bar: Make bottom border span the whole window (#3066) 2023-04-08 18:19:46 -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
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
Abe Jellinek
1ecb12048c fx-compat: Item box: Restore label top alignment 2022-08-01 14:20:34 -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
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
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
1ef40d9423 fx-compat: Fix attachment box 2022-05-27 12:56:13 -06: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
Martynas Bagdonas
5d442b706e
Make tab bar scrollable (#2506)
Fixes #2232
2022-04-19 18:51:32 -04: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
af622da78f HTML Tree: fix columns not being vertically aligned. Closes #2286 2021-12-22 13:37:27 +02:00
Adomas Venčkauskas
efc009f724 Fix collection tree header alignment on macOS 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
Martynas Bagdonas
783f9c50d5 Tab bar: Fix tabs on Windows & Linux 2021-03-02 17:40:24 -05:00
Dan Stillman
edd4f27e09 Tab bar: Fix specificity of background on macOS but leave disabled
We may want the vibrancy mode on Big Sur along with some other changes,
but for now let's leave it off.
2021-03-02 17:40:24 -05:00
Dan Stillman
e99f76b40c Tab bar: Update styling on macOS 2021-03-02 17:40:24 -05:00
Dan Stillman
9afd509704 Tab bar: Rename _tabsBar.scss to _tabBar.scss 2021-03-02 17:40:23 -05:00
Dan Stillman
875e9f674f Initial tab bar implementation 2021-03-02 17:39:37 -05:00
fletcherhaz
86b77cc45e
Add an option to create parent item from identifier (#1901) 2020-11-20 16:17:48 -05:00
Dan Stillman
24a3a38c51 Fix tags box editable font and alignment on Windows and Linux 2019-11-12 02:06:09 -05:00
Dan Stillman
e2163a88c3 Fix gray tag selector background color on Linux/Windows
8337b7ec1 fixed a regression in the Reactified tag selector that
prevented it from using GTK theme background colors on Linux, but it
accidentally made the background gray by default. This restores the
default white background.

Fixes #1684
2019-04-23 17:15:02 -04:00
Dan Stillman
8337b7ec16 Don't set tag selector background on Windows/Linux
Fixes dark mode on Linux
2019-04-11 16:45:07 -04:00