-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Fixes #6705 , added icon for multiple identifiers #6809
Conversation
8fda4f7
to
f8e2ed8
Compare
Hi @hemantgs , thanks for your work. I will look at it the next days. |
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 for your contribution!
The code looks good to me, and I've only a few very minor remarks. Concerning the icon, I'm also not sure what to choose. There doesn't seem to be a good icon for multiple links. The database icon is already used in a few places (groups and shared database), so I'm a bit hesitant to use it here as well. What about using the link
and link-variant
? Other solution would be to keep the current www
, and use earth
for multiple links?
@@ -94,6 +98,7 @@ public CellFactory(ExternalFileTypes externalFileTypes, UndoManager undoManager) | |||
icon = printedViewModel.getIcon(); | |||
// icon.setToolTipText(printedViewModel.getLocalization()); | |||
TABLE_ICONS.put(SpecialField.PRINTED, icon); | |||
|
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.
please remove this newline
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.
removed this line
@@ -49,17 +50,31 @@ public LinkedIdentifierColumn(MainTableColumnModel model, | |||
this.setResizable(false); | |||
this.setCellValueFactory(cellData -> cellData.getValue().getLinkedIdentifiers()); | |||
new ValueTableCellFactory<BibEntryTableViewModel, Map<Field, String>>() | |||
.withGraphic(this::createIdentifierGraphic) | |||
.withGraphic(values -> createIdentifierGraphic(values)) |
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 old code .withGraphic(this::createIdentifierGraphic)
should still work.
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.
reverted this
@tobiasdiez 👍 Glad to help
Yeah my initial thoughts too , Database icon is common And |
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.
Hi @hemantgs , we looked into your work and would like to thank you for your work, which looks mostly very good.
We have an important remark about the cellfactory. Please also pay attention to the remarks of @tobiasdiez .
About the icon graphic: I personally prefer the chain for the links. But of course the question is, how to show the difference to multiple links...
Greetings from the JabCon2020!
if (values.size() > 1) { | ||
return cellFactory.getTableIcon(StandardField.URLS); | ||
} else if (values.size() == 1) { | ||
return cellFactory.getTableIcon(StandardField.URL); | ||
} else { | ||
return null; | ||
} |
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.
if (values.size() > 1) { | |
return cellFactory.getTableIcon(StandardField.URLS); | |
} else if (values.size() == 1) { | |
return cellFactory.getTableIcon(StandardField.URL); | |
} else { | |
return null; | |
} | |
if (values.size() > 1) { | |
return IconTheme.JabRefIcons.MULTIPLE_LINKS.getGraphicNode(); | |
} else if (values.size() == 1) { | |
return IconTheme.JabRefIcons.LINK.getGraphicNode(); | |
} else { | |
return null; | |
} |
We talked in JabCon2020 a bit about this and we think that it would be better to directly load the icons here instead of introducing a new field URLS
in StandardFields
in the model
package for a ui feature.
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.
@calixtus Yeah , that makes sense too , I have changed it to use JabRefIcons directly
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.
@@ -123,6 +123,7 @@ | |||
TYPE("type", FieldProperty.TYPE), | |||
URI("uri", "URI"), | |||
URL("url", "URL", FieldProperty.EXTERNAL, FieldProperty.VERBATIM), | |||
URLS("urls", "URLS", FieldProperty.VERBATIM), |
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.
See above.
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.
removed this
CHANGELOG.md
Outdated
@@ -108,7 +109,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve | |||
- We fixed an issue with the Science Direct fetcher where PDFs could not be downloaded. Fixes [#5860](https://github.com/JabRef/jabref/issues/5860) | |||
- We fixed an issue with the Library of Congress importer. | |||
- We fixed the [link to the external libraries listing](https://github.com/JabRef/jabref/blob/master/external-libraries.md) in the about dialog | |||
|
|||
- We fixed linked identifier icon inconsistency[#6705](https://github.com/JabRef/jabref/issues/6705) |
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 fixed linked identifier icon inconsistency[#6705](https://github.com/JabRef/jabref/issues/6705) | |
- We fixed the linked identifier icon inconsistency[#6705](https://github.com/JabRef/jabref/issues/6705) |
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.
fixed
and modified behaviour to open eprint when clicked without opening menu Added change log Changed name for enum Fixed checkstyle errors
f8e2ed8
to
4c2f493
Compare
Was wondering what this was 😄 , |
Fixed checkstyle errors
4c2f493
to
1b373ea
Compare
Thanks for your work @hemantgs , we took the liberty to fix some small merge errors. |
Added icon for multiple identifiers
and modified behaviour to open eprint when clicked without opening menu
Issue 1 : Icon for linked identifiers does not change when more than one entry is linked
The WEB Material design glyphicon did not have a "plural" variant so thought will change to this for singular variant
And for the plural variant used this 😄 Can change this to something else too
Issue 2 :
Made changes so that when only one entry is available the link is opened immediately without the menu