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. |
tobiasdiez
left a comment
There was a problem hiding this comment.
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?
| icon = printedViewModel.getIcon(); | ||
| // icon.setToolTipText(printedViewModel.getLocalization()); | ||
| TABLE_ICONS.put(SpecialField.PRINTED, icon); | ||
|
|
| 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.
The old code .withGraphic(this::createIdentifierGraphic) should still work.
@tobiasdiez 👍 Glad to help
Yeah my initial thoughts too , Database icon is common And |
calixtus
left a comment
There was a problem hiding this comment.
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.
| 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.
@calixtus Yeah , that makes sense too , I have changed it to use JabRefIcons directly
| TYPE("type", FieldProperty.TYPE), | ||
| URI("uri", "URI"), | ||
| URL("url", "URL", FieldProperty.EXTERNAL, FieldProperty.VERBATIM), | ||
| URLS("urls", "URLS", FieldProperty.VERBATIM), |
| - 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.
| - 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) |
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