Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File annotations: remove line breaks, increase width, and reduce font size #3823

Closed
anassal opened this issue Mar 9, 2018 · 8 comments
Closed
Labels
entry-editor external files good first issue An issue intended for project-newcomers. Varies in difficulty. type: enhancement ui

Comments

@anassal
Copy link

anassal commented Mar 9, 2018

JabRef 4.2-dev--snapshot--2018-03-09--master--988fb54a9
Windows 8.1 6.3 x86
Java 1.8.0_161

  1. Multi-line PDF annotations like these:

1

are shown with "line breaks" like this.

2

  1. There is currently a wide white space between the annotation text and the date/page number. Text should be warped with the maximum available/appropriate width.

  2. Then, the height of each annotation item should be "auto".

  3. I suggest the font size of the extracted annotations in the left-hand panel be reduced (e.g., x0.6). The right hand panel font size looks OK.

@Siedlerchr Siedlerchr added the good first issue An issue intended for project-newcomers. Varies in difficulty. label Jun 12, 2018
@miderleta
Copy link

Hi. I am looking for my first contribution. Do you mind if I would give this issue a go please?

@Siedlerchr
Copy link
Member

@miderleta You are welcome! Please take a look at our Contribution guideline for getting started and setting up a workspace etc and you can start.

For this specific issue it's probably sufficient to play around with the css properties and the fxml.
If you have any questions please ask here or in our gitter chat

@miderleta
Copy link

It seems like I cannot generate Javadoc for the project. Is that an issue or am I doing something wrong?

@Siedlerchr
Copy link
Member

Siedlerchr commented Jul 27, 2018

@miderleta Where do you need it for? Any modern IDE will show you the javadoc automatically for each method - if it's annotated.

Edit// For understanding of the high level architecture, you might take a look at our wiki https://github.com/JabRef/jabref/wiki/High-Level-Documentation

@upupming
Copy link
Contributor

@anassal

Line breaks

If we always delete the line breaks in annotation, it will look better. But what if the line breaks are for another paragraph? You can see this example:

image

image

Line break at Location 1 should be deleted, but that at location 2 should be reserved!

I will try to find a solution to judge if the line break should be removed. If you have any idea, please leave a comment.

Date/Page margin

Actually, this margin will be changed automatically when you adjust your window size. See the following gif:

margin

The summary in the left-hand panel is so long that there is no extra space for the "Marking" and "Content" panel. I will try to wrap the summary and reduce the minimized margin between summary and date/page footer in the left-hand panel. I will also reduce the font size of summary.

By the way,

  1. Then, the height of each annotation item should be "auto".

Do not understand your meaning clearly, could you please explain it in more detail?

@Siedlerchr
Copy link
Member

Maybe you can differentiate between a new paragraph starting vs a normal line break code wise.

@anassal
Copy link
Author

anassal commented Jul 28, 2018

@upupming This is a valid point. But can't we reasonably assume that most annotations are in single paragraphs, since paragraphs usually contain different ideas?

For annotations that actually span over multiple paragraphs, we can see if there are statistical differences between "end-of-line" and "end-of-paragraph" linebreak characters, as @Siedlerchr suggested, in PDFs annotated in multiple readers (e.g., Adobe, Foxit, Okular). It is also worth checking if this has been solved in other libraries/tools that extract text from PDF.

Regarding the "auto" height of an annotation item (left-hand panel), I just meant auto height that would result from text wrapping and fixed/limited width. Along with text wrapping and other improvements, the summary could be limited to, say, 10-15 words.

upupming added a commit to upupming/jabref that referenced this issue Aug 2, 2018
upupming added a commit to upupming/jabref that referenced this issue Aug 2, 2018
upupming added a commit to upupming/jabref that referenced this issue Aug 2, 2018
upupming added a commit to upupming/jabref that referenced this issue Aug 2, 2018
tobiasdiez pushed a commit that referenced this issue Aug 3, 2018
* Solved #3823 File annotation: delete hyphens and new lines & wrap summary

* Fixed: l10n for remove line breaks

* Fixed: final variable name

* Revert "Fixed: l10n for remove line breaks"

This reverts commit ae2956b.

* Fixed: revert changed formatter & wrap marking tooltip

* Added: test for FileAnnotation

* Fixed: keep newline&hyphen formatter using `\R`
@upupming
Copy link
Contributor

upupming commented Aug 3, 2018

@anassal Done~

Now you can check the build from http://builds.jabref.org/master/. Please remember to make a backup of your library before trying out this version.

Siedlerchr added a commit that referenced this issue Aug 8, 2018
…tive

* upstream/master:
  Update dependencies (#4251)
  Fix author list parser (#4169) (#4248)
  Solved #3823 File annotation (#4246)
  Fix importer vulnerability (#4240)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
entry-editor external files good first issue An issue intended for project-newcomers. Varies in difficulty. type: enhancement ui
Projects
None yet
Development

No branches or pull requests

5 participants