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

[lexical-markdown] set shouldMergeAdjacentLines default to be false #6660

Merged
merged 4 commits into from
Sep 26, 2024

Conversation

potatowagon
Copy link
Contributor

@potatowagon potatowagon commented Sep 24, 2024

Description

For backwards compatibility, setting default shouldMergeAdjacentLines = false to not introduce breaking change from the previous npm release.

Github Flavoured Markdown has the same behavior as shouldMergeAdjacentLines = false:

Screen.Recording.2024-09-24.at.2.19.03.PM.mov

Test plan

npm run test-unit
npm run test-e2e-chromium

Copy link

vercel bot commented Sep 24, 2024

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

Name Status Preview Comments Updated (UTC)
lexical ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 24, 2024 6:37am
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 24, 2024 6:37am

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 24, 2024
Copy link

github-actions bot commented Sep 24, 2024

size-limit report 📦

Path Size
lexical - cjs 29.85 KB (0%)
lexical - esm 29.66 KB (0%)
@lexical/rich-text - cjs 38.3 KB (0%)
@lexical/rich-text - esm 31.55 KB (0%)
@lexical/plain-text - cjs 36.9 KB (0%)
@lexical/plain-text - esm 28.86 KB (0%)
@lexical/react - cjs 40.04 KB (0%)
@lexical/react - esm 32.91 KB (0%)

@potatowagon
Copy link
Contributor Author

hi @GermanJablo please set shouldMergeAdjacentLines = true in your implementation to get the behavior in #6629

@GermanJablo
Copy link
Contributor

I wonder if it might be better to use a single prop like "GFM | Commonmark".

Right now, it's just one prop, but in the future, there could be many more for people targeting different specs. I don't think users will want to figure out the right combination of props to match their target spec.

For instance, when using MDX, you typically rely on plugins that handle different converters for each spec.

@potatowagon
Copy link
Contributor Author

potatowagon commented Sep 24, 2024

I wonder if it might be better to use a single prop like "GFM | Commonmark".

Right now, it's just one prop, but in the future, there could be many more for people targeting different specs. I don't think users will want to figure out the right combination of props to match their target spec.

For instance, when using MDX, you typically rely on plugins that handle different converters for each spec.

an enum for that would be nice, but likely would have to create a new api for that and mark the old one as deprecated, for backwards compatibilty. perhaps in a future PR. also would have to brainstorm what other flavours and variations there could be and how best to groupd them.

labelling this behavior as GFM would need more research as there could be differences we dont know yet

Copy link
Collaborator

@etrepum etrepum left a comment

Choose a reason for hiding this comment

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

LGTM, we should bias towards backwards compatibility here

@etrepum etrepum added the extended-tests Run extended e2e tests on a PR label Sep 26, 2024
@etrepum etrepum added this pull request to the merge queue Sep 26, 2024
Merged via the queue into main with commit 3f7dca7 Sep 26, 2024
70 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. extended-tests Run extended e2e tests on a PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants