Skip to content

Fix modifier ordering and interpolation endpoints #966

Description

@leoafarias

Problem

Two correctness problems affect widget modifiers:

  1. MixScope.orderOfModifiers is publicly exposed, inherited, and tracked as a modifierOrder aspect, but normal WidgetModifierConfig.resolve(context) does not read it. As a result, configuring modifier order at the scope has no effect on rendering.
  2. ModifierListTween iterates only the target list. It removes begin-only modifiers immediately and, for target-only modifiers without a neutral default, can include the modifier at t = 0 but omit it at t = 1. Animated results therefore fail to reach the requested endpoint.

Expected behavior

Modifier ordering should use this precedence:

style-local WidgetModifierConfig order
  > nearest MixScope modifier order
  > package default order
  > remaining configured types in stable order

ModifierListTween must satisfy lerp(0) == begin and lerp(1) == end for every membership case. For modifiers present on only one side, interpolate through a genuine neutral modifier where one exists; otherwise snap in or out at the documented midpoint in the correct direction.

Acceptance criteria

  • MixScope.orderOfModifiers changes normal style-widget rendering.
  • Style-local modifier order overrides the inherited scope order.
  • Modifier-order dependencies subscribe precisely to the modifierOrder aspect.
  • Tween endpoints exactly match the requested begin and end lists.
  • Additions and removals animate correctly both with and without neutral defaults.
  • Reset modifiers remain filtered and never reach rendering or interpolation.
  • Regression coverage includes resolved modifier order, rendered wrapper nesting, and the interpolation membership matrix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions