fix: first block dragged from flyout will have same id #7788
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.
The basics
The details
Resolves
Fixes n/a
Proposed Changes
Previously in #7432 we added a
saveIds
parameter to block serialization so that we could have blocks in the flyout not save their id, that way all new blocks created would have a unique id, instead of having the same id as the block in the flyout.This PR keeps the option to disable saving block IDs during serialization, but it doesn't use the option when serializing flyout blocks. One of our partners was relying on the old behavior where the first block dragged from the toolbox had the same id as the original block in the toolbox.
Reason for Changes
Unblocking partners.
Test Coverage
We originally added this because our browser tests were searching for the
data-id
attribute on the page and assuming that only one block would match. We worked around that in the existing browser tests and never updated them after we added this feature so that block ids would never match, so none of the browser tests need to be changed. I tested this by running the browser tests before and after this PR, and actually fewer tests fail after... but that's just a result of flakiness, none of the failures are related to this issue.Documentation
n/a this behavior wasn't documented before and shouldn't be relied upon. if someone was relying on this undocumented behavior, then... this PR will also unblock them because however they were using it also probably broke in 10.3.
Additional Information
This will be included in the next patch release.