Add keyed {#each} blocks in SidePanel.svelte#4
Merged
rdtect merged 2 commits intobolt-cesium-state-raw-5174348588541632920from Mar 24, 2026
Merged
Add keyed {#each} blocks in SidePanel.svelte#4rdtect merged 2 commits intobolt-cesium-state-raw-5174348588541632920from
{#each} blocks in SidePanel.svelte#4rdtect merged 2 commits intobolt-cesium-state-raw-5174348588541632920from
Conversation
Co-authored-by: rdtect <31343717+rdtect@users.noreply.github.com> Agent-Logs-Url: https://github.com/zyetaone/swa_window/sessions/f5b568cc-8195-479e-a1c1-1306a610dcdb
Copilot
AI
changed the title
[WIP] [WIP] Address feedback on preventing deep proxy performance overhead in Cesium.Viewer
Add keyed Mar 24, 2026
{#each} blocks in SidePanel.svelte
Contributor
|
Pr to main @copilot |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves UI update performance in SidePanel.svelte by keying the two {#each} blocks that render location buttons, allowing Svelte to apply stable keyed diffing rather than recreating DOM nodes when the lists change.
Changes:
- Added
(loc.id)keys to thecitieslist iterator. - Added
(loc.id)keys to thenaturelist iterator.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
{#each}blocks iterating overcitiesandnatureinSidePanel.sveltewere unkeyed, causing Svelte to do full DOM teardown/rebuild on list changes instead of surgical keyed diffing.Changes
SidePanel.svelte: Added(loc.id)keys to both location list iterators{#each cities as loc (loc.id)} {#each nature as loc (loc.id)}✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.