adobe / adobe/uxp-optimized

Fix lag between getRect(key) and other elements being rendered

Open
#24 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
17
Forks
7
PR merge metrics
No merged PRs in 30d

Description

### Expected Behaviour
virtualizer.getRect() should be in sync with the rest of the elements being rendered.

### Actual Behaviour
In UXP, when we resize our grid of cards, the thumbnails positions lag behind (they're spaced too closely when we're increasing the size, and too far apart when we're decreasing it). We tried moving the getRect to componentDidUpdate() but that did not help.

### Reproduce Scenario (including but not limited to)
Our case can be seen by running the [UXP Importer panel](https://git.corp.adobe.com/DVA/dva-uxp-importer/) in Premiere Pro (lengthy setup). Or just use the getRect call on Virtualizer to send position data to a grid of elements that renders them at those positions. See the lag as you change the spacing of the elements in that grid.
#### Steps to Reproduce
If you run the uxp importer, just move the slider up and down to see the lag between thumbnails and card backgrounds.

#### Platform and Version
UXP on Mac and Win

#### Sample Code that illustrates the problem
[UXP Importer panel](https://git.corp.adobe.com/DVA/dva-uxp-importer/) in MediaVirtualizer.tsx
#### Logs taken while reproducing problem

Contributor guide

Open the contributing guide

Research direction

Start by inspecting Virtualizer.getRect and the MediaVirtualizer.tsx integration named in the report; use the described slider or grid-resize reproduction if the UXP Importer setup is available. Done means thumbnail positions and card backgrounds stay synchronized while spacing increases or decreases.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.