Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
v0.13.0 (2024-01-24)
This version wraps up a major tables refactor, and includes some more bugfixes!
TableSelection
This version gets rid of
GridSelection
andGrid{Cell/Row/Table}Node
, you should now (exclusively) use the Table equivalents.Upgrade instructions (rename these in your codebase):
@lexical/table
as opposed to a mix betweenlexical
and@lexical/table
.GridSelection
->TableSelection
$isGridSelection
->$isTableSelection
LexicalTableSelection
->LexicalTableObserver
Cell
(type) ->TableDOMCell
Cells
(type) ->TableDOMRows
Grid
(type) ->TableDOMTable
LexicalTableSelection.grid
(the property) ->LexicalTableSelection.table
grid
in their name no longer do)Why?
When we started GridSelection, we wanted GridSelection to cater a variety of use cases rather than remain specific to the Tables implementation. Fast forward, 1+ years we still haven't found any additional use case that fits GridSelection (internally or within the community). Hence, we think this is an opportunity to trim down the Core bundle size by making GridSelection specific to Tables.
Custom selection
But it's not just a cleanup! We leveraged this opportunity to revise the basics of selection to enable anyone create their own custom selection (just like we did for tables). You can now build on top of BaseSelection and construct a selection of any type (i.e. a px based selection).
(...) append other stuff at the bottom