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

Refactor ToolbarContext to TS #49002

Merged
merged 3 commits into from Mar 14, 2023

Conversation

mike-day
Copy link
Contributor

What?

Part of #35744.

Why?

This PR is needed as part of an effort to convert Toolbar and related Toolbar subcomponents to TypeScript.

How?

By converting ToolbarContext to TypeScript.

@mike-day
Copy link
Contributor Author

mike-day commented Mar 10, 2023

@mirka @ciampo in the continued effort to refactor Toolbar to TypeScript, here is an initial swing at ToolbarContext!

Comment on lines +11 to +13
const ToolbarContext = createContext< ToolbarStateReturn | undefined >(
undefined
);
Copy link
Contributor Author

@mike-day mike-day Mar 11, 2023

Choose a reason for hiding this comment

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

ToolbarStateReturn was used for this generic as it is the inferred type for toolbarState.

Please refer to ToolbarContainer.

@mirka mirka added this to In progress (owned) ⏳ in WordPress Components via automation Mar 13, 2023
@mirka mirka added the [Package] Components /packages/components label Mar 13, 2023
@mirka mirka requested review from mirka and ciampo March 13, 2023 16:45
Copy link
Contributor

@chad1008 chad1008 left a comment

Choose a reason for hiding this comment

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

Makes sense and looks good to me, but I'll let @ciampo / @mirka handle approval... they both know reakit better than I do.

@mike-day can you add a CHANGELOG entry for this when you get a chance?

@mike-day
Copy link
Contributor Author

@mike-day can you add a CHANGELOG entry for this when you get a chance?

Done with 3f945fd. Thanks @chad1008!

Copy link
Member

@mirka mirka left a comment

Choose a reason for hiding this comment

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

Looks good to me as well 🚀

@mirka mirka enabled auto-merge (squash) March 14, 2023 15:19
@mirka mirka merged commit dafb94c into WordPress:trunk Mar 14, 2023
43 of 44 checks passed
WordPress Components automation moved this from In progress (owned) ⏳ to Done 🎉 Mar 14, 2023
@github-actions github-actions bot added this to the Gutenberg 15.4 milestone Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants