Skip to content

Add 'Make absolute/relative' toggle-switch in library properties#13053

Merged
Siedlerchr merged 8 commits into
JabRef:mainfrom
paudelritij:fix-for-issue-13031
May 9, 2025
Merged

Add 'Make absolute/relative' toggle-switch in library properties#13053
Siedlerchr merged 8 commits into
JabRef:mainfrom
paudelritij:fix-for-issue-13031

Conversation

@paudelritij

@paudelritij paudelritij commented May 4, 2025

Copy link
Copy Markdown
Contributor

Closes #13031

  1. Introduce a new toggle button
  2. Toggle button is synced with change in directory path and vice-versa
  3. Tooltip displayed and also synchronous with change in specified directory (relative/absolute) and vice-versa
  4. Toggle button is disabled for unsaved libraries
  5. Directory is checked against relative path to library path and displayed relative (for saved libraries only)

Saved libraries:

image

Unsaved libraries:

image

Mandatory checks

  • I own the copyright of the code submitted and I license it under the MIT license
  • Change in CHANGELOG.md described in a way that is understandable for the average user (if change is visible to the user)
  • [/] Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (if change is visible to the user)
  • 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.

* 'Make absolute' button will change selected path to an absolute path.
* Change display of directory path. If path is relative to library path then relative directory path will be shown.
@paudelritij paudelritij marked this pull request as ready for review May 4, 2025 15:12
@koppor

koppor commented May 4, 2025

Copy link
Copy Markdown
Member

Can we have "Make relative" if the path is absolute and the relative path (w.r.t. to bib file location) is possible?

@Siedlerchr

Copy link
Copy Markdown
Member

I like the idea, however, I think a switch/toggle button would be better for switching between relative and absolute

@calixtus

calixtus commented May 5, 2025

Copy link
Copy Markdown
Member

+1 for toggle. And please use a symbol. this big button gives the functionality far more prominence in the ui than it deserves.

@paudelritij paudelritij changed the title Add 'Make absolute' button in library properties Add 'Make absolute/relative' toggle-switch in library properties May 6, 2025
@calixtus

calixtus commented May 6, 2025

Copy link
Copy Markdown
Member

That toggle switch may show the state of toggle nicely, but it suggest you turn the folder on and off. This is misleading the user. Please just use an icon/a symbol. See https://pictogrammers.com/library/mdi/

@paudelritij

Copy link
Copy Markdown
Contributor Author

That toggle switch may show the state of toggle nicely, but it suggest you turn the folder on and off. This is misleading the user. Please just use an icon/a symbol. See https://pictogrammers.com/library/mdi/

my bad I should have observed this, you are absolutely right thank you for feedback... will make changes

@Siedlerchr

Copy link
Copy Markdown
Member

lgtm!

Siedlerchr
Siedlerchr previously approved these changes May 7, 2025
@Siedlerchr Siedlerchr added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label May 7, 2025
@trag-bot

trag-bot Bot commented May 9, 2025

Copy link
Copy Markdown

@trag-bot didn't find any issues in the code! ✅✨

@Siedlerchr Siedlerchr added this pull request to the merge queue May 9, 2025
Merged via the queue into JabRef:main with commit d940392 May 9, 2025
1 check 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.

Directory should be relative

4 participants