docs(ui): add note about visual jank in gallery

This commit is contained in:
psychedelicious
2025-08-22 21:19:39 +10:00
committed by Mary Hipp Rogers
parent 1fe19c1242
commit 8303d567d5
2 changed files with 11 additions and 0 deletions

View File

@@ -53,6 +53,12 @@ const ImageAtPosition = memo(({ imageName }: { index: number; imageName: string
* - https://github.com/reduxjs/redux-toolkit/discussions/4213
*
* This essentially means "subscribe to the query once it has some data".
*
* One issue with this approach. When an item DTO is already cached - for example, because it is selected and
* rendered in the viewer - it will show up in the grid before the other items have loaded. This is most
* noticeable when first loading a board. The first item in the board is selected and rendered immediately in
* the viewer, caching the DTO. The gallery grid renders, and that first item displays as a thumbnail while the
* others are still placeholders. After a moment, the rest of the items load up and display as thumbnails.
*/
// Use `currentData` instead of `data` to prevent a flash of previous image rendered at this index

View File

@@ -51,6 +51,11 @@ const VideoAtPosition = memo(({ videoId }: { index: number; videoId: string }) =
* - https://github.com/reduxjs/redux-toolkit/discussions/4213
*
* This essentially means "subscribe to the query once it has some data".
* One issue with this approach. When an item DTO is already cached - for example, because it is selected and
* rendered in the viewer - it will show up in the grid before the other items have loaded. This is most
* noticeable when first loading a board. The first item in the board is selected and rendered immediately in
* the viewer, caching the DTO. The gallery grid renders, and that first item displays as a thumbnail while the
* others are still placeholders. After a moment, the rest of the items load up and display as thumbnails.
*/
// Use `currentData` instead of `data` to prevent a flash of previous image rendered at this index