When you click "Zoom to Item", it performs a vertical scroll to the processor containing the item, but currently does not scroll to the specific item. For sufficiently large processors, this means the item can be off the screen.
The current implementation of ItemLink does not contain a row required to implement correct vertical scroll-to-item:
Require ItemLink to contain row. This means anyone generating an ItemLink needs to run the algorithm to compute the stacking of tasks on a processor. I think this is infeasible.
Perform a second scroll once the SlotTile is loaded so that we can determine which row the item is on and then scroll correctly. Because fetching a tile is a deferred operation, this can potentially introduce jankiness into the UI, but I think two scrolls are better than one because at least it will get the correct processor onto the screen while the tile is loading.
When you click "Zoom to Item", it performs a vertical scroll to the processor containing the item, but currently does not scroll to the specific item. For sufficiently large processors, this means the item can be off the screen.
The current implementation of
ItemLink
does not contain arow
required to implement correct vertical scroll-to-item:https://github.com/StanfordLegion/prof-viewer/blob/0657ead1d50c6fd354ab2cee03417721d674b93d/src/data.rs#L54-L64
There are a couple of options:
ItemLink
to containrow
. This means anyone generating anItemLink
needs to run the algorithm to compute the stacking of tasks on a processor. I think this is infeasible.SlotTile
is loaded so that we can determine which row the item is on and then scroll correctly. Because fetching a tile is a deferred operation, this can potentially introduce jankiness into the UI, but I think two scrolls are better than one because at least it will get the correct processor onto the screen while the tile is loading.