Skip to content

Rename onTouchesCancelled to onTouchesCancel - #3818

Merged
j-piasecki merged 2 commits into
nextfrom
@jpiasecki/rename-callbacks
Nov 14, 2025
Merged

j-piasecki merged 2 commits into
nextfrom
@jpiasecki/rename-callbacks

Conversation

@j-piasecki

Copy link
Copy Markdown
Member

Description

Renames onTouchesCancelled to onTouchesCancel to unify the naming convention.

Also changes success to didSucceed, but this change should be transparent, besides code hints.

Test plan

Static checks

onEnd?: (
event: GestureStateChangeEvent<THandlerData>,
success: boolean
didSucceed: boolean

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll bring this topic once again, what about moving didSucceed into event? This can be both good and bad idea at the same time, so let me know what you think 😅

@j-piasecki j-piasecki Nov 14, 2025 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It already is inside the event, kind of. didSucceed is true when the new state is END, and false when the new state is CANCELLED or FAILED.

We can come back to the idea together with changing the state info. Do we want to hide the state info from the public API entirely?

I'll go with merging this for now, since this rename doesn't change the discussion in any way 😅.

@j-piasecki
j-piasecki merged commit dfff6e9 into next Nov 14, 2025
8 checks passed
@j-piasecki
j-piasecki deleted the @jpiasecki/rename-callbacks branch November 14, 2025 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants