pprmint / start.pprmint.de

A clock and a search bar.
https://start.pprmint.de
0 stars 0 forks source link

Numbers disappear when another tab is being used. #1

Open sorrynoobsitsme opened 3 weeks ago

sorrynoobsitsme commented 3 weeks ago

Description. A clear and concise description of what the bug is.

Steps to reproduce the bug.

  1. Load the page and immediately open another tab.
  2. After about 30 seconds, switch back to the start page.
  3. Repeat as necessary.

Expected behavior. I would expect the time to show the numbers even if another tab is currently in the foreground.

Screenshots. Screenshot 2024-08-25 at 10 16 50 PM Screenshot 2024-08-25 at 10 17 04 PM

System.

Additional context. Add any other context about the problem here.

pprmint commented 3 weeks ago

I'm aware of this one. It seems to be an issue with React-Spring #1954 in combination with the exitBeforeEnter prop used on the digit transitions in certain digital clocks.

I need to figure out a way to make these animations work without that particular prop. The reason why I'm using it is because otherwise you'd end up with two digits briefly appearing next to each other, one entering and one exiting, which causes an ugly horizontal shift.

sorrynoobsitsme commented 3 weeks ago

I'm aware of this one. It seems to be an issue with React-Spring #1954 in combination with the exitBeforeEnter prop used on the digit transitions in certain digital clocks.

I need to figure out a way to make these animations work without that particular prop. The reason why I'm using it is because otherwise you'd end up with two digits briefly appearing next to each other, one entering and one exiting, which causes an ugly horizontal shift.

This might be a really janky solution but, if it causes a horizontal shift then maybe try rotating both the font and element 90 degrees?

pprmint commented 3 weeks ago

...no. The issue is that the incoming digit will appear alongside the then-current digit while they both play their animation.

12:34:56 12:34:567 (6 fades out, 7 fades in next to it) 12:34:57 (both finished their transition) 12:34:578 (repeat)