Skip to content

Collapsible enhancements - #4257

Merged
fantactuka merged 1 commit into
mainfrom
collapsible-updates
Apr 21, 2023
Merged

fantactuka merged 1 commit into
mainfrom
collapsible-updates

Conversation

@fantactuka

Copy link
Copy Markdown
Contributor

Better handling for up/down/left/right arrows to escape collapsible when it's the last/first element in the root/shadowroot

@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 Apr 3, 2023
@vercel

vercel Bot commented Apr 3, 2023 •

Copy link
Copy Markdown

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 Apr 21, 2023 4:01pm
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 21, 2023 4:01pm

@github-actions

github-actions Bot commented Apr 3, 2023 •

Copy link
Copy Markdown

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
packages/lexical/dist/Lexical.js 26.94 KB (0%) 539 ms (0%) 73 ms (+108.33% 🔺) 612 ms
packages/lexical-rich-text/dist/LexicalRichText.js 37.8 KB (0%) 757 ms (0%) 56 ms (-37.31% 🔽) 812 ms
packages/lexical-plain-text/dist/LexicalPlainText.js 37.78 KB (0%) 756 ms (0%) 51 ms (-14.51% 🔽) 807 ms

@ivailop7

ivailop7 commented Apr 3, 2023

Copy link
Copy Markdown
Collaborator

Hey @fantactuka, great stuff. Wanted to get your thoughts on #4187 on using a block cursor vs adding paragraphs or it's possible I've misunderstood the changes. Feel free to close this issue if you think it makes sense.

@fantactuka

Copy link
Copy Markdown
Contributor Author

Hey @fantactuka, great stuff. Wanted to get your thoughts on #4187 on using a block cursor vs adding paragraphs or it's possible I've misunderstood the changes. Feel free to close this issue if you think it makes sense.

As of now block cursor is only applicable to decorators and won't help much with elements since element node that has children won't receive selection (unlike decorators).

Comment thread package-lock.json

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Delete?

@ivailop7

ivailop7 commented Apr 8, 2023 •

Copy link
Copy Markdown
Collaborator

I discovered a small bug when playing with those changes, when it's the top node and the empty paragraph node is deleted using "delete" key, it deletes the collapsible section, but if "backspace" is used it deletes the empty paragraph correctly. Video below:
First deletion is using "delete", second deletion is using "backspace"

delete_vs_backspace.mp4

@fantactuka

Copy link
Copy Markdown
Contributor Author

I discovered a small bug when playing with those changes, when it's the top node and the empty paragraph node is deleted using "delete" key, it deletes the collapsible section, but if "backspace" is used it deletes the empty paragraph correctly. Video below:

I think it's a general issue, e.g., adding with Heading instead of collapsible and trying to press delete while on line just above it, it'll replace heading with regular paragraph

@ivailop7

Copy link
Copy Markdown
Collaborator

I discovered a small bug when playing with those changes, when it's the top node and the empty paragraph node is deleted using "delete" key, it deletes the collapsible section, but if "backspace" is used it deletes the empty paragraph correctly. Video below:

I think it's a general issue, e.g., adding with Heading instead of collapsible and trying to press delete while on line just above it, it'll replace heading with regular paragraph

You are right. To tackle for another day.

@ivailop7 ivailop7 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@fantactuka

Copy link
Copy Markdown
Contributor Author

I discovered a small bug when playing with those changes, when it's the top node and the empty paragraph node is deleted using "delete" key, it deletes the collapsible section, but if "backspace" is used it deletes the empty paragraph correctly. Video below:

I think it's a general issue, e.g., adding with Heading instead of collapsible and trying to press delete while on line just above it, it'll replace heading with regular paragraph

#4380 - addresses the issue

@fantactuka
fantactuka merged commit 0bc0e8a into main Apr 21, 2023
@fantactuka
fantactuka deleted the collapsible-updates branch April 21, 2023 20:20
This was referenced May 23, 2023

This branch was successfully deployed

2 active deployments
Preview – lexical-playground — f5e6329c Deployed Apr 21, 2023 by vercel[bot]
Preview – lexical — f5e6329c Deployed Apr 21, 2023 by vercel[bot]
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants