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

BibTeX information in web search import screen. (#560) #10784

Merged
merged 10 commits into from
Jan 25, 2024

Conversation

MrMachiei
Copy link
Contributor

@MrMachiei MrMachiei commented Jan 14, 2024

Closes koppor#560
Added BibTeX data to import web search screen:

Zrzut ekranu 2024-01-14 o 23 03 25

After selection:
Zrzut ekranu 2024-01-14 o 23 03 51

After unselect:
Zrzut ekranu 2024-01-14 o 23 04 14

After selection then selecting another entry:
Zrzut ekranu 2024-01-14 o 23 04 37

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

@tobiasdiez
Copy link
Member

Nice addition.

It takes, however, quite a bit of space away from the list of entries. Could you add a button "Show entry information" that toggles this functionality (default off). An alternative would be to show the info's on hovering the entry.

@MrMachiei
Copy link
Contributor Author

@tobiasdiez as you wish ;)
Zrzut ekranu 2024-01-16 o 21 30 38
Zrzut ekranu 2024-01-16 o 21 30 51
Zrzut ekranu 2024-01-16 o 21 31 03
Zrzut ekranu 2024-01-16 o 21 31 17

@tobiasdiez
Copy link
Member

Thanks, looks nice! 🙂 I don't have the time right now for a proper review of the code, but I'm sure another developer will look at it very soon!

});
}

private String getSourceString(BibEntry entry) throws IOException {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move the whole logic please to the viewModel?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Member

@koppor koppor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for working on this. The provided screenshots realy help!

@@ -1986,6 +1986,8 @@ Total\ items\ found\:=Total items found:
Selected\ items\:=Selected items:
Download\ linked\ online\ files=Download linked online files
Select\ the\ entries\ to\ be\ imported\:=Select the entries to be imported\:
Entry\ BibTeX\ data\:=Entry BibTeX data\:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should not be new translations for this heading. The Entry Editor uses "BibTeX". Please re-use that string. Add the : manually in the code (or just style as heading so that no : is necessary).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done:
Zrzut ekranu 2024-01-22 o 21 49 23

@@ -1986,6 +1986,8 @@ Total\ items\ found\:=Total items found:
Selected\ items\:=Selected items:
Download\ linked\ online\ files=Download linked online files
Select\ the\ entries\ to\ be\ imported\:=Select the entries to be imported\:
Entry\ BibTeX\ data\:=Entry BibTeX data\:
Show\ entry\ information=Show entry information
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be "Show BibTeX", because "information" is more general and could be more. For instance: citation data, is this entry already contained in the library, completeness of the bibtex data, ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done
Zrzut ekranu 2024-01-22 o 21 49 03

@calixtus
Copy link
Member

+1 to show this information as tooltip on mouse over as you then won't have to deal with multiple entries in the code area that should be added. And if not, hide it with a checkbox.

@MrMachiei
Copy link
Contributor Author

+1 to show this information as tooltip on mouse over as you then won't have to deal with multiple entries in the code area that should be added. And if not, hide it with a checkbox.

The option to hide with checkbox has been already added

@MrMachiei
Copy link
Contributor Author

@koppor changes added
@calixtus as I mentioned above such a feature and screenshots were added earlier

Copy link
Member

@koppor koppor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current look:

image

  • 1: Remove the ":" (because it is a heading). I know that the heading at the beginning also has a ":". Nevertheless, the first one is not quite a heading, but an instruction.
  • 2: Add "source", to be consistent with the heading (1)

In JabRef_en.properties, please group the strings together:

%0\ source=%0 source
Show\ BibTeX\ source=Show BibTeX source
Show/edit\ %0\ source=Show/edit %0 source

It is OK for me to have Show BibTeX source as new string.


Finally, if I activate "Show BibTeX source", the BibTeX source of the current selected entry should be shown.

Currently, it does not

  1. Select dblp as source
  2. Search for "vino4tosca"
  3. Import dialog with one result is shown
  4. Activate on "Show BibTeX"
  5. See that there is no source shown.

new BibEntryWriter(fieldWriter, entryTypesManager).write(entry, bibWriter, selectedDb.getValue().getMode());
} catch (
IOException ioException) {
return null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Java, one should avoid null, because this leads to NullPointerExceptions, which are hard to debug.

In your case, you can fallback to a default value - the empty string.

Suggested change
return null;
return "";

You could also include the erorr message, but I think, this is not helpful for the user.

@MrMachiei
Copy link
Contributor Author

Current look:

image

  • 1: Remove the ":" (because it is a heading). I know that the heading at the beginning also has a ":". Nevertheless, the first one is not quite a heading, but an instruction.
  • 2: Add "source", to be consistent with the heading (1)

In JabRef_en.properties, please group the strings together:

%0\ source=%0 source
Show\ BibTeX\ source=Show BibTeX source
Show/edit\ %0\ source=Show/edit %0 source

It is OK for me to have Show BibTeX source as new string.

Finally, if I activate "Show BibTeX source", the BibTeX source of the current selected entry should be shown.

Currently, it does not

  1. Select dblp as source
  2. Search for "vino4tosca"
  3. Import dialog with one result is shown
  4. Activate on "Show BibTeX"
  5. See that there is no source shown.

@koppor
As you mentioned in requirements in koppor#560:
"I would like to have a) the BibTeX information or b) a list of fields (as soon as I click on an entry)."

The requirements clearly specifies that the info should be visible after clicking such entry. In the EDGE CASE you mentioned the entry is preselected as there's only one entry. I'd recommend to write better requirements and task specifications win the future, as currently we're talking about some different features.

Also I'd like to point out the new changes in the headers you proposed - you want the ":" mark to be deleted, as in previous part of this pull request you said "There should not be new translations for this heading. The Entry Editor uses "BibTeX". Please re-use that string. Add the : manually in the code (or just style as heading so that no : is necessary).".

And about the "Show BibTeX" text - you also wanted another text as you mention now - "It should be "Show BibTeX", because "information" is more general and could be more. For instance: citation data, is this entry already contained in the library, completeness of the bibtex data, ...".

I believe that such kind of reviews are working very poorly and frustrate the developer that implements it. In my opinion you need to re-think some part of this project code review process.

@MrMachiei
Copy link
Contributor Author

Zrzut ekranu 2024-01-25 o 00 06 38

@koppor As I'm a kind person, there're your requested changes.

@koppor
Copy link
Member

koppor commented Jan 25, 2024

First of all, thank you for your patience!

@koppor As you mentioned in requirements in koppor#560: "I would like to have a) the BibTeX information or b) a list of fields (as soon as I click on an entry)."

The requirements clearly specifies that the info should be visible after clicking such entry. In the EDGE CASE you mentioned the entry is preselected as there's only one entry. I'd recommend to write better requirements and task specifications win the future, as currently we're talking about some different features.

Sometimes, requirements then get very long and implementers say: "This is too much text, I cannot understand". In this project, we are not in the 80:10:10 effort split between specification, implementation, and test. Thinking of all edge cases takes time.

The benefit of working in a closed loop (and not in a waterfall-style model) is that there is feedback. One can try out things. Since you implement the changes fast, there is really a fast feedback possible.

And about the "Show BibTeX" text - you also wanted another text as you mention now - "It should be "Show BibTeX", because "information" is more general and could be more. For instance: citation data, is this entry already contained in the library, completeness of the bibtex data, ...".

I thought about texts, because your starting suggestions were not consistent to JabRef's UI. It seems you are new to the context of literature management with JabRef, which is OK. -- Note that the tab of the enty editor was screenshot by at koppor#560 (comment). There, you could read "biblatex source". Sorry, that I screenshotted the library in biblatex (and not BibTeX mode) and thus the concrete string was underspecified.

I believe that such kind of reviews are working very poorly and frustrate the developer that implements it. In my opinion you need to re-think some part of this project code review process.

Two things:

First, as said, this fast-paced loop helps to investigate results and to improve things. It is impossible to specify all requirements at the beginning. Delivering intermediate results help to evaluate the result. - Therefore, the agile movement got traction - and there are less and less projects following the waterfall model.

Second, typically requirements are not complete. The implementor has to think about the edge cases. Decide for themselves or ask for feedback. In a perfect world, the implementor has a relation to the resulting code and knows the demand of the using person(s) and can handle accordingly. My personal hope for JabRef is that contributors implementing something for the software can get into the context. Most of the contributors are students having to write scientific articles with references. Moreover, I assume they are using the computer and like good UX. I know that "good UX" is debatable and that this is kind of experience and that no one can expect that kind of thinking from typical contributors of JabRef.


Finally, thank you for the feedback. We are trying to provide better issue descriptions for university projects. Therefore, not all issues are listed at our list for candidates for university projects https://github.com/orgs/JabRef/projects/3/views/3?query=is%3Aopen+sort%3Aupdated-desc, but only selected ones.

You are one of the contributors reacting very fast to comments. Thank you for that. That also motivates us to spend our hobby time in interaction with you. (We are all doing this in our free time to make the world a better place).

@koppor koppor added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Jan 25, 2024
@MrMachiei
Copy link
Contributor Author

@koppor Thanks for your clarification. I'm just really used to strict requirements at work, when the business says "clicked" it means clicked, not selected, so my point of view is a little biased ;p

Im just glad that finally we've reached a consensus. Thanks for fast responses :)

@Siedlerchr Siedlerchr added this pull request to the merge queue Jan 25, 2024
Merged via the queue into JabRef:main with commit bc3d223 Jan 25, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Web search results should render the BibTeX too
5 participants