Conversation
…#8349) Adds unit tests for the zero-length labeled arrow NaN propagation fix from #8329. Tests cover the three guard areas: geometry interpolation, spatial index insertion (via `Box.isValid`), and arrow label computation. Relates to #8329 ### Change type - [x] `other` ### Test plan 1. Run `cd packages/editor && yarn test run -t "interpolateAlongEdge|uninterpolateAlongEdge|Box.isValid"` 2. Run `cd packages/tldraw && yarn test run -t "Zero-length"` - [x] Unit tests - [ ] End to end tests ### Code changes | Section | LOC change | | ------- | ---------- | | Tests | +114 / -0 |
Use the same fence length for open and close (via a backreference) so inner ``` lines do not end a longer fence. Allow trailing markdown after the first closed block so multi-fence pastes are not merged into one body. Support CRLF and a case-insensitive mermaid info string; add tests. ### Change type - [ ] `bugfix` - [x] `improvement` - [ ] `feature` - [ ] `api` - [ ] `other` ### Test plan - [x] Unit tests - [ ] End to end tests
…#8322) Refactor the code around blueprint creation as well as the rendering by making sure shape types are defined at one level only, the blueprint creation, so we can easily allow extensibility through passing a function that can map each diagram node types to different, preferred shapes, or simply custom shapes. Also allows to pass a function to take full control of the node creation, if ever needed. ### Boring bullet points! - Add MermaidBlueprintNode.render (geo vs custom shape type + props) and diagramKind on the blueprint IR. - Optional per-diagram mapNodeToRenderSpec when building blueprints; default mapping matches previous geo behavior. - renderBlueprint creates nodes from node.render; optional blueprintRender.createShape for full override (shapeId contract preserved for arrows). - Export helpers: defaultMermaidNodeRenderSpec, resolveMermaidNodeRender, defaultCreateMermaidNodeFromBlueprint, MERMAID_MINDMAP_NODE_TYPE. - Update README, api-report, and tests. ### Example page Added an example page which show how custom shapes can be used to create "on the fly" CI pipeline workflows with mermaid diagram. https://github.com/user-attachments/assets/861179c2-7757-4657-b39c-e071a14e8756 ### API changes - createMermaidDiagram options: add flowchart, state, sequence, mindmap with optional mapNodeToRenderSpec each. - BlueprintRenderingOptions: add optional createShape (MermaidNodeCreateFunction) to override default node creation from the blueprint. ### Change type - [ ] `bugfix` - [x] `improvement` - [ ] `feature` - [x] `api` - [ ] `other` ### Test plan - [x] Unit tests - [ ] End to end tests ### Release notes - createMermaidDiagram options: add flowchart, state, sequence, mindmap with optional mapNodeToRenderSpec each. - BlueprintRenderingOptions: add optional createShape (MermaidNodeCreateFunction) to override default node creation from the blueprint.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )