Repository navigation
feat: a frame and its toggle for a product's own server and client - #282
Merged
Merged
Conversation
Stage 8.9 draws mlir's open operations as the stock frame and its closed ones as the stock node with `+`. mlir has a layout engine and a client of its own, so the two parts of the frame they lacked are exported: - `settleFrames`, `isUnwiredPin` and `placeUnwiredPins` from the server: the room a frame keeps for its pins' names, and the pins no edge ends on, placed by the frame after the layout, as the stock engine places them. - `nodeOpenToggleModule` from the client: the toggle's listener and the anchor that keeps the node pressed where it was on screen, with nothing else of the stock features. The stock features bind the same through `bindNodeOpenToggle`, so the bindings are one. Claude-Session: https://claude.ai/code/session_011UYzzShRuBLgefHUrAbqya
- A product that loads the toggle module and the stock features gets the anchor and the listener once: each is bound only if it is not. - `settleFrames` run again on a frame takes the unwired mark off a pin an edge now ends on, and its room off a frame that needs none. - `placeUnwiredPins` takes a frame with no children. - The module says it loads after GLSP's defaults, whose update command it replaces, and the CHANGELOG that the bus toggle stays with the stock features. Claude-Session: https://claude.ai/code/session_011UYzzShRuBLgefHUrAbqya
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.
Stage 8.9 part 2 draws mlir's open operations as the stock frame (
stockFrame, #281) and its closed ones as the stock node with+. mlir lays out with an ELK engine of its own and composes its own client without the stock features, so two parts of the frame were out of its reach.Server (
@dialogram/diagram-server):settleFrames,isUnwiredPinandplaceUnwiredPinsare exported. A product's engine callssettleFramesonce the edges are built (room for the pins' names in the padding, room under the members for the pins no edge ends on), keeps the unwired pins out of ELK, and places them withplaceUnwiredPinsafter the layout, as the stock engine does.Client (
@dialogram/diagram-client):nodeOpenToggleModule, a module with the toggle's mouse listener and the toggle anchor (the anchor, its model-root listener, and GLSP's update command rebound to the anchored one). The stock features now bind the same throughbindNodeOpenToggle, so the bindings live in one place. The container parity baseline is unchanged.Tests:
stock-node.test.ts: a frame with a wired pin, an unwired one and an output keeps more room on the side of the longer name and room under its members, marks only the unwired pin, andplaceUnwiredPinsputs it on the left border under the members; the barrel exports the three.node-open-toggle.test.ts: the module's registrations (listener, anchor, root listener, update command), the barrel's exports, and the stock features binding throughbindNodeOpenToggle.https://claude.ai/code/session_011UYzzShRuBLgefHUrAbqya