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

fix(rich-text-link): Change openOnClick default to whenNotEditable #744

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

rfgamaral
Copy link
Member

Overview

The goal of this change is to provide sane defaults for Typist., and in this case we take advantage of a new Link option in the latest Tiptap version where we can finally define that we want link clicks to NOT open when clicking them, but only when the editor is editable.

Tip

This allows us to remove the link: { openOnClick: false } configuration option that we pass to the RichTextKit.configure() call in most of our editor usages in both Todoist and Twist.

PR Checklist

Test plan

Note

I've written a test plan, but this is still a show PR because it's a very simple change.

  • Open the preview Storybook deployed to Netlify
  • Open the Rich-text → Default story
  • Add some text and some link
    • For instance, type doist.dev<space>
  • Click anywhere in the doist.dev text
    • Observe that the link does NOT open

@rfgamaral rfgamaral added the 👀 Show PR Used for PRs that need a review, but can be merged when CI is green. label Apr 15, 2024
@rfgamaral rfgamaral requested a review from a team April 15, 2024 11:17
@rfgamaral rfgamaral self-assigned this Apr 15, 2024
@rfgamaral rfgamaral requested review from gnapse and removed request for a team April 15, 2024 11:17
Copy link

netlify bot commented Apr 15, 2024

Deploy Preview for doist-typist ready!

Name Link
🔨 Latest commit 3c292b5
🔍 Latest deploy log https://app.netlify.com/sites/doist-typist/deploys/661d0d13853604000955a4e8
😎 Deploy Preview https://deploy-preview-744--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 force-pushed the ricardo/change-link-defaults branch from a85e66b to d13ab82 Compare April 15, 2024 11:17
@rfgamaral rfgamaral force-pushed the ricardo/change-link-defaults branch from d13ab82 to 3c292b5 Compare April 15, 2024 11:18
@rfgamaral rfgamaral changed the title feat(rich-text-link): Change openOnClick default to whenNotEditable fix(rich-text-link): Change openOnClick default to whenNotEditable Apr 15, 2024
@rfgamaral rfgamaral enabled auto-merge (squash) April 15, 2024 11:20
@rfgamaral rfgamaral merged commit db729d4 into main Apr 15, 2024
10 checks passed
@rfgamaral rfgamaral deleted the ricardo/change-link-defaults branch April 15, 2024 11:20
doistbot added a commit that referenced this pull request Apr 15, 2024
## [6.0.2](v6.0.1...v6.0.2) (2024-04-15)

### Bug Fixes

* **rich-text-link:** Change `openOnClick` default to `whenNotEditable` ([#744](#744)) ([db729d4](db729d4))
@doistbot
Copy link
Member

🎉 This PR is included in version 6.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@doistbot doistbot added the released Pull requests that have been released to production label Apr 15, 2024
Copy link
Contributor

@gnapse gnapse left a comment

Choose a reason for hiding this comment

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

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.

None yet

3 participants