You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(shapes): add 'none' dash style to hide shape borders (tldraw#8453)
In order to allow users to create shapes with fill but no visible
border/stroke (Closestldraw#7020), this PR adds a `'none'` value to
`DefaultDashStyle`. When the dash style is set to `'none'`, shapes
render their fill normally but skip all stroke/border rendering. Shape
indicators still work correctly for selection purposes.
The `'none'` dash style is not exposed in the UI style panel — it can
only be set programmatically via the SDK.
### Change type
- [x] `feature`
### Test plan
1. Create a geo shape (rectangle, ellipse, etc.) and set dash style to
`'none'` programmatically
2. Verify the shape fill renders but no border/stroke is visible
3. Verify the shape is still selectable (indicator appears on
hover/select)
4. Test with draw shapes — closed draw shapes with fill should show fill
but no stroke
5. Test with arrow shapes — arrow body should be hidden with none dash
6. Test with line shapes — line should be invisible but still selectable
7. Test SVG export with none dash — exported SVG should have no stroke
8. Test x-box geo shape — the internal X lines should not render with
none dash
- [ ] Unit tests
- [ ] End to end tests
### Release notes
- Add `'none'` dash style option that hides shape borders while
preserving fill
### API changes
- Added `'none'` to `DefaultDashStyle` enum values (`TLDefaultDashStyle`
type)
- Added `NonePathBuilderOpts` interface for the none style in
`PathBuilder`
- `PathBuilder.toSvg()` now returns `null` for `'none'` style
- `PathBuilder.toPath2D()` returns empty `Path2D` for `'none'` style
### Code changes
| Section | LOC change |
| --------------- | ---------- |
| Core code | +41 / -11 |
| Automated files | +15 / -9 |
---------
Co-authored-by: huppy-bot[bot] <128400622+huppy-bot[bot]@users.noreply.github.com>
0 commit comments