Skip to content

feat: allow value feedbacks as layered-button style overrides - #4379

Merged
Julusian merged 4 commits into
mainfrom
claude/feedback-style-overrides-eo4exa
Aug 6, 2026
Merged

feat: allow value feedbacks as layered-button style overrides#4379
Julusian merged 4 commits into
mainfrom
claude/feedback-style-overrides-eo4exa

Conversation

@Julusian

@Julusian Julusian commented Jul 30, 2026

Copy link
Copy Markdown
Member

An absurd example:

image

Which results in the feedback applying every other second, setting the button text to the abc 05:22:20 when it is active

Also adds some tooltips, which I am not 100% happy with placement/style of, but I think necessary to have somewhere:

image

Summary by CodeRabbit

  • New Features

    • Added support for value-based feedback style overrides using feedback values in expressions.
    • Added context-aware expression editing, guidance, and feedback-specific defaults.
    • Added validation to hide and reject unsupported feedback types.
    • Improved fallback handling when overrides are unavailable or invalid.
  • Style

    • Improved the layered style override table layout and presentation.
    • Added clearer guidance and interaction details for feedback style overrides.

@CLAassistant

CLAassistant commented Jul 30, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 494d1371-329e-4f19-8640-d9e79645897c

📥 Commits

Reviewing files that changed from the base of the PR and between ffd4035 and 7fdf6b8.

📒 Files selected for processing (1)
  • companion/lib/Resources/Util.ts

📝 Walkthrough

Walkthrough

The PR adds typed feedback style overrides with value-feedback context. It updates validation, entity pools, graphics evaluation, and Web UI editing for $(this:value) expressions.

Changes

Feedback style override flow

Layer / File(s) Summary
Override contracts and eligibility
shared-lib/lib/Model/*, shared-lib/lib/Entity.ts, companion/lib/Instance/..., companion/lib/Internal/*, shared-lib/lib/__tests__/Entity.test.ts
Defines resolved overrides and unsupported feedback flags. Validation and entity-definition generation apply the new feedback rules.
Resolved override propagation
companion/lib/Controls/Entities/*, companion/lib/Controls/ControlTypes/Button/*, companion/lib/Graphics/ConvertGraphicsElements.ts, companion/test/Controls/Entities/*
Entity pools and graphics conversion use resolved override maps. Value feedbacks carry thisContext; Boolean and Advanced feedbacks use null context.
Centralized graphics resolution
companion/lib/Graphics/ConvertGraphicsElements/Helper.ts, companion/test/Graphics/*
ElementExpressionHelper evaluates typed overrides with injected context and falls back to original values when required. Tests cover transformation, fallback, tracking, precedence, and lazy evaluation.
Style override editor
webui/src/Controls/Components/*, webui/src/Controls/LocalVariablesStore.tsx, webui/src/scss/_button-edit.scss
The editor filters unsupported feedbacks, initializes value overrides with $(this:value), displays interaction help, and exposes feedback context variables.
Supporting documentation
companion/lib/Resources/Util.ts
The color parsing documentation states that alpha values are ignored and not preserved.

Poem

A value finds its context true,
Expressions bloom in a button’s hue.
Boolean paths keep null in hand,
Graphics resolve what they understand.
The editor guides each style anew.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: enabling value feedbacks as layered-button style overrides.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Julusian Julusian added this to the v5.1 milestone Aug 1, 2026
@github-project-automation github-project-automation Bot moved this to In Progress in Companion Plan Aug 1, 2026
@Julusian
Julusian force-pushed the claude/feedback-style-overrides-eo4exa branch 9 times, most recently from 77acc09 to df91a66 Compare August 2, 2026 21:58
Value feedbacks were blocked from the layered-button style override list;
only boolean and advanced feedbacks were permitted. This exposes a value
feedback's value to its style overrides as an expression, so a user can
override an element property with a transform of the feedback value.

- Allow Value feedbacks in the StyleOverride list (canAddEntityToFeedbackList)
- Carry the feedback value through the override map via a new
  ResolvedFeedbackStyleOverride shape (thisContext), threaded through the
  entity pools, drawer and graphics element conversion
- Evaluate value-feedback override expressions in ElementExpressionHelper
  with $(this:value) bound to the feedback value, tracking referenced
  variables; an undefined result means "no override" (base value is used)
- UI: value-feedback overrides are always edited as an expression, seeded
  with $(this:value), with that value offered in the picker
- Add a feedbackStyleOverridesUnsupported definition flag so a feedback can
  opt out of the style-override list entirely (menu + validation); apply it
  to the internal user_value feedback, which is confusing as a style override
- Show an icon with hover text in the style-override editor indicating how
  the placed feedback type (value/boolean/advanced) interacts with overrides
- Add unit tests across shared-lib, companion and webui

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011dJegJRRd8hCL62tzmy1ft
@Julusian
Julusian force-pushed the claude/feedback-style-overrides-eo4exa branch from df91a66 to 1d2c488 Compare August 2, 2026 22:14
@Julusian
Julusian marked this pull request as ready for review August 3, 2026 20:36

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
webui/src/Controls/Components/LayeredStylesOverrides.tsx (1)

388-437: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add a focused test for the value-feedback editor path.

The current tests cover helper output only. Add a unit test that verifies a value-feedback edit saves { isExpression: true } and exposes this:value in the expression variables. This protects the new resolver contract from a literal-value regression.

As per coding guidelines, “When changing behavior, improve unit-test coverage rather than relying on manual testing alone.”

Source: Coding guidelines

🧹 Nitpick comments (1)
webui/src/Controls/Components/LayeredStylesOverrides.tsx (1)

47-89: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Move the exported helpers to a non-component module.

react-refresh/only-export-components reports warnings for defaultStyleOverrideValue and feedbackTypeInteractionHelp. Keep LayeredStylesOverrides.tsx limited to component exports. Update the test import to use the new helper module.

As per coding guidelines, “Before finishing a change, ensure yarn check-types, yarn lint, and yarn vitest run pass.”

Sources: Coding guidelines, Linters/SAST tools


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: af37d5ca-cf4f-41dc-a86e-88b2125a4c48

📥 Commits

Reviewing files that changed from the base of the PR and between e521c92 and 1d2c488.

📒 Files selected for processing (24)
  • companion/lib/Controls/ControlTypes/Button/LayeredButtonDrawer.ts
  • companion/lib/Controls/Entities/EntityListPoolBase.ts
  • companion/lib/Controls/Entities/EntityListPoolButton.ts
  • companion/lib/Controls/Entities/EntityListPoolExpressionVariable.ts
  • companion/lib/Controls/Entities/EntityListPoolPage.ts
  • companion/lib/Controls/Entities/EntityListPoolTrigger.ts
  • companion/lib/Graphics/ConvertGraphicsElements.ts
  • companion/lib/Graphics/ConvertGraphicsElements/Helper.ts
  • companion/lib/Instance/Connection/ChildHandlerLegacy.ts
  • companion/lib/Instance/Connection/Thread/HostContext.ts
  • companion/lib/Internal/Controller.ts
  • companion/lib/Internal/Variables.ts
  • companion/test/Controls/Entities/EntityListPool.test.ts
  • companion/test/Graphics/ConvertGraphicsElements.test.ts
  • companion/test/Graphics/ConvertGraphicsElements/Helper.test.ts
  • shared-lib/lib/Entity.ts
  • shared-lib/lib/Model/EntityDefinitionModel.ts
  • shared-lib/lib/Model/EntityModel.ts
  • shared-lib/lib/__tests__/Entity.test.ts
  • webui/src/Controls/Components/EntityCommonCells.tsx
  • webui/src/Controls/Components/LayeredStylesOverrides.tsx
  • webui/src/Controls/Components/__tests__/LayeredStylesOverrides.test.ts
  • webui/src/Controls/LocalVariablesStore.tsx
  • webui/src/scss/_button-edit.scss

claude and others added 2 commits August 3, 2026 21:14
- getParsedString: a value-feedback override that resolves to undefined now
  falls back to the element's own value AND variable-interpolates it (a string
  property is a template), instead of rendering the raw $(...) text
- Update the style-override variable picker to the new getOptions signature
  (actionContext: NotActions), fixing the check-types CI failure

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011dJegJRRd8hCL62tzmy1ft
@Julusian
Julusian merged commit 2a1af26 into main Aug 6, 2026
3 of 4 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Companion Plan Aug 6, 2026
@Julusian
Julusian deleted the claude/feedback-style-overrides-eo4exa branch August 6, 2026 20:01
Julusian pushed a commit that referenced this pull request Aug 6, 2026
The rebase dropped main's additions to _button-edit.scss (the wysiwyg toolbar
from #4341 and the value-feedback overrides from #4379) as part of resolving
the convert-to-CSS modify/delete. Re-apply them in button-edit.css: the
canvas workspace + quick-actions/aspect toolbars, the panel resize bar with
its mode-toggle, the elementlist heading/body split, the fixed layered-
overrides table layout and the portaled aspect-custom popover. New colours go
through tokens (a button-editor toolbar palette + shadow-4/-6 for the subtle
lifts); the rest reuse existing surface/border/primary tokens.
Julusian pushed a commit that referenced this pull request Aug 6, 2026
The rebase dropped main's additions to _button-edit.scss (the wysiwyg toolbar
from #4341 and the value-feedback overrides from #4379) as part of resolving
the convert-to-CSS modify/delete. Re-apply them in button-edit.css: the
canvas workspace + quick-actions/aspect toolbars, the panel resize bar with
its mode-toggle, the elementlist heading/body split, the fixed layered-
overrides table layout and the portaled aspect-custom popover. New colours go
through tokens (a button-editor toolbar palette + shadow-4/-6 for the subtle
lifts); the rest reuse existing surface/border/primary tokens.
Julusian pushed a commit that referenced this pull request Aug 6, 2026
The rebase dropped main's additions to _button-edit.scss (the wysiwyg toolbar
from #4341 and the value-feedback overrides from #4379) as part of resolving
the convert-to-CSS modify/delete. Re-apply them in button-edit.css: the
canvas workspace + quick-actions/aspect toolbars, the panel resize bar with
its mode-toggle, the elementlist heading/body split, the fixed layered-
overrides table layout and the portaled aspect-custom popover. New colours go
through tokens (a button-editor toolbar palette + shadow-4/-6 for the subtle
lifts); the rest reuse existing surface/border/primary tokens.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants