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

feat(commands): Add smartToggleBulletList and smartToggleOrderedList #612

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

rfgamaral
Copy link
Member

@rfgamaral rfgamaral commented Jan 17, 2024

Overview

This PR adds 2 new toggle functions, one for the BulletList extension and another for the OrderedList extension, that smartly toggle paragraphs with hard breaks (i.e. newlines) into a bullet/ordered list.

This will help close this internal issue:

PR Checklist

Test plan

  • Open the preview Storybook deployed to Netlify
  • Open the Rich-text → Default story
  • Write some paragraphs, some with newlines, others without
  • Make a selection of those paragraphs (select everything, select them partially, etc.)
  • Click the Bullet List or Ordered List buttons in the editor toolbar
    • Observe that each selected paragraph and/or newline (even partially), is converted into a bullet/ordered list

Demo

BeforeAfter
firefox_srjvUDTAL0.mp4
firefox_b0z89Mf0Do.mp4

Copy link

netlify bot commented Jan 17, 2024

Deploy Preview for doist-typist ready!

Name Link
🔨 Latest commit ca5bbb8
🔍 Latest deploy log https://app.netlify.com/sites/doist-typist/deploys/65a82f6d9f666a0008772134
😎 Deploy Preview https://deploy-preview-612--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 self-assigned this Jan 17, 2024
@rfgamaral rfgamaral added the 🙋 Ask PR Used for PRs that need a review before merging. label Jan 17, 2024
@rfgamaral rfgamaral requested a review from gnapse January 17, 2024 17:03
@rfgamaral rfgamaral marked this pull request as ready for review January 17, 2024 17:04
@rfgamaral
Copy link
Member Author

rfgamaral commented Jan 17, 2024

That ✅ was fast ⚡😅

@gnapse
Copy link
Contributor

gnapse commented Jan 17, 2024

That ✅ was fast ⚡😅

I happen to saw the review request shortly after submitted, plus having the netlify deploy makes it super low friction to quickly review.

@rfgamaral rfgamaral force-pushed the ricardo/smart-list-toggle-commands branch from 50cb9aa to ca5bbb8 Compare January 17, 2024 19:50
@rfgamaral rfgamaral enabled auto-merge (squash) January 17, 2024 19:50
@rfgamaral rfgamaral merged commit e5dcc8b into main Jan 17, 2024
9 checks passed
@rfgamaral rfgamaral deleted the ricardo/smart-list-toggle-commands branch January 17, 2024 19:51
doistbot added a commit that referenced this pull request Jan 17, 2024
## [2.3.0](v2.2.1...v2.3.0) (2024-01-17)

### Features

* **commands:** Add `smartToggleBulletList` and `smartToggleOrderedList` ([#612](#612)) ([e5dcc8b](e5dcc8b))
@doistbot
Copy link
Member

🎉 This PR is included in version 2.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@doistbot doistbot added the released Pull requests that have been released to production label Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙋 Ask PR Used for PRs that need a review before merging. released Pull requests that have been released to production
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants