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

JabRef's UI should adapt to the font size #11219

Closed
koppor opened this issue Apr 18, 2024 · 2 comments · Fixed by #12042
Closed

JabRef's UI should adapt to the font size #11219

koppor opened this issue Apr 18, 2024 · 2 comments · Fixed by #12042
Assignees
Labels
component: ui FirstTimeCodeContribution Triggers GitHub Greeter Workflow

Comments

@koppor
Copy link
Member

koppor commented Apr 18, 2024

We need to update the CSS definitions to use em instead of px, because em adapts with the font size.

An em is a unit of measurement, relative to the size of the font; therefore, in a typeface set at a font-size of 16px, one em is 16px.

Update all pixel definitions (px) to em. This is not an easy task, because the em value depends on the font size, but the px size is a hard coded one.

  1. Find the next px entry in Base.css
  2. Check the code where the CSS definition is used
  3. Open JabRef and start that functionality
  4. Change the value to some em value
  5. Restart JabRef
  6. Change the font size to 12pt.
  7. Check if it looks nice
  8. Change the font size to 18pt.
  9. Check if it looks nice
  10. If not: Try other em value.

This takes a long time, because there are over 20 such values.

Please take screenshots before and after to ease reviewing.

Background material: https://openjfx.io/javadoc/22/javafx.graphics/javafx/scene/doc-files/cssref.html (linked from https://devdocs.jabref.org/code-howtos/javafx.html#resources, too)

Preparation

All .css definitions are spread around in the code base. We need to have them all in one Base.css to be able to work on some CSS issues.

Migrate all CSS files to the Base.css. For instance: https://github.com/JabRef/jabref/blob/main/src/main/java/org/jabref/gui/texparser/ParseLatexResult.css

Notes

Do not touch Dark.css. It needs to be kept for dark mode support. It does not contain any px values, because it does color only.

@harry924
Copy link
Contributor

harry924 commented Oct 3, 2024

I’m an undergraduate computer science student, and I’m interested in working on this issue. Please let me know if I can take this on!

@Siedlerchr Siedlerchr added the FirstTimeCodeContribution Triggers GitHub Greeter Workflow label Oct 3, 2024
@Siedlerchr Siedlerchr moved this from Free to take to Assigned in Candidates for University Projects Oct 3, 2024
Copy link
Contributor

github-actions bot commented Oct 3, 2024

Welcome to the vibrant world of open-source development with JabRef!

Newcomers, we're excited to have you on board. Start by exploring our Contributing guidelines, and don't forget to check out our workspace setup guidelines to get started smoothly.

In case you encounter failing tests during development, please check our developer FAQs!

Having any questions or issues? Feel free to ask here on GitHub. Need help setting up your local workspace? Join the conversation on JabRef's Gitter chat. And don't hesitate to open a (draft) pull request early on to show the direction it is heading towards. This way, you will receive valuable feedback.

Happy coding! 🚀

@github-project-automation github-project-automation bot moved this to Normal priority in Prioritization Nov 13, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Candidates for University Projects Dec 2, 2024
@github-project-automation github-project-automation bot moved this from Normal priority to Done in Prioritization Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: ui FirstTimeCodeContribution Triggers GitHub Greeter Workflow
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants