Skip to content

fix: element name empty string fallback + perf: remove redundant notifyParent - #1563

Open
SukuWc wants to merge 2 commits into
stablefrom
bugfix/element-name-empty-string-fallback
Open

fix: element name empty string fallback + perf: remove redundant notifyParent#1563
SukuWc wants to merge 2 commits into
stablefrom
bugfix/element-name-empty-string-fallback

Conversation

@SukuWc

@SukuWc SukuWc commented Jul 16, 2026

Copy link
Copy Markdown
Member

Changes

1. Fix element name not rendering auto-generated value when set to empty string

When an element's name store held "" instead of undefined, the auto-generated fallback name (e.g. "Element 0 (Encoder)") was not rendered.

  • Configuration.svelte: Changed el.name = "" to el.name = undefined when the name block is removed, matching the type definition (string | undefined) and what resetName() does.
  • ElementSelectionPanel.svelte: Added !== "" guard alongside the existing typeof !== "undefined" check so empty strings also fall through to getHumanName().

2. Perf: Remove redundant notifyParent in setField

setField called this.update() (which already calls notifyParent()), then called notifyParent() again — every field change fired two full walks up the runtime tree instead of one.

This halved store notification traffic across the entire codebase. Particularly impactful for the element name textbox, where updateData changes 4-5 fields per keystroke, each previously triggering ~2 walks x 5 tree levels.

@SukuWc SukuWc moved this from Todo to QA in progress in Editor Roadmap Jul 16, 2026
@SukuWc SukuWc moved this from QA in progress to Ready for QA in Editor Roadmap Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready for QA

Development

Successfully merging this pull request may close these issues.

1 participant