thamara / time-to-leave

Log work hours and get notified when it's time to leave the office and start to live.
http://timetoleave.app
GNU General Public License v3.0
455 stars 267 forks source link

Added offline font. #1034

Closed chase-west closed 9 months ago

chase-west commented 11 months ago

Related issue

Closes #1031

Context / Background

What change is being introduced by this PR?

How will this be tested?

Check if font works when offline.

codecov[bot] commented 11 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (26f5d4c) 79.37% compared to head (4d0a82b) 79.40%. Report is 11 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1034 +/- ## ========================================== + Coverage 79.37% 79.40% +0.03% ========================================== Files 21 21 Lines 1275 1277 +2 Branches 189 189 ========================================== + Hits 1012 1014 +2 Misses 263 263 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

chase-west commented 11 months ago

Thanks for the PR!

It seems we only require two of the fonts from the family.

Could we commit only these two then?

And could you document in the .css file where you got it from, in case we need the other fonts in the future?

Sorry it appears I didn't explain well. It only uses those 2 fonts when offline not the entire family. And yes I can document it.

araujoarthur0 commented 11 months ago

In that case, let's commit only those two we need and not the whole family to have a smaller footprint in the repo.

chase-west commented 11 months ago

In that case, let's commit only those two we need and not the whole family to have a smaller footprint in the repo.

Done.

tupaschoal commented 10 months ago

@chase-west ?

chase-west commented 10 months ago

@chase-west can you please undo any changes on the package-lock.json? It should have not been necessary to touch it for the PR

I honestly have no idea how to do that I've tried

araujoarthur0 commented 10 months ago

https://devconnected.com/how-to-remove-files-from-git-commit/ For more instructions on removing a file from a commit

araujoarthur0 commented 9 months ago

I've also changed the PR to use the variable weight font instead. From my testing, this new font increased the font size and weight in some places in the tool, even though the actual font size and weight numbers are the same. My guess is because the format changed from woff to tty, but I'm not knowledgeable enough in this area to comment further. I've adjusted the sizes manually by comparing against the previous screen size occupied by the text. I've only done this in Windows, though.

@thamara, could you check in Mac if the text sizes look the same before and after this PR? For example the preferences window looked 1.5x bigger for me before adjusting it.

thamara commented 9 months ago

I've checked this PR on Mac and everything seems fine.

With this PR:

pr

With the main branch:

main
thamara commented 9 months ago

\changelog-update Message: Fix [#1034]: Preserving TTL font when offline User: chase-west

thamara commented 9 months ago

Thank you all.