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

fix(field-*): Remove unneeded fieldRegistry.unregister calls #2454

Merged
merged 3 commits into from
Sep 26, 2024

Conversation

cpcallen
Copy link
Contributor

@cpcallen cpcallen commented Sep 2, 2024

The basics

The details

Fixes #2194.

Proposed Changes

Remove unneeded fieldRegistry.unregister calls from plugins/field-angle, field-colour and field-multilineinput's register functions.

Also remove the unregisterBlocks test helper functions, which are no longer needed for similar reasons.

Reason for Changes

Since FieldAngle, FieldColour and FieldMultilineInput are no longer in core, there's no longer any need for their corresponding plugins to unregister the built-in version.

@cpcallen cpcallen added category: plugin Anything in the plugins folder developer experience labels Sep 2, 2024
@cpcallen cpcallen requested a review from a team as a code owner September 2, 2024 13:58
@cpcallen cpcallen requested review from rachel-fenichel and removed request for a team September 2, 2024 13:58
@rachel-fenichel
Copy link
Collaborator

I'd like to hold this change until #2453 goes in. I actually started working on this and went sideways into #2453 because I could not test the changes in multiple plugins with the lerna commands that I expected.

@rachel-fenichel
Copy link
Collaborator

This PR fixes part of #2194. I think you should also fix the other todos so we can close the issue entirely; all are marked with the issue number.

@cpcallen cpcallen marked this pull request as draft September 3, 2024 17:47
@cpcallen
Copy link
Contributor Author

cpcallen commented Sep 3, 2024

This PR fixes part of #2194. I think you should also fix the other todos so we can close the issue entirely; all are marked with the issue number.

OK. I did this bit unaware of the cleanup issue because it had come up in the forum as the warnings appear to be causing developer concern.

@cpcallen cpcallen closed this Sep 11, 2024
@cpcallen cpcallen deleted the fix/plugins-no-unregister branch September 11, 2024 09:18
Since FieldAngle, FieldColour and FieldMultilineInput are no longer
in core, there's no longer any need for their corresponding plugins
to unregister the built-in version.
For some reason the last time we ran publish, the publish commit
7d3e23f removed all the trailing newlines from our
package-lock.json files.

In google#2453 rachel-fenichel proposes adding these files to our
.prettierignore.rc, but for now I'll just fix the files so that
the format check passes.
@cpcallen cpcallen restored the fix/plugins-no-unregister branch September 11, 2024 11:06
@cpcallen cpcallen reopened this Sep 11, 2024
@cpcallen cpcallen marked this pull request as ready for review September 11, 2024 11:41
@cpcallen
Copy link
Contributor Author

OK, the history of this PR is pretty chaotic due to Git-fu (and more particularly GitHub-fu) shortcomings on my part, but the code is now ready for review and now deals with all all remaining instances of 2194 in samples.

@cpcallen cpcallen merged commit b3ba30e into google:master Sep 26, 2024
8 checks passed
@cpcallen cpcallen deleted the fix/plugins-no-unregister branch September 26, 2024 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: plugin Anything in the plugins folder developer experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cleanup after deleting blocks and fields from core
2 participants