Skip to content

Polish propchange event detail names#116

Open
DmitrySharabin wants to merge 1 commit into
props-bug-fixesfrom
props-api-polish
Open

Polish propchange event detail names#116
DmitrySharabin wants to merge 1 commit into
props-bug-fixesfrom
props-api-polish

Conversation

@DmitrySharabin
Copy link
Copy Markdown
Member

@DmitrySharabin DmitrySharabin commented May 15, 2026

Rename propchange event detail fields to match main:

  • parsedValuevalue (now the parsed/converted value; the raw input is no longer in the detail)
  • oldInternalValueoldValue
  • attributeName is only set when an attribute is actually involved

Internal: Prop#set param oldValueoldAttributeValue to avoid shadowing the new local; onprops.js and one propchange.js test follow the new names.

Stacked on #115. Baseline preserved: 91 pass / 7 fail / 4 skip (same 7 pins).

🤖 Generated with Claude Code

Rename the `propchange` event detail fields to match the post-signals
naming on `gitbutler/workspace` so consumers see a single, clearly named
value pair:

- `event.detail.parsedValue` → `event.detail.value` (now the parsed /
  converted value; the raw user-provided input is no longer in the
  detail)
- `event.detail.oldInternalValue` → `event.detail.oldValue`
- `event.detail.attributeName` is only set when an attribute is
  actually involved (was previously always present, sometimes
  undefined)

Internal supporting changes:

- `Prop#set` destructured param `oldValue` → `oldAttributeValue` so the
  new local `oldValue` (previous parsed value) doesn't shadow it
- `Props#attributeChanged` caller updated to pass
  `oldAttributeValue: oldValue`
- `src/plugins/events/onprops.js` consumer reads `change.value` /
  `change.oldValue`
- One `test/plugins/props/propchange.js` consumer updated

Baseline preserved: 91 pass / 7 fail / 4 skip — the 7 pre-existing
regression pins are unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant