Commit graph

61 commits

Author SHA1 Message Date
Abe Jellinek
3472d6cabe Prevent window overflow in Standard mode 2024-01-24 23:32:23 -05:00
abaevbog
ed8e3f142b itempane keyboard navigation
- right/left arrows on section header expand/collapse the sections
- space/enter on section header toggle section collapsed/expanded
- tab from the header goes through the header's buttons and then
tabs into the section if that's opened
- arrow up/down on the header jumps to the previous/next header
- space/enter on clickable elements simulate a click
- if there is a pinned section, tab from the title will focus its header
2024-01-24 23:32:23 -05:00
Abe Jellinek
f59ee25fd7 Remove extra textarea padding on all platforms 2024-01-24 23:32:22 -05:00
Abe Jellinek
d375b1c78b editable-text: Use minimal scrollbars everywhere 2024-01-24 23:32:22 -05:00
windingwind
6ac35a580f Fix attachment info indexed label padding 2024-01-24 23:32:21 -05:00
windingwind
982289b484 Fix dialog background 2024-01-24 23:32:19 -05:00
Tom Najdek
701c76aa3f Redesign RTF Scan wizard 2024-01-24 23:32:19 -05:00
Abe Jellinek
37d2b41778 Make clicky item icons match line height 2024-01-24 23:32:18 -05:00
windingwind
e1f026b037 Fix attachment row gap 2024-01-24 23:32:17 -05:00
windingwind
b2ce3d4a5c Fix sidenav button default status 2024-01-24 23:32:17 -05:00
windingwind
61a5704dd4 Fix attachment box bugs 2024-01-24 23:32:17 -05:00
Bogdan Abaev
b6d5a52417 additional focus management for popups
When a menupopup is opened, the active element does not change, so
their focus-ring will be hidden until the menupopup closes for it to be
less distracting.

When a panel popup is opened, the focus will be moved inside
of the panel, so we keep track of whichever element was previously
focused, and re-focus it when the panel goes away.

Minor reorganization of focus-ring mixin to use variables instead
of parameters to make hiding of focus-ring easier.
2024-01-24 23:32:16 -05:00
yexingsha
c5346d08b9 fixed some spacing in item pane 2024-01-24 23:32:15 -05:00
yexingsha
6e7c80d97b changed all font-weight: bold/590 to 600 2024-01-24 23:32:15 -05:00
windingwind
d00fc7ca22 Fix attachment box info table layout 2024-01-24 23:32:15 -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
Abe Jellinek
58958d26f4 Decrease max visible lines in non-multiline fields 2024-01-24 23:32:13 -05:00
abaevbog
5ae6f88b15 editable-text better text match to textarea
- Remove margins and add a border to the pseudo-element.
It improves how the text of the pseudo-component matches the text from
textarea and should prevent the scrollbar from appearing due to mismatch.
- Swap explicit width setting for editable-text in itemBox for
min-width: 0. It still allows the editable-text to be shrunk when the
itemBox is narrow but does not cause mismatches between pseudo elements
and the textarea.
2024-01-24 23:32:13 -05:00
Abe Jellinek
2ab1bf6e11 RTL: Put creator commas on left, use locale character 2024-01-24 23:32:13 -05:00
Abe Jellinek
ef1f64058e RTL: Reverse sidebar collapse toggle 2024-01-24 23:32:13 -05:00
Abe Jellinek
761c8a1bd4 RTL: Flip search icons 2024-01-24 23:32:13 -05:00
Abe Jellinek
ba19324723 Quick Search textbox: Fix RTL issues 2024-01-24 23:32:12 -05:00
abaevbog
b2e4c9bdeb include last space counting creator name width 2024-01-24 23:32:12 -05:00
Abe Jellinek
d128329cfb fixup: editable-text: Prevent a tiny vertical overflow 2024-01-24 23:32:11 -05:00
Abe Jellinek
bfec26f3cf editable-text: Correctly match ::after to text position
Fixes a rare mismatch that adds an extra line when that one pixel counts.
2024-01-24 23:32:11 -05:00
abaevbog
1f3c65a504 fix to textarea extra line at the bottom on win 2024-01-24 23:32:11 -05:00
abaevbog
7d68f75d03 improve itemBox creator names visibility
- do not display creator buttons until hovered
- make last name have flex-grow priority over first name
- removed inline margins of rows
- removed extra padding from icons

This makes it more likely that the creator name will be displayed
fully without ellipsis until it is hovered. When the buttons are
displayed on focus or hover, the last name tries to remain
unellipsized as long as the first name is still visible after buttons
appear. If the first name is too short, both names will be ellipsized.
2024-01-24 23:32:11 -05:00
abaevbog
32bfc267a7 itembox value fields and editable-text tweaks
- fixed creator names text selection glitch (hide the comma instead
of not displaying it + removed redundant value update that's no longer
needed)
- set selection direction in editableText on tab to not scroll to the
end of input
- added autocomplete to observedAttributes of editable-text to
properly add autocomplete even if autocomplete params are set after
the element has been rendered (which is needed for creator names). This
fixes wrong Esc behavior that erases autocomplete fields instead of
resetting to previous value.
- fixed creator names autocomplete and type switch regression after
the comma was removed
2024-01-24 23:32:10 -05:00
Abe Jellinek
a2e8294389 Add highlight to show whether notes or item pane is active 2024-01-24 23:32:00 -05:00
Abe Jellinek
9f8e3f1521 Use borders with color-*-on-*, not outlines
Since outlines don't take up space in the layout, but borders do.
2024-01-24 23:32:00 -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
Bogdan Abaev
553d1f6b3c editable-text updates
- Added nowrap attribute to not add the stretching aspect
of the editable-text and to not have any text wrapping. To be used in cases when
the input is a single line and it's width is stretched with flexbox, for
example tags or itemBox value fields.
- Added 'tight' attribute to set lower padding values on editable-text.
To be applied on fields that are not as prominent as abstract or header
as it makes the actual editable-text component smaller.
- Minor style changes to not shift layout on focus on windows (using
transparent border instead of 0 margin).
- No overflow of textarea to avoid longer-than-needed textareas on
windows.
- Keep track if the component was focused on via mouse click or not.
If the focus happened without prior mouse click, select all text.
- Reset cursor and selection on blur.
- Make sure the .input is always re-added if it disappears after drag-drop.
- Added sizeToContent function to set max-width based on the width
of the input.
- Allow the browser to break up words more freely with overflow-wrap: anywhere
to avoid stretching the itemBox with extra long header without spaces.

-  Apply 'nowrap' and 'tight' to tags so that a long tag does not stretch
the itemBox or make the editable-text extra tall.
2024-01-24 23:31:52 -05:00
Abe Jellinek
527c30b8c1 Initial implementation of Libraries and Collections box 2024-01-24 23:31:51 -05:00
Abe Jellinek
583c6328a0 Unify context pane into new item pane/sidenav design 2024-01-24 23:31:51 -05:00
windingwind
db5863fa0a Use redesign loading icon for sync spinner 2024-01-24 23:31:50 -05:00
windingwind
df0c2e2fd2 Toolbar redesign 2024-01-24 04:03:36 -05:00
Abe Jellinek
6724ff8378 Annotation rows: Make transparent border visible
Only works with outline instead of border for some reason.
2024-01-24 04:03:35 -05:00
Abe Jellinek
c78739bf2f Update and improve attachment-row initialization
- 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
2024-01-24 04:03:35 -05:00
Abe Jellinek
b2eed77914 Limit editable-text height
Current values are kind of arbitrary and could be made configurable.
2024-01-24 04:03:31 -05:00
Abe Jellinek
4a15b2633a Remove section title highlight on sidenav click 2024-01-24 04:03:18 -05:00
Abe Jellinek
19b78e2b20 Implement new pane selection algorithm, remove bottom padding 2024-01-24 04:03:17 -05:00
Abe Jellinek
663c1e62fd editable-text: Set overflow-wrap on ::after and input
There really are too many different wrapping properties
2024-01-24 04:03:13 -05:00
Abe Jellinek
bf72c9d828 Notes/Tags/Related redesign 2024-01-24 04:03:13 -05:00
Abe Jellinek
810402c9c7 Implement pane header, non-tabbed layout, collapsible sections, and new abstract box 2024-01-24 03:42:43 -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
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
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