shahar1 commented on PR #56067:
URL: https://github.com/apache/airflow/pull/56067#issuecomment-3353496995

   > > Caching the current number of Dags, so in the next time the page reloads 
- it will show it instead of a plain 0, before rendering completes.
   > 
   > That I don't think we should do that. It adds complexity and possible 
desync value for not a lot of gain since the `total_entries` is part of the 
response. Also if I hard refresh I expect to see a '0' testifying that I'm not 
using any cached data. That would also remove the `useEffect` I hope which is 
something we try to avoid.
   > 
   > > Animating the counter for smooth transition between 0 or the cached 
value until the current state :)
   > For the animation part I've utilized 
[countUp.js](https://github.com/inorganik/CountUp.js) package, which provides a 
lightweight implementation for such animations. It seems to be maintained, 
widely-used (131K), and with a suitable license (MIT).
   > 
   > That's cool. If we do that here we probably want that everywhere. 
   > 
   > > Formatting the number using a thousands seperator according to the 
current locale - initially I thought of hardcoding them, but I've managed to 
use native i18n functions instead (for better compatibiltiy, we might want in 
the future to rename the locale codes according to IETF BCP 47 - e.g., Polish 
should be renamed as pl-PL).
   > 
   > 
   > Same super cool and we probably want that everywhere we display numbers.
   > 
   > 
   > Maybe we should split this PR per 1,2,3 because it would need to be 
application wide and many places will need to be upgraded to stay consistant.
   > 
   > 
   Thanks for the detailed review!
   I understand your statement regarding the added complexity with the cache 
(it's also quite brittle when combined with the filters). The real issue I was 
aiming to solve was the immediate transition between "0" and 3+ digit number 
(while the rest of the screen runs the loading animation), I came up with the 
caching later on as an "extra".
   I'll split this PR into 2:
   1. For adding the animation.
   2. For formatting the counter.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to