WPI-Men-s-Rowing / QRA-Website

Website used by the Quinsigamond Rowing Association, Inc.
Other
1 stars 0 forks source link

Results Card Lag #1

Closed Landaman closed 9 months ago

Landaman commented 10 months ago

Because the result card is a client-side component, the icons cannot be globally cached.

The card is client-side because it needs useState to show expanded/contracted.

Perhaps something like Suspense would enable us to make the bulk of the component server-side, at least enabling icon caching.

Landaman commented 10 months ago

Result interception may provide a good way to solve this

Landaman commented 10 months ago

The only "good" way to handle this is to have our own SVGs

Landaman commented 10 months ago

Actually I take that back.

We can use a div and inject the raw SVG data using dangerousSetInnerHtml (and of course sanitizing with DomPurify)

The only problem is, this strips away some styling that is (at least mostly) necessary to get this to work.

Landaman commented 10 months ago

Update: It seems that even using a small, static PNG causes too large of wait times. This may be because we're using a "component" instead of a nested layout and route. Investigating...

Landaman commented 9 months ago

Fixed. The solution is to: