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

Make root selectable + many other changes #1316

Merged
merged 6 commits into from
Feb 17, 2022
Merged

Conversation

trueadm
Copy link
Collaborator

@trueadm trueadm commented Feb 16, 2022

This PR does quite a few things to fundamentally improve how we handle selection:

  • Root nodes can now be selected
  • Decorator nodes can now be isolated from selection
  • Most elements can not be correctly removed
  • Selection can escape tables into the root
  • HorizontalRule is now a decorator rather than a core base node and works better

@vercel
Copy link

vercel bot commented Feb 16, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/fbopensource/lexical/8NQbdxhTMqbRNi3cff9ptoxDiRJZ
✅ Preview: https://lexical-git-make-root-selectable-fbopensource.vercel.app

@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 Feb 16, 2022
@trueadm trueadm force-pushed the make-root-selectable branch from cf6116c to 53c1d1a Compare February 17, 2022 16:00
@trueadm trueadm marked this pull request as ready for review February 17, 2022 16:09
@trueadm trueadm changed the title Make root selectable Make root selectable + many other changes Feb 17, 2022
More changes

fix e2e

Ensure HR has text content
Copy link
Member

@zurfyx zurfyx 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 probably let the iOS folks know about these changes since they've already mimicked a good part of this selection logic

@zurfyx
Copy link
Member

zurfyx commented Feb 17, 2022

Why do we need the Bootstrap plugin for now without params? Sounds like we should make them mandatory?

@trueadm
Copy link
Collaborator Author

trueadm commented Feb 17, 2022

Why do we need the Bootstrap plugin for now without params? Sounds like we should make them mandatory?

Where?

@zurfyx
Copy link
Member

zurfyx commented Feb 17, 2022

Why do we need the Bootstrap plugin for now without params? Sounds like we should make them mandatory?

Where?

export default function LexicalBootstrapPlugin({
  initialPayloadFn,
  clearEditorFn,
}: {
  clearEditorFn?: (LexicalEditor) => void,
  initialPayloadFn?: (LexicalEditor) => void,
}): React$Node {

@trueadm
Copy link
Collaborator Author

trueadm commented Feb 17, 2022

I didn't change them as part of this PR did I?

@trueadm trueadm merged commit 2a7bdd2 into main Feb 17, 2022
@trueadm trueadm deleted the make-root-selectable branch February 17, 2022 17:36
acywatson pushed a commit that referenced this pull request Apr 9, 2022
* Make root selectable

More changes

fix e2e

Ensure HR has text content

* Fix e2e test

* Fix tables

* See if this fixes the collab e2e tests...

* Aha!

* Fix some styling
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.

3 participants