Skip to content

Allow default behaviour in stopEvent/ignoreMutation overrides#5590

Closed
alexkuz wants to merge 1 commit intoueberdosis:nextfrom
alexkuz:patch-1
Closed

Allow default behaviour in stopEvent/ignoreMutation overrides#5590
alexkuz wants to merge 1 commit intoueberdosis:nextfrom
alexkuz:patch-1

Conversation

@alexkuz
Copy link

@alexkuz alexkuz commented Sep 5, 2024

Changes Overview

In my case, I needed to override stopEvent, but only for a specific case. Otherwise I'd like for it to have a default behaviour. To do this, I'd have to recreate all the checks from default stopEvent in my override. This PR addresses this inconvenience.

Implementation Approach

stopEvent ignores override only if you explicitly return a null. This should minimize a breaking change for existing usages.

Testing Done

Verification Steps

Additional Notes

Checklist

  • I have created a changeset for this PR if necessary.
  • My changes do not break the library.
  • I have added tests where applicable.
  • I have followed the project guidelines.
  • I have fixed any lint issues.

Related Issues

#257

@changeset-bot
Copy link

changeset-bot bot commented Sep 5, 2024

🦋 Changeset detected

Latest commit: 723813b

The changes in this PR will be included in the next version bump.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link

netlify bot commented Sep 5, 2024

Deploy Preview for tiptap-embed failed. Why did it fail? →

Name Link
🔨 Latest commit 1587216
🔍 Latest deploy log https://app.netlify.com/sites/tiptap-embed/deploys/66d963138020b200085ce28b


if (typeof this.options.stopEvent === 'function') {
return this.options.stopEvent({ event })
const shouldStopEvent = return this.options.stopEvent({ event })
Copy link
Contributor

Choose a reason for hiding this comment

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

This syntax looks wrong

Copy link
Author

Choose a reason for hiding this comment

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

oh, I just saw this. Editing PR directly on Github was a mistake 😅

@netlify
Copy link

netlify bot commented Jun 2, 2025

Deploy Preview for tiptap-embed ready!

Name Link
🔨 Latest commit 723813b
🔍 Latest deploy log https://app.netlify.com/projects/tiptap-embed/deploys/6860a1e0e18d750008240792
😎 Deploy Preview https://deploy-preview-5590--tiptap-embed.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Member

@bdbch bdbch left a comment

Choose a reason for hiding this comment

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

LGTM

@bdbch
Copy link
Member

bdbch commented Jun 24, 2025

@alexkuz could you take a look at those linting issues?

@alexkuz
Copy link
Author

alexkuz commented Jun 28, 2025

@bdbch all fixed

@bdbch
Copy link
Member

bdbch commented Jun 28, 2025

Sorry - one more thing. Could you rebase this PR into next so we can cherry-pick it down to main/develop? We don't use develop for active dev anymore.

@alexkuz alexkuz changed the base branch from develop to next June 29, 2025 02:16
@alexkuz
Copy link
Author

alexkuz commented Jun 29, 2025

Done!

@bdbch bdbch deleted the branch ueberdosis:next July 19, 2025 15:27
@bdbch bdbch closed this Jul 19, 2025
@bdbch
Copy link
Member

bdbch commented Jul 19, 2025

@alexkuz could you rebase this to the current develop branch as we released V3, deprecating the next branch & would need to update most of our PR's anyway? Thanks a lot! I will look into getting this merged afterwards!

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.

3 participants