Skip to content

[MOOSE-372] FE: ServerSideRender should use named import#339

Open
GeoffDusome wants to merge 2 commits intomainfrom
fix/server-side-render-depreceation
Open

[MOOSE-372] FE: ServerSideRender should use named import#339
GeoffDusome wants to merge 2 commits intomainfrom
fix/server-side-render-depreceation

Conversation

@GeoffDusome
Copy link
Copy Markdown
Contributor

@GeoffDusome GeoffDusome commented Mar 31, 2026

What does this do/fix?

This pull request updates all blocks that use the ServerSideRender package to import it as a named import instead of a default import, following the deprecation of the default import. This change ensures compatibility with the latest WordPress package standards and prevents potential issues with future updates.

Refactoring imports for ServerSideRender:

  • Updated all usages of ServerSideRender across multiple block editor files to use named imports (import { ServerSideRender } from '@wordpress/server-side-render';) instead of default imports. This affects blocks such as announcement-renderer, icon-card, image-card, image-overlay-card, masthead-search, menu-toggle, post-card, related-posts, search-card, and terms (wp-content/themes/core/blocks/tribe/announcement-renderer/edit.js [1] wp-content/themes/core/blocks/tribe/icon-card/edit.js [2] wp-content/themes/core/blocks/tribe/image-card/edit.js [3] wp-content/themes/core/blocks/tribe/image-overlay-card/edit.js [4] wp-content/themes/core/blocks/tribe/masthead-search/edit.js [5] wp-content/themes/core/blocks/tribe/menu-toggle/edit.js [6] wp-content/themes/core/blocks/tribe/post-card/edit.js [7] wp-content/themes/core/blocks/tribe/related-posts/edit.js [8] wp-content/themes/core/blocks/tribe/search-card/edit.js [9] wp-content/themes/core/blocks/tribe/terms/edit.js [10] dev/templates/block/edit.js.mustache [11].
  • Documented this update in the CHANGELOG.md to note the migration to named imports for all blocks using the ServerSideRender package.

QA

Links to relevant issues

Dev Environment

Pull request checklist

  • I've added a changelog entry for these changes.
  • I've linked to a relevant Jira issue.
  • I've captured a screenshot or screencast of the changes and linked it above. N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant