ataverascrespo / RecordRack

Digital music collections and social platform
https://recordrack.ca
GNU General Public License v3.0
1 stars 1 forks source link

react-textfit on mobile renders very slowly #13

Closed ataverascrespo closed 10 months ago

ataverascrespo commented 10 months ago

Forgot to add context to this one.

When using the app on desktop, the react-textfit component in the record view works as expected - it (to the best of it's ability) uses binary search to fit headlines and paragraphs into the header element space.

But on mobile browsers, it has a weird effect where as you scroll up and down the page, the text gets bigger and bigger, eventually filling the space. This is tied to https://github.com/malte-wessel/react-textfit/issues/62, where it seems that the browsers URL bar is causing the entire page to snap, causing the element to resize.

On PWAs, where the URL bar is not present, the textfit component is not even rendering properly. I'll have to look into the react-textfit code

ataverascrespo commented 10 months ago

Well, can't say I didn't try, but react-textfit is extremely deprecated and not amazingly documented. I'm removing the textfit component for screens under 768px width. Unfortunate to lose such a cool feature but not worth the hassle on mobile :(