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

fix suggestion provider for crossref field #10962

Merged
merged 4 commits into from
Mar 11, 2024

Conversation

LoayGhreeb
Copy link
Collaborator

Context: #10910 (comment), #10910 (comment)
Related issue: #8145

Mandatory checks

  • 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.

@LoayGhreeb
Copy link
Collaborator Author

Should I remove the ItemProducer and the StringConverter since I added the requested string to the beginning of the suggestion list in getSuggestions method?

https://github.com/LoayGhreeb/jabref/blob/3b6835372b374d736c7f64cf3ea9fae193ba10cd/src/main/java/org/jabref/gui/fieldeditors/LinkedEntriesEditor.java#L64-L65

@Siedlerchr
Copy link
Member

Shouldn't we first have the settings for this?

@LoayGhreeb
Copy link
Collaborator Author

Shouldn't we first have the settings for this?

@Siedlerchr If someone wants to enable autocomplete only for the crossref field, they can achieve it by enabling autocomplete in the preferences and selecting only crossref in the "Affected fields".

@koppor
Copy link
Member

koppor commented Mar 4, 2024

Should I remove the ItemProducer and the StringConverter since I added the requested string to the beginning of the suggestion list in getSuggestions method?

I don't understand this question, but sounds good.

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.

Regarding the autocompletion for cross ref.

This was feature #8145

Either

  • Undo the change regarding this property
  • Add fine grained auto completion configuration

Regarding the second option, our preferences currently look as follows:

309727768-62ed3bb8-e38b-4d64-9ec7-ab4daf9a6682

Proposal:

  • Use autcompletion
    • auto-complete links to other entries
    • auto-complete person names
    • auto-complete other fiels: {fields}

The crossed items are the default setting. For {fields}, the default is keywords, journal, publisher, title.

I don't know about performance difference between cross-ref only and fields having FieldProperty.MULTIPLE_ENTRY_LINK, FieldProperty.SINGLE_ENTRY_LINK

If there is a difference, then as follows

  • auto-complete cross-ref fields
  • auto-complete fields with links to other entries

src/main/java/org/jabref/gui/LibraryTab.java Outdated Show resolved Hide resolved
@LoayGhreeb
Copy link
Collaborator Author

I don't understand this question, but sounds good.

@koppor It's the same question that I asked here: #10910 (comment).

@LoayGhreeb
Copy link
Collaborator Author

This was feature #8145

I read the conversation for this issue, and I think this feature wasn't requested for this issue. The problem described is that the crossref field doesn't work when autocomplete is disabled, it doesn't request that the suggestion provider for crossref should work when autocomplete is disabled.

koppor
koppor previously approved these changes Mar 4, 2024
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.

I think, this is good to go.

Small comment:

Why is the list entry red even if the typed-in citation key exists?

image

Siedlerchr
Siedlerchr previously approved these changes Mar 11, 2024
@Siedlerchr Siedlerchr added this pull request to the merge queue Mar 11, 2024
@Siedlerchr Siedlerchr removed this pull request from the merge queue due to a manual request Mar 11, 2024
Co-authored-by: Oliver Kopp <[email protected]>
Co-authored-by: Christoph <[email protected]>
@calixtus calixtus dismissed stale reviews from Siedlerchr and koppor via a962044 March 11, 2024 22:10
Copy link
Member

@Siedlerchr Siedlerchr left a comment

Choose a reason for hiding this comment

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

Thanks again for the good work!

@Siedlerchr Siedlerchr added this pull request to the merge queue Mar 11, 2024
Merged via the queue into JabRef:main with commit d7f7b67 Mar 11, 2024
20 checks passed
@LoayGhreeb LoayGhreeb deleted the fix-issue-8145 branch March 11, 2024 23:54
Siedlerchr added a commit to Frequinzy/jabref that referenced this pull request Mar 13, 2024
* upstream/main: (36 commits)
  chore: remove repetitive words (JabRef#11015)
  Fix test names (JabRef#11014)
  Remove obsolete "Comments" tab configuration (JabRef#11011)
  Fix "Other fields" tab respecting custom tabs (JabRef#11012)
  [WIP] Extract PDF References (JabRef#10437)
  Fixed jump to entry from crossref (JabRef#11009)
  fix suggestion provider for crossref field (JabRef#10962)
  Use SequencedSet for required and optional fields (JabRef#11007)
  Bump io.github.classgraph:classgraph from 4.8.165 to 4.8.168 (JabRef#11005)
  Bump org.glassfish.hk2:hk2-api from 3.0.6 to 3.1.0 (JabRef#11006)
  Bump org.apache.logging.log4j:log4j-to-slf4j from 2.23.0 to 2.23.1 (JabRef#11003)
  Bump org.javamodularity.moduleplugin from 1.8.14 to 1.8.15 (JabRef#11002)
  Bump jakarta.xml.bind:jakarta.xml.bind-api from 4.0.1 to 4.0.2 (JabRef#11004)
  Bump softprops/action-gh-release from 1 to 2 (JabRef#11000)
  Bump gittools/actions from 0.13.2 to 0.13.4 (JabRef#11001)
  Update custom-svg-icons.md (JabRef#10999)
  Update Texworks icon (JabRef#10998)
  Use tags editor for auto completion preferences (JabRef#10990)
  Enable auto merge of CHANGELOG.md (JabRef#10986)
  Enhance DOI parser to deal with special characters (JabRef#10989)
  ...

# Conflicts:
#	build.gradle
Siedlerchr added a commit that referenced this pull request Mar 17, 2024
* upstream/main: (26 commits)
  Speed up failure reporting (#11030)
  Importing of BibDesk Groups and Linked Files (#10968)
  Convert RemoveBracesFormatterTest to @ParameterizedTest (#11033)
  Update teaching.md
  Remove non-existing recipe (#11029)
  Update CSL styles (#11031)
  Clean up defintions of entry types (#11013)
  Fix log file path on Windows (#11028)
  Change to rolling logs (#11023)
  chore: remove repetitive words (#11015)
  Fix test names (#11014)
  Remove obsolete "Comments" tab configuration (#11011)
  Fix "Other fields" tab respecting custom tabs (#11012)
  [WIP] Extract PDF References (#10437)
  Fixed jump to entry from crossref (#11009)
  fix suggestion provider for crossref field (#10962)
  Use SequencedSet for required and optional fields (#11007)
  Bump io.github.classgraph:classgraph from 4.8.165 to 4.8.168 (#11005)
  Bump org.glassfish.hk2:hk2-api from 3.0.6 to 3.1.0 (#11006)
  Bump org.apache.logging.log4j:log4j-to-slf4j from 2.23.0 to 2.23.1 (#11003)
  ...

# Conflicts:
#	src/main/resources/csl-styles
Siedlerchr added a commit that referenced this pull request Mar 17, 2024
* upstream/main: (26 commits)
  Speed up failure reporting (#11030)
  Importing of BibDesk Groups and Linked Files (#10968)
  Convert RemoveBracesFormatterTest to @ParameterizedTest (#11033)
  Update teaching.md
  Remove non-existing recipe (#11029)
  Update CSL styles (#11031)
  Clean up defintions of entry types (#11013)
  Fix log file path on Windows (#11028)
  Change to rolling logs (#11023)
  chore: remove repetitive words (#11015)
  Fix test names (#11014)
  Remove obsolete "Comments" tab configuration (#11011)
  Fix "Other fields" tab respecting custom tabs (#11012)
  [WIP] Extract PDF References (#10437)
  Fixed jump to entry from crossref (#11009)
  fix suggestion provider for crossref field (#10962)
  Use SequencedSet for required and optional fields (#11007)
  Bump io.github.classgraph:classgraph from 4.8.165 to 4.8.168 (#11005)
  Bump org.glassfish.hk2:hk2-api from 3.0.6 to 3.1.0 (#11006)
  Bump org.apache.logging.log4j:log4j-to-slf4j from 2.23.0 to 2.23.1 (#11003)
  ...

# Conflicts:
#	src/main/resources/csl-styles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants