Coder Social home page Coder Social logo

reader's Introduction

Zotero

CI

Zotero is a free, easy-to-use tool to help you collect, organize, cite, and share your research sources.

Please post feature requests or bug reports to the Zotero Forums. If you're having trouble with Zotero, see Getting Help.

For more information on how to use this source code, see the Zotero documentation.

reader's People

Contributors

abaevbog avatar abejellinek avatar dstillman avatar flachware avatar mrtcode avatar tnajdek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

reader's Issues

Error typing in annotation comment

This is on returning to a previous annotation after restart:

JavaScript error: zotero://pdf.js/annotator.js, line 6: TypeError: u.position.rects is undefined

Let me know if this is something in the data layer code.

Components that need styling

  • Rework annotation design based on draft annotation-4 #30.
  • Update annotation styles to clamped-view. #34
  • Soften highlight color in PDF #32
  • Add color split button to page-popup #35
  • Search #38
  • Import bar #39
  • Error message #41
  • Note toggle icon (right sidebar)
  • Down / focus state
  • Page number editing
  • Editor bubble
  • Cursors in PDF viewer
  • Loading bar
  • Blurred window state
  • keyboard focus states in generic theme
  • Update styles due to https://github.com/zotero/zotero-pdf.js/issues/10
  • Hairline styles (toolbar buttons, search box, …) for generic theme on high-res displays

Enhance highlight cursor

If I’m not mistaken we just have to remove z-index: -1 from .Layer__Highlight to get back the defined hover cursor. I would suggest to switch to the default cursor for the hover state.

Make outline view look more like an outline

I think the original version represents the outline view better. It has an icon which looks like an outline or a TOC. Secondly, the inline bookmark icons are probably also redundant, because they don't transfer any information and are quite distracting.

Screenshot from 2020-04-14 09-57-16

Screenshot from 2020-04-14 10-06-12

Missing icons

  • application-side-expand-rtl 1x & 2x
  • application-side-contract-rtl 1x & 2x
  • document-bookmark 2x
  • full-screen 1x & 2x
  • spread-even 1x & 2x
  • loading-small.png & [email protected] (for bright background)

Search

  • 2x version of win/clear.png and win/clear-hover.png

Crash UI on annotation save error

With #51, an error is logged but there's no indication in the UI that there was a problem. While it's good that the comment reverts on blur, an error saving should really crash the UI somehow to keep people from typing long notes that are then lost.

Refactor gradient buttons

There seems to be a simpler way using two linear gradients as background images and clip them to padding and border box (the 'border' gradient needs to be enlarged).

Blurry splitToolbarButton separators in Chrome can be avoided using transformed (scaled) generated content.

Change image annotation icon to not have a filled square

I think the image annotation icon is a bit too similar to the note icon. It might be clearer to just drop the filled square within the outline. (The highlight icon, after all, is similarly representing the tool, not the highlighted text.)

Links inside pdf's not working

Frankly, I'm quite surprised to be the first one to add this issue, but not being able to follow hyperlinks in pdf's seems like the first thing one notices. Perhaps it's just me? I've tried both the Hand Tool and Text Selection Tool with combinations of control/alt/shift/CMD buttons, but none appear to work at the moment.

Render correct icons in preview header

@mrtcode I’ve added the highlight, note, and area icons as inline SVGs to the preview header. Currently it’s hard-coded to always show the highlight icon (I commented out the other two), so we would need some logic to show the correct icon.

In the simplest case we’d just render the appropriate SVG conditionally, but if you prefer we could also create icon components, so inline SVG icons can be used in a <IconHighlight/> manner – I’d recommend the latter in the long run, but for now a simple conditional rendering might be fine.

Focus comment box in annotation popup if empty

When the sidebar is closed and you make a highlight and click on it and there's no existing comment, we should focus the comment box so you can just type right away.

If there is text, not sure. Maybe do the same with the cursor at the beginning?

Feature Request: Improved Text-Editor in PDF Annotation Bubbles

(Copying https://forums.zotero.org/discussion/90502/ here)

I love the new built-in PDF reader. However, I wish you could add 3 more features to the built in note annotation bubbles.

  1. Add buttons to underline and strikethrough text in notes annotation bubbles.

    This should be fairly straightforward by adding new entries to the "actions" array:

    https://github.com/zotero/pdf-reader/blob/65bb0ea542694d8a88a6c1aacb8488274ad96c03/src/components/editor.js#L131

    After all, underlining and strikethrough are already supported by Document.execCommand(): https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand

  2. Support for keyboard shortcuts to bold, underline, and italicize text in the notes bubble. Ideally keyboard shortcuts to superscript / subscript text as well.

  3. Support for writing LaTeX in note annotation bubbles.

    See https://forums.zotero.org/discussion/comment/385574

Improve performance

  • Optimize annotations rendering in layer.js
  • A delay between note annotation creation and focusing

Improve clamping

  • Trim unnecessary characters before adding ellipsis
  • Cut text at word boundaries to prevent text wrapping

Consider to completely drop the pdf.js text layer and reimplement the text selection in canvas

If the native browser text selection becomes too annoying, consider to implement a separate text selection logic which will calculate the selection and draw the highlights in canvas.

The potential downsides would be that there is no real text and copy to clipboard would be more problematic. Text selection on touch devices can be more complicated too, although PDFTRON solves this by adding a text selection mode.

The benefits of this would be a more convenient text selection which is not flickering (which is terrible on chrome), automatically detects word boundaries and allows to start selection by clicking anywhere near the word or between lines or paragraphs. Also we would have a better control on what is selected, changing the already existing highlight annotation selection range would become possible and we would be independent from how selection works on different browsers.

While other parts of pdf.js are really good, the text layer part needs a complete rewrite to provide as good text selection experience as native PDF viewers. The text layer should firstly recreate the whole PDF structure like pdftotext does.

Error message

@dstillman @mrtcode when a PDF file is corrupted, can we detect that before opening a new window/tab and show an error message in the main window?

Add color indicator

Add an explicit color indicator to each block in the sidebar (should be visible when the block is collapsed).

Do not use a colored shade to indicate active blocks (this is confusing).

Sidebar resizer is disabled in Safari

This is the behavior of the official pdf.js. I guess that dates back to a time when Safari did not support CSS variables – I think we should open an issue for that in the pdf.js repository.

Make navigation between annotations smooth

Navigation between annotations is jumpy and doesn't take into account if it's visible or not. There's no way to visually distinguish if it was navigated half-page down or 10 pages down. The similar situation is with navigation between sidebar annotations.

Debounce annotation saving when typing comment

Every keystroke currently saves the annotation. We should debounce those so it only saves a second after typing stops, and potentially every x seconds even if they're still typing (which we don't do in TinyMCE notes but probably should).

(We've also had intermittent issues over the years with auto-sync causing a note being edited to reload, moving the cursor to the beginning and losing recently typed text. That may be an issue here (and in the new note editor) with debounced saving, so let's keep an eye on that. Various possible ways to address it if necessary.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.