You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Splitting a block by hitting enter should retain the block ID for the initial block. #23335
When splitting a block using "Enter". If we had a block with clientID "a", we end up with two blocks with two new clientIds "b", "c". I think this is not great. Any third party plugin assinging meta data to blocks. Ideally, the original block clientId is retained during the whole lifecycle of an editing session unless the block is explicitely removed. I'd also expect that transforming blocks retains the IDs which it already does properly.
Sure, we can try to do this. Would you expect the client id to be preserved if the block type changes? In other words, do you expect block type and attributes to change for a given client id? This can sometimes be the case, for example if you split at the start of a heading. You could also argue that in this case the second block should get the client id, or even better, the block should remain unchanged and a new block should be inserted before it.
I think right now the transforms already retain the clientId when transforming. i don't think there's a magic rule that applies automatically, but a good tradeoff could be to just say the first block retains the id. Unless the first blocks is external (paste)
Activity
ellatrix commentedon Jun 21, 2020
Sure, we can try to do this. Would you expect the client id to be preserved if the block type changes? In other words, do you expect block type and attributes to change for a given client id? This can sometimes be the case, for example if you split at the start of a heading. You could also argue that in this case the second block should get the client id, or even better, the block should remain unchanged and a new block should be inserted before it.
youknowriad commentedon Jun 21, 2020
I think right now the transforms already retain the clientId when transforming. i don't think there's a magic rule that applies automatically, but a good tradeoff could be to just say the first block retains the id. Unless the first blocks is external (paste)
ZebulanStanphill commentedon Feb 24, 2021
Did #28505 fix this?
ellatrix commentedon Mar 1, 2021
Yes