Skip to content

DateCalendar, DateRangeCalendar: move to private APIs #70681

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

Merged
merged 4 commits into from
Jul 11, 2025

Conversation

ciampo
Copy link
Contributor

@ciampo ciampo commented Jul 10, 2025

What?

Mark the DateCalendar and DateRangeCalendar components recently added in #70578 as private APIs of the @wordpress/components package, instead of being public.

cc @chihsuan

Why?

The components are initially needed by the @wordpress/dataviews package, which will serve as a testing ground for the components before eventually marking them as public.

How?

Tweaked how the components are exported — from the public index.ts file to the private-apis.ts file (exported behing lock call).

I also tweaked the relevant README and JSDocs.

Testing Instructions

  • Make sure that DateCalendar, DateRangeCalendar (and the TZDate utility) can't be imported directly from @wordpress/components
  • Make sure that they can be imported as private APIs by using the unlock function

@ciampo ciampo self-assigned this Jul 10, 2025
@ciampo ciampo added [Package] Components /packages/components [Type] Task Issues or PRs that have been broken down into an individual action to take labels Jul 10, 2025
@ciampo ciampo requested review from mirka, jsnajdr, aduth and a team July 10, 2025 15:24
@ciampo ciampo marked this pull request as ready for review July 10, 2025 15:24
@ciampo ciampo requested a review from ajitbohra as a code owner July 10, 2025 15:24
Copy link

github-actions bot commented Jul 10, 2025

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: aduth <aduth@git.wordpress.org>

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

Copy link

Flaky tests detected in dc31eea.
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/16199208379
📝 Reported issues:

Copy link
Member

@aduth aduth left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@ciampo ciampo merged commit fae8d6d into trunk Jul 11, 2025
82 of 84 checks passed
@ciampo ciampo deleted the feat/components-new-calendar-make-private branch July 11, 2025 05:57
@github-actions github-actions bot added this to the Gutenberg 21.3 milestone Jul 11, 2025
cbravobernal pushed a commit that referenced this pull request Jul 15, 2025
* DateCalendar, DateRangeCalendar: make private

* Auto-format .md

* CHANGELOG

* "export" -> "import" 😅
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Task Issues or PRs that have been broken down into an individual action to take
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants