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(markdown): action_item in list by markdown #3872

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

tomdyqin
Copy link
Contributor

Checklist

  • yarn typecheck
  • yarn lint:fix
  • yarn test
  • yarn brl
  • yarn changeset
  • ui changelog

fix: #3871

Copy link

codesandbox bot commented Dec 19, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

changeset-bot bot commented Dec 19, 2024

⚠️ No Changeset found

Latest commit: 28a5109

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

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

Click here to learn what changesets are, and how to add one.

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

Copy link

vercel bot commented Dec 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
plate ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 24, 2024 7:08am

@felixfeng33
Copy link
Collaborator

Could take a look the ci error?

@@ -80,10 +80,14 @@ export const remarkDefaultElementRules: RemarkElementRules = {
indent = 1
) => {
_node.children?.forEach((listItem) => {
const defaultType = options.editor.getType({ key: 'p' });
const todoListType = options.editor.getType({ key: 'action_item' }) ?? defaultType
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for the PR! We don't use TodoListPlugin with indent list, hence it can't be in this if (options.indentList) condition. Would love a unit test!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Firstly, I would like to confirm whether TodoListPlugin will be applied in the indentList? Why are there no checks for mutually exclusive plugins, such as indentListPlugin and listPlugin

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm sorry to say that it took me some time to understand the relationship between indentListPlugin and listPlugin, but my user data has been contaminated and I have to go extra and clean up the old data

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I may have made the same mistake again. I didn't understand the connection between todoPlugin and indentList, and I have been confused about why there is a checked judgment in indentList. So, please clearly tell me that indentList=list+todoPlugin

Copy link
Member

@zbeyens zbeyens Dec 24, 2024

Choose a reason for hiding this comment

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

Either use https://platejs.org/docs/list or https://platejs.org/docs/indent-list, both have their own to-do list implementation

@zbeyens zbeyens marked this pull request as draft December 21, 2024 11:13
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.

markdown task list not transform to todolist
3 participants