Commit graph

11430 commits

Author SHA1 Message Date
Dan Stillman
03ac62e71e Tweak PDF reader checkbox label 2021-03-02 18:12:25 -05:00
Dan Stillman
5fd7f097f3 Add "Learn more" link below PDF reader checkbox 2021-03-02 18:12:25 -05:00
Dan Stillman
94871dade6 Add Cancel button to prompt for PDF reader checkbox 2021-03-02 18:12:24 -05:00
Adomas Venčkauskas
607cb733da Adds a friendly date and subsequent note line for note insertion
Closes #66
2021-03-02 18:12:24 -05:00
Adomas Venčkauskas
91ac847bab Inform connector about PDF build to enable Add Note button in Google Docs 2021-03-02 18:12:24 -05:00
Adomas Venčkauskas
02fc8bf39f Add an error message when using the Add Note button with beta disabled
Closes #67
2021-03-02 18:12:24 -05:00
Martynas Bagdonas
3aa79f40d7 Populate PDF reader tab title immediately 2021-03-02 18:12:24 -05:00
Martynas Bagdonas
17abf87bcf Improve notes list UI:
- Show both sections even on search
- Add new note creation popups with an option to create from annotations
- Hide child notes section if no parent item
2021-03-02 18:12:24 -05:00
Dan Stillman
d47ec92116 Tweak notes pane styling 2021-03-02 18:12:24 -05:00
Dan Stillman
ca15e03701 Add commas to "[x] more…" count in notes pane 2021-03-02 18:12:24 -05:00
Dan Stillman
590b6b4a34 Adjust sizing of notes pane search bar and + buttons 2021-03-02 18:12:24 -05:00
Dan Stillman
ebf45a3232 Fix tab bar initialization on macOS after isPDFBuild change 2021-03-02 18:12:24 -05:00
Adomas Venčkauskas
e166a04876 Fix outdated template warning for Mac Word 2021-03-02 18:12:24 -05:00
Dan Stillman
7cd861a9e1 Change PDF reader beta pref to a general beta pref
The PDF reader pref is now "Use Zotero PDF reader and new note editor
(beta, My Library only)". Toggling the pref prompts to restart, and
Zotero.isPDFBuild -- which currently controls the PDF reader, new note
editor, and tabs UI -- is set based on that pref at startup.
2021-03-02 18:12:24 -05:00
Dan Stillman
557a75c90f Fix quotes in invalid-field error messages 2021-03-02 18:12:24 -05:00
Dan Stillman
1e8f2b94d4 Don't show annotation fields in advanced search for now
Since annotations don't show up as items yet
2021-03-02 18:12:24 -05:00
Martynas Bagdonas
7bdd34596d Improve notes list UI:
- Always show both sections
- Do not show empty sections when searching
- Collapse notes list when all tabs are closed
- Work around search input to take full width without breaking its stuff
2021-03-02 18:12:24 -05:00
Martynas Bagdonas
83109fc076 Fix and attach image annotation renderer 2021-03-02 18:12:24 -05:00
Dan Stillman
3e4ad18b2a Show friendlier date in PDF reader notes list
Using new Zotero.Date.toFriendlyDate() function

- Time if today
- Day of week if earlier this week
- Date with two-digit year otherwise

We could consider adding 'Yesterday' as well.
2021-03-02 18:12:24 -05:00
Dan Stillman
0c17829b27 Set isPDFBuild permanently to true
While the code can technically disable various things (e.g., tab bar) to
behave like 5.0, other things (e.g., word processor plugins) would be
tricky to do conditionally.
2021-03-02 18:12:24 -05:00
Dan Stillman
afa989c3a8 Use getExportableNote() for word processor note insertion 2021-03-02 18:12:24 -05:00
Dan Stillman
eb29b69d58 Use typographic quotes around highlights in notes 2021-03-02 18:12:24 -05:00
Dan Stillman
2c66133c7e Add "Add Note from Annotations" menu option on items
Shows as a menu option when there's a single PDF attachment with
annotations and as a submenu containing titles when there are multiple
(even if there's only one attachment that actually has annotations)

Also removes "Create Note from Annotations" on attachment items for now.
(It might make sense to add that back, though "Add" would be a little
weird for creating a sibling note, while using a different label would
be confusing.)
2021-03-02 18:12:24 -05:00
Dan Stillman
3e37d31a49 Sort notes reverse chronologically in note insertion search results 2021-03-02 18:12:24 -05:00
Martynas Bagdonas
5a6424e591 Limit notes count in contextPane notes list 2021-03-02 18:10:44 -05:00
Martynas Bagdonas
e409c8bc27 Improve navigation to specific PDF page 2021-03-02 18:10:44 -05:00
Martynas Bagdonas
4b622f074d Add function to export note with dataURI images 2021-03-02 18:10:44 -05:00
Dan Stillman
79950ecfe5 Exclude annotations from library export
We'll want to support this eventually, but for now they would just break
translation.
2021-03-02 18:10:44 -05:00
Martynas Bagdonas
b00325942a Improve reworked context pane:
- Show child notes at top of notes list, with separate headers for "Item
  Notes" and "All Notes"
- Fix "New Child Note" option
- Add parent item title above note editor when editing child note
- Cleanup

TODO:
- Search on parent item title for child notes
2021-03-02 18:10:44 -05:00
Dan Stillman
db0bd56688 Prevent possible error if schema check occurs before schema update
Not sure if this can happen, but if there's any way for the schema
integrity check to run before the global schema is updated, use -1 for
the annotation itemTypeID.
2021-03-02 18:10:44 -05:00
Dan Stillman
2d2062a63d Block saving of annotations and embedded images in groups
Both should already be disabled via the UI, but just in case there's
some way they sneak through
2021-03-02 18:10:44 -05:00
Adomas Venčkauskas
50dae87b07 Add a warning dialog for an outdated doc template 2021-03-02 18:10:44 -05:00
Adomas Venčkauskas
0fc9037a54 Add a version of citation dialog for citing notes 2021-03-02 18:10:44 -05:00
Dan Stillman
7b794cecd7 PDF reader: Fix 2x icon size in notes list 2021-03-02 18:10:44 -05:00
Dan Stillman
dba841770c Rework context pane in PDF reader
- Remove item pane tabs
- Show all notes in notes pane, showing the parent title where
  appropriate
- Show drop-down menu for "New Note" button in notes pane that allows
  creating standalone or child notes
- Add some temporary styling for notes in the notes pane

TODO:

- Show child notes at top of notes list, with separate headers for "Item
  Notes" and "All Notes"
- Fix "New Child Note" option
- Add parent item title above note editor when editing child note
- Search on parent item title for child notes
2021-03-02 18:10:44 -05:00
Dan Stillman
73ba5f9ffe Auto-sync after setting change 2021-03-02 18:10:44 -05:00
Martynas Bagdonas
f52c50f055 Use synced pageIndex 2021-03-02 18:10:44 -05:00
Dan Stillman
77ea19277d Remove embedded-image attachment under annotation in test 2021-03-02 18:10:44 -05:00
Dan Stillman
651aabc4dc Prevent setting parent item to non-regular item
Except for embedded-image attachments under notes and annotations under
attachments
2021-03-02 18:10:44 -05:00
Dan Stillman
8b57d0000b Don't orphan embedded-image attachments in schema integrity check! 2021-03-02 18:10:44 -05:00
Martynas Bagdonas
d0bdc45b9f Fix "Add to Note" for not yet created note 2021-03-02 18:10:44 -05:00
Martynas Bagdonas
5ddae7c6e6 Update pdf-reader, zotero-note-editor 2021-03-02 18:10:44 -05:00
Martynas Bagdonas
aa836d77af Improve editor ir merge dialog 2021-03-02 18:10:44 -05:00
Martynas Bagdonas
a225c498ec Get rid of image natural dimensions 2021-03-02 18:10:44 -05:00
Dan Stillman
eb865e2625 setAttachmentPageIndex() → setAttachmentLastPageIndex() 2021-03-02 18:10:44 -05:00
Martynas Bagdonas
580d800286 Add support for PDF navigation to pageLabel 2021-03-02 18:10:44 -05:00
Martynas Bagdonas
16650b4ddf Improve note creation from annotations 2021-03-02 18:10:44 -05:00
Martynas Bagdonas
d23e0e30bb Fix annotation insertion 2021-03-02 18:10:44 -05:00
Martynas Bagdonas
67f76c1445 Update note-editor, pdf-reader, pdf-worker 2021-03-02 18:10:44 -05:00
Martynas Bagdonas
7fa68690dd Do not insert citation for parentless PDF 2021-03-02 18:10:44 -05:00