Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: General improvements for TypeScript types #883

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

rfgamaral
Copy link
Member

Overview

BREAKING CHANGE: Fix TypeScript types for the Suggestion plugin command function (allowing for generic override).

Although this was not causing any issues for us due to the convoluted implementation, the same fix was recently applied to Tiptap, and this aligns our suggestion factory function implementation with the original one. Unfortunately, this comes as a breaking change (examples were also updated to reflect the required changes).

Additionally, other smaller TypeScript types were refactored for consistency and clarity, but these are safe changes.

PR Checklist

Test plan

Tip

"work as expected" in the context of mentions and hashtags means that the suggestions are shown correctly, they can be inserted into the editor without issues, the Markdown output is as before, the HTML (inspect the DOM) is as before, and the the onMentionItemSelect output in the "Actions" tab (at the bottom of the Storybook) is also as before. Feel free to compare the preview Storybook with the production one.

  • Open the preview Storybook deployed to Netlify
  • Open the Rich-text → Default story
  • Use mentions with @
    • Observe that they continue to work as expected
  • Use hashtags with #
    • Observe that they continue to work as expected

BREAKING CHANGE: Fix TypeScript types for the Suggestion plugin
`command` function (allowing for generic override).

Although this was not causing any issues for us due to the convoluted
implementation, the same fix was recently applied to Tiptap, and this
aligns our suggestion factory function implementation with the original
one. Unfortunately, this comes as a breaking change (examples were also
updated to reflect the required changes).

Additionally, other smaller TypeScript types were refactored for
consistency and clarity, but these are safe changes.
@rfgamaral rfgamaral added the 👀 Show PR Used for PRs that need a review, but can be merged when CI is green. label Aug 28, 2024
@rfgamaral rfgamaral requested a review from a team August 28, 2024 15:17
@rfgamaral rfgamaral self-assigned this Aug 28, 2024
@rfgamaral rfgamaral requested review from engfragui and removed request for a team August 28, 2024 15:17
@rfgamaral rfgamaral enabled auto-merge (squash) August 28, 2024 15:17
Copy link

netlify bot commented Aug 28, 2024

Deploy Preview for doist-typist ready!

Name Link
🔨 Latest commit 63f4c60
🔍 Latest deploy log https://app.netlify.com/sites/doist-typist/deploys/66cf3f841e9e5800088065f3
😎 Deploy Preview https://deploy-preview-883--doist-typist.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 site configuration.

@rfgamaral rfgamaral merged commit b235eaf into main Aug 28, 2024
9 checks passed
@rfgamaral rfgamaral deleted the ricardo/refactor-types branch August 28, 2024 15:23
doistbot added a commit that referenced this pull request Aug 28, 2024
## [7.0.0](v6.0.11...v7.0.0) (2024-08-28)

### ⚠ BREAKING CHANGES

* Fix TypeScript types for the Suggestion plugin
`command` function (allowing for generic override).

Although this was not causing any issues for us due to the convoluted
implementation, the same fix was recently applied to Tiptap, and this
aligns our suggestion factory function implementation with the original
one. Unfortunately, this comes as a breaking change (examples were also
updated to reflect the required changes).

Additionally, other smaller TypeScript types were refactored for
consistency and clarity, but these are safe changes.

### Code Refactoring

* General improvements for TypeScript types ([#883](#883)) ([b235eaf](b235eaf))
@doistbot
Copy link
Member

🎉 This PR is included in version 7.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@doistbot doistbot added the released Pull requests that have been released to production label Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Pull requests that have been released to production 👀 Show PR Used for PRs that need a review, but can be merged when CI is green.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants