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

Rename General File Directory to Library-Specific File Directory #12037

Merged
merged 17 commits into from
Oct 24, 2024

Conversation

tomeg09
Copy link
Contributor

@tomeg09 tomeg09 commented Oct 20, 2024

Describe the changes you have made here: what, why, ..

Per issue koppor#571, there was a request to rename "general file directory" to "Library-specific file directory". This has been updated in the following places:

  1. Within the internal code: this has been renamed to "Library Specific File Directory" (or librarySpecificFileDirectory, LIBRARY_SPECIFIC_FILE_DIRECTORY, etc).
  2. Within the test base: all associated tests where this has been updated have been changed (I have therefore declared that I "created tests" as the testing library may require PR approver's scrutiny.
  3. A localisation for "Library-specific File Directory" was added for English. I have left the localisation for "General File Directory" in place. I have not added localisations for other languages.

Screenshots of the change reflected in the UI:
image

Documentation updates:
User Docs: see Docs PR#535
Developer Docs: this file makes reference to the general file directory and requires updating.

Lines in question are:

Library → Library properties, items General file directory, and User-specific file directory. (plus screenshot)

JabRef uses these 3 directories to search for the files: JabRef starts in the user-specific file directory, then the general file directory, and, finally, the main file directory​

Either, each user can set his directory in the "Main file directory". In case the group also shares papers and thus there are two directories (the private one and a group-shared one), one can set a directory within the library (the "General file directory")

If no match is found, it uses the "General file directory" of the bib file. If that is not found, it uses the one configured at File → Preferences → Linked files.

It is also possible to achieve this result by setting . as "General file directory" in the library properties.

Relative file directories obviously only work in the library properties for a bib file, e.g. a.bib Library → Library properties → General file directory → papers.

Mandatory checks

  • I own the copyright of the code submitted and I licence it under the MIT license
  • 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.

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 the name of variables and UI text should be consistent. Please add “specific“ where appropriate!

generalFileDirectory.ifPresent(fileDirs::add);

// fileDirs.isEmpty() is true after these two if there are no directories set in the BIB file itself:
// 1) no user-specific file directory set (in the metadata of the bib file) and
// 2) no general file directory is set (in the metadata of the bib file)
// 2) no library file directory is set (in the metadata of the bib file)
Copy link
Member

Choose a reason for hiding this comment

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

When reading this, I think. everywhere, the “-specific“ should be added. Also in constants, getters, ...

@koppor koppor added the status: changes required Pull requests that are not yet complete label Oct 23, 2024
@koppor
Copy link
Member

koppor commented Oct 23, 2024

@tomeg09 Any chance to get my wish implemented soon? #12059 needs this change!

@tomeg09
Copy link
Contributor Author

tomeg09 commented Oct 24, 2024

@tomeg09 Any chance to get my wish implemented soon? #12059 needs this change!

@koppor - working on this now

tomeg09 added a commit to tomeg09/jabref-user-documentation that referenced this pull request Oct 24, 2024
1. removed unused general file directory key
2. made Library-specific file directory key all-lowercase per unit test requirements.
@tomeg09 tomeg09 marked this pull request as ready for review October 24, 2024 02:58
@tomeg09 tomeg09 requested a review from koppor October 24, 2024 02:58
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.

Looks good! Can you add a CHANGELOG.md entry, too?

@@ -65,6 +65,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
- We changed instances of 'Search Selected' to 'Search Pre-configured' in Web Search Preferences UI. [#11871](https://github.com/JabRef/jabref/pull/11871)
- We added a new CSS style class `main-table` for the main table. [#11881](https://github.com/JabRef/jabref/pull/11881)
- When renaming a file, the old extension is now used if there is none provided in the new name. [#11903](https://github.com/JabRef/jabref/issues/11903)
- We changed the name of the library-based file directory from 'General File Directory' to 'Library-specific File Directory' per issue [#571](https://github.com/koppor/jabref/issues/571)
Copy link
Contributor Author

@tomeg09 tomeg09 Oct 24, 2024

Choose a reason for hiding this comment

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

@koppor I had already added a CHANGELOG.md entry. Please let me know if this needs to be adjusted.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, my mobile client kind of hid it. Thank you for the quick note!

@koppor koppor added this pull request to the merge queue Oct 24, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 24, 2024
@koppor koppor added this pull request to the merge queue Oct 24, 2024
Merged via the queue into JabRef:main with commit 404394f Oct 24, 2024
23 checks passed
@tomeg09 tomeg09 changed the title WIP: Rename General File Directory to Library-Specific File Directory Rename General File Directory to Library-Specific File Directory Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: changes required Pull requests that are not yet complete
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants