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

CustomSelectControlV2: expose legacy wrapper through private APIs #62936

Merged

Conversation

ciampo
Copy link
Contributor

@ciampo ciampo commented Jun 27, 2024

What?

Part of #55023

Make the CustomSelectControl V2 legacy wrapper available via the component package's private APIs

Why?

So that we can start experimenting with using the new V2 legacy wrapper instead of V1 in the editor, as we prepare for swapping V1 implementation with the V2 legacy wrapper implementation

How?

By exporting the component via locked APIs

Testing Instructions

Make sure that it is possible to import the component via the unlock function from other packages.

Copy link

Flaky tests detected in 33d06ce.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/9700511869
📝 Reported issues:

@ciampo ciampo force-pushed the feat/custom-select-control-v2-legacy-expose-private-api branch from 33d06ce to 4f1ccb3 Compare July 2, 2024 17:16
@ciampo ciampo marked this pull request as ready for review July 2, 2024 17:19
@ciampo ciampo requested a review from ajitbohra as a code owner July 2, 2024 17:19
@ciampo ciampo requested a review from a team July 2, 2024 17:19
Copy link

github-actions bot commented Jul 2, 2024

Warning: Type of PR label mismatch

To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.

  • Type-related labels to choose from: [Type] Automated Testing, [Type] Breaking Change, [Type] Bug, [Type] Build Tooling, [Type] Code Quality, [Type] Copy, [Type] Developer Documentation, [Type] Enhancement, [Type] Experimental, [Type] Feature, [Type] New API, [Type] Task, [Type] Technical Prototype, [Type] Performance, [Type] Project Management, [Type] Regression, [Type] Security, [Type] WP Core Ticket, Backport from WordPress Core.
  • Labels found: [Package] Components, [Type] Iteration.

Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task.

Copy link

github-actions bot commented Jul 2, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: tyxla <tyxla@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@ciampo ciampo self-assigned this Jul 2, 2024
@ciampo ciampo added [Package] Components /packages/components [Type] Iteration Scoped iteration of an effort from a tracking issue or overview issue ideally for a major release. labels Jul 2, 2024
@ciampo ciampo force-pushed the feat/custom-select-control-v2-legacy-expose-private-api branch from 4f1ccb3 to 0a556c4 Compare July 2, 2024 17:21
Copy link
Member

@tyxla tyxla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Just a minor thought on the naming choice.

@@ -39,6 +40,7 @@ lock( privateApis, {
CompositeItemV2,
CompositeRowV2,
useCompositeStoreV2,
CustomSelectControlV2LegacyWrapper,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naming nit: is this really a wrapper though? Since the legacy component isn't really a wrapper as part of a composable component group, but rather a monolithic component, I'd prefer naming this CustomSelectControlV2Legacy or CustomSelectControlV2LegacyAdapter since Wrapper implies a wrapper component in the same way the Tabs parent component wraps the rest of the subcomponents.

No strong feelings about it, but I feel like others might potentially be confused by that naming.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, pushed an update

@ciampo ciampo enabled auto-merge (squash) July 3, 2024 14:20
@ciampo ciampo merged commit 891ef74 into trunk Jul 3, 2024
62 checks passed
@ciampo ciampo deleted the feat/custom-select-control-v2-legacy-expose-private-api branch July 3, 2024 14:54
@github-actions github-actions bot added this to the Gutenberg 18.8 milestone Jul 3, 2024
carstingaxion pushed a commit to carstingaxion/gutenberg that referenced this pull request Jul 18, 2024
…rdPress#62936)

* CustomSelectControlV2: expose legacy wrapper through private APIs

* CHANGELOG

* Rename export to `CustomSelectControlV2Legacy`

---

Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: tyxla <tyxla@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Iteration Scoped iteration of an effort from a tracking issue or overview issue ideally for a major release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants