-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Improve user friendliness of automatically linked files #7484
Conversation
- added (Auto) in front of the name of the pdf - changed the icon for the linking action to LINK_PLUS
- remove duplicates of empty rows missed in 50e98a7
Hi folks, thanks for your contribution. At very first sight, I like this idea. |
Hello @calixtus. @tobiasdiez recommended an implementation with a description that says '(Auto)' in issue #3607, we agreed that it would make the display clearer and chose to implement it as a separate text field in the HBox, as the description is currently bound to the linked file's description property. We estimated that too much refactoring would be required to initially set the description to '(Auto)' and then change it to be bound to the file's description property, if the user chooses to link the file. We also thought that it made more sense to display the text prior to the file name. We'll await feedback from another dev about the icon vs. text dilemma. |
Thank you for your quick response. I did not see the discussion with tobias diez earlier, sorry, but if that's what you both agreed on, than its perfectly fine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code changes look good to me. Thanks!
I'm also not sure about the best way to make it clear that the file is automatically found. The current briefcase icon was more confusing than helpful. But maybe it's already enough to change the icon to the "link-add" symbol and move this symbol in front of the file name (i.e where "(Auto)" is written with this PR)? Another idea would be to set the transparency of automatically found files to something like 70%... @calixtus what do you think? @osclind & team, could you maybe experiment a bit with different solutions? It never hurts to have a fresh pair of eyes looking at this, and bringing in new ideas.
We'll try out a few solutions and update the thread with screenshots of the different results, then you can give feedback and we'll go with whatever looks best to you guys. |
After pressing buttonButton to the leftButton where (Auto) wasWith opacity@calixtus @tobiasdiez |
Thanks a lot! I like the "Button to the left" solution the most, and would say it should be sufficiently clear that this is not a normally-linked file. So if there is a short description as a tooltip for the link button, I would say this is fine. @JabRef/developers what do you think? |
The tooltip is unchanged since the earlier button as we thought it was well formulated and descriptive. |
I'm really not sure, what would be the best solution. On one hand, it shows now symbols to the left and to the right and it's hard to guess, what means what. On the other hand, it really should stand out, if there is an autolinked file. Guess there is no right solution. |
@calixtus Different entries are handled separately, we simply make use of the isAutomaticallyFound property to make changes. Several automatically foundOne added |
Of course, it's just about the look and feel if several different list entries are shown. Thanks for testing out, I personally like the variant "icon on the very left". |
Do we use opacity and what percentage would you like? Currently we use 70% for automatically found files and 100% for files that have been added. |
It's just fine, as it is. If you use opacity please also check out, if it shows up right in the dark theme. |
- auto removed - link button moved to the left - lowered opacity for automatically found files, unchanged for added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot! I have a few more nitpickings, otherwise it looks good to me.
CHANGELOG.md
Outdated
@@ -29,6 +29,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve | |||
- The export to MS Office XML now uses the month name for the field `MonthAcessed` instead of the two digit number [#7354](https://github.com/JabRef/jabref/issues/7354) | |||
- We included some standalone dialogs from the options menu in the main preference dialog and fixed some visual issues in the preferences dialog. [#7384](https://github.com/JabRef/jabref/pull/7384) | |||
- We improved the linking of the `python3` interpreter via the shebang to dynamically use the systems default Python. Related to [JabRef-Browser-Extension #177](https://github.com/JabRef/JabRef-Browser-Extension/issues/177) | |||
- Automatically found pdf files now have the linking button to the far left and uses the icon LINK_PLUS instead of BRIEFCASE_CHECK. The file name also has lowered opacity(70%) until added. [#3607](https://github.com/JabRef/JabRef-Browser-Extension/issues/3607) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The link to the issue is not correct. Moreover, the changelog is for users, so please don't use technical terms such as LINK_PLUS.
acceptAutoLinkedFile.managedProperty().bind(linkedFile.isAutomaticallyFoundProperty()); | ||
acceptAutoLinkedFile.setOnAction(event -> { | ||
linkedFile.acceptAsLinked(); | ||
linkedFile.setOpacityProperty(1.0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move linkedFile.setOpacityProperty(1.0);
into acceptAsLinked
. The viewmodel should contain all the logic.
@@ -1732,6 +1732,7 @@ Don't\ share=Don't share | |||
Share\ anonymous\ statistics=Share anonymous statistics | |||
Telemetry\:\ Help\ make\ JabRef\ better=Telemetry: Help make JabRef better | |||
To\ improve\ the\ user\ experience,\ we\ would\ like\ to\ collect\ anonymous\ statistics\ on\ the\ features\ you\ use.\ We\ will\ only\ record\ what\ features\ you\ access\ and\ how\ often\ you\ do\ it.\ We\ will\ neither\ collect\ any\ personal\ data\ nor\ the\ content\ of\ bibliographic\ items.\ If\ you\ choose\ to\ allow\ data\ collection,\ you\ can\ later\ disable\ it\ via\ Options\ ->\ Preferences\ ->\ General.=To improve the user experience, we would like to collect anonymous statistics on the features you use. We will only record what features you access and how often you do it. We will neither collect any personal data nor the content of bibliographic items. If you choose to allow data collection, you can later disable it via Options -> Preferences -> General. | |||
(Auto)=(Auto) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is no longer needed, I guess.
@@ -196,6 +196,7 @@ public void bindToEntry(BibEntry entry) { | |||
preferences.getFilePreferences(), | |||
externalFileTypes); | |||
newLinkedFile.markAsAutomaticallyFound(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move newLinkedFile.setOpacityProperty(0.3);
to markAsAutomaticallyFound
so that it is consistent, even if some other code marks a file as automatically found.
- made changelog easier to read - moved opacity operations to correct locations - readjusted opacity to correct value - removed unused localization
we will write some tests for this as well |
If you like one more more idea on this: The "Königsweg" would be to assign a css PseudoState, so the opacity would be addressable in the stylesheet and be customizable. |
See for example ImportEntriesDialog::initialize() (lines 105 and 145) |
King's Trail has a different meaning in Sweden: https://en.wikipedia.org/wiki/Kungsleden (highly recommended hike!). 😃 Otherwise I agree! |
Wouldn't say so, both the Kungsleden and using psuedo classes for opacity are distinguished by special beauty. 🙈 😆 |
- opacity is now set through a css pseudoclass instead of a property
We did not manage to figure out how to use EasyBind but the program now makes use of css to change the opacity when the text is generated and when the button is pressed. |
acceptAutoLinkedFile.setOnAction(event -> { | ||
linkedFile.acceptAsLinked(); | ||
link.pseudoClassStateChanged(opacity, linkedFile.isAutomaticallyFound()); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
acceptAutoLinkedFile.setOnAction(event -> { | |
linkedFile.acceptAsLinked(); | |
link.pseudoClassStateChanged(opacity, linkedFile.isAutomaticallyFound()); | |
}); | |
acceptAutoLinkedFile.setOnAction(event -> linkedFile.acceptAsLinked()); | |
EasyBind.subscribe(linkedFile.isAutomaticallyFoundProperty(), found -> link.pseudoClassStateChanged(opacity, found)); |
This should do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public static Subscription includePseudoClassWhen(Node node, PseudoClass pseudoClass, ObservableValue<? extends Boolean> condition) { |
- changed how opacity is updated
@calixtus @tobiasdiez |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have to thank you guys!
And sorry that the process was a bit back and forth. Sometimes the hardest part is not in the actual coding but figuring out what would be the best user experience. We hope you enjoyed the project nonetheless and hope to see further contributions ;-)
I have just tested it: Nice! |
We have implemented a new textfield for files that are automatically detected by JabRef and listed as files in the general tab of the entry editor. We also changed the icon for automatically linked files from a BRIEFCASE_CHECK to LINK_PLUS, since we found it more intuitive. This fixes #3607.
CHANGELOG.md
described in a way that is understandable for the average user (if applicable)We thought that creating an issue would be redundant if our changes weren't accepted, so we have not completed the documentation task. The documentation refers to the icon as a "suitcase", which would not be accurate, were these changes to be accepted. Instead it should be referred to as a link with a plus sign.
Screenshots
Before changes
File not linked
File linked
After changes
File not linked
File linked