Skip to content

feat(scribble): add complete state to scribble lifecycle#7760

Merged
steveruizok merged 1 commit intomainfrom
steve/scribble-complete-state
Jan 28, 2026
Merged

feat(scribble): add complete state to scribble lifecycle#7760
steveruizok merged 1 commit intomainfrom
steve/scribble-complete-state

Conversation

@steveruizok
Copy link
Copy Markdown
Collaborator

@steveruizok steveruizok commented Jan 28, 2026

In order to provide better stroke termination for the laser tool, this PR adds a 'complete' state to the scribble lifecycle. This state represents scribbles that are done being drawn but not yet fading, allowing taper effects to be applied when the user lifts the pointer.

This builds on the telestrator pattern introduced in #7681.

Change type

  • improvement

Test plan

  1. Select the laser tool and draw a stroke on the canvas
  2. Lift the pointer to complete the stroke
  3. Observe the stroke has proper taper at the end point
  4. Verify the stroke fades out normally after the idle timeout

API changes

  • Added complete to TL_SCRIBBLE_STATES enum
  • Added ScribbleManager.complete(id) method to mark a scribble as complete

Release notes

  • Laser pointer strokes now have smoother endings with proper taper when lifting the pointer

Add a 'complete' state to scribbles to represent strokes that are done
being drawn but not yet fading. This provides better stroke termination
for the laser tool, applying taper effects when the user lifts the pointer.

- Add 'complete' to TL_SCRIBBLE_STATES enum
- Add ScribbleManager.complete() method to mark scribbles complete
- Update TldrawScribble to taper on complete state
- Call complete() from Lasering state on pointer up
@vercel
Copy link
Copy Markdown

vercel bot commented Jan 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
examples Ready Ready Preview Jan 28, 2026 0:22am
5 Skipped Deployments
Project Deployment Review Updated (UTC)
analytics Ignored Ignored Jan 28, 2026 0:22am
chat-template Ignored Ignored Preview Jan 28, 2026 0:22am
tldraw-docs Ignored Ignored Preview Jan 28, 2026 0:22am
tldraw-shader Ignored Ignored Preview Jan 28, 2026 0:22am
workflow-template Ignored Ignored Preview Jan 28, 2026 0:22am

Request Review

@huppy-bot huppy-bot bot added the improvement Product improvement label Jan 28, 2026
@huppy-bot
Copy link
Copy Markdown
Contributor

huppy-bot bot commented Jan 28, 2026

API Changes Check Passed

Great! The PR description now includes the required "### API changes" section. This helps reviewers and SDK users understand the impact of your changes.

@steveruizok steveruizok enabled auto-merge January 28, 2026 12:24
@steveruizok steveruizok added this pull request to the merge queue Jan 28, 2026
Merged via the queue into main with commit bde0f8f Jan 28, 2026
21 checks passed
@steveruizok steveruizok deleted the steve/scribble-complete-state branch January 28, 2026 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Product improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant