Element list doesn't fully update when switching assemblies #20

Open
opened 2024-11-15 01:13:46 +00:00 by Vectornaut · 0 comments
Collaborator

Summary

Each item in a Sycamore keyed list is assigned a diff key. During a list update, when Sycamore sees an item whose diff key matches an item that's already on the list, it doesn't bother re-rendering that item.

In the outline view, the diff key we assign to an element or constraint is the slab key we use to access that element or constraint within the current assembly. As a result, elements in different assemblies can have matching diff keys.

The assembly switcher clears the previous assembly and builds the new assembly all in one update. When an element of the new assembly happens to have the same diff key as an element of the previous assembly, Sycamore doesn't re-render that item. Instead, it keeps showing the element of the previous assembly.

Reproduction

To see this happen, try switching from the "General' example to the "Low-curvature" example immediately after loading the page. Most of the element labels will stay the same—but the two examples don't actually have any labels in common.

## Summary Each item in a Sycamore keyed list is assigned a diff key. During a list update, when Sycamore sees an item whose diff key matches an item that's already on the list, it doesn't bother re-rendering that item. In the outline view, the diff key we assign to an element or constraint is the slab key we use to access that element or constraint within the current assembly. As a result, elements in different assemblies can have matching diff keys. The assembly switcher clears the previous assembly and builds the new assembly all in one update. When an element of the new assembly happens to have the same diff key as an element of the previous assembly, Sycamore doesn't re-render that item. Instead, it keeps showing the element of the previous assembly. ## Reproduction To see this happen, try switching from the "General' example to the "Low-curvature" example immediately after loading the page. Most of the element labels will stay the same—but the two examples don't actually have any labels in common.
Vectornaut changed title from Element list doesn't update properly when switching assemblies to Element list doesn't fully update when switching assemblies 2024-11-15 01:14:03 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: glen/dyna3#20
No description provided.