Repository navigation
Dependency injection: a rewired link's old route leaves, emphasized, with its card - #81
Merged
Merged
Conversation
…with the card it pointed to A rewired relationship (one ID, a new target) drew its old route in its own step but never outlived its card, so where the card left in an earlier step the route faded out with it unemphasized: grey and solid beside the card's removed edges. A link part one revision alone draws now follows the step that takes it away or brings it: the first of its own and its leaving cards' steps, or the last of its own and its arriving cards'. Its window and its emphasis both follow that step (linkStepRow). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The route’s fade is applied twice, making it less opaque than its card during transitions; the opacity calculation needs correction and a regression assertion for matching opacity.
1 open issue
What changed in this PR
This PR aligns dependency-injection link timing and emphasis with the cards they connect to, addressing rewired routes that appeared grey and solid while their cards were removed.
Changes:
- Assigns revision-specific link routes to the earliest removal or latest arrival step.
- Uses the selected link step for renderer emphasis.
- Adds a regression test for a rewired dependency whose old target leaves first.
| File | Description |
|---|---|
packages/renderers/dependency-injection/test/model.test.mjs |
Tests rewired-route scheduling, removal status, and fading. |
packages/renderers/dependency-injection/src/transition.ts |
Coordinates link windows with endpoint steps and exposes linkStepRow. |
packages/renderers/dependency-injection/src/renderer.tsx |
Applies emphasis using each drawn link’s selected step. |
Review effort: Balanced
A link's opacity multiplied its own presence by its cards', so a route on its card's step faded twice (0.25 where the card is 0.5). It takes the least of them instead. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.

Fixes a dependency-injection animation bug: when a removed card leaves, one edge into it could be drawn grey and solid instead of red and dashed.
Cause. A rewired relationship keeps one ID but points somewhere new (here
OrdersController's dependency moves fromIOrderServicetoIOrderQueries). Its old route was scheduled in the relationship's own step, but it can't outlive the card it points to. When that card leaves in an earlier step, the route faded out with it while its emphasis was still 0: neutral grey and solid, beside the card's other removed edges.Fix. A link part drawn by only one revision now follows the step that takes it away or brings it in:
Its window and its emphasis both use that step (
transition.linkStepRow).Before and after, the same frame (progress 0.375, dark):
A unit test in
dependency-injection/test/model.test.mjscovers it.