Skip to content

Conversation

@gmjuhasz
Copy link
Contributor

@gmjuhasz gmjuhasz commented Nov 14, 2025

Related to Automattic/jetpack#45938

Proposed Changes

  • Remove maxLines: FEED_TEXT_MAX_LINES from Nextdoor preview component to allow full text display

Why are these changes being made?

The Nextdoor preview had a maxLines: 2 limit that was cutting off content when the excerpt contained Gutenberg block comments (e.g., <!-- wp:paragraph -->). These HTML comments were being counted as lines, causing the preview to only show the title and truncate the actual description.

Facebook's preview doesn't have this line limit and properly displays title + description despite having the same Gutenberg block comments in the excerpt. By removing the line limit from Nextdoor, it now behaves consistently with Facebook.

The maxChars: 160 limit is still in place for character truncation, which is the appropriate constraint.

Testing Instructions

For Jetpack Testing:

To test this change in Jetpack before it's published to npm, you need to link the local package:

  1. In wp-calypso/packages/social-previews/, run pnpm link --global
  2. In jetpack/projects/js-packages/publicize-components/, run pnpm link --global @automattic/social-previews
  3. In wp-calypso/packages/social-previews/, rebuild with yarn build (or use fswatch for auto-rebuild)
  4. In jetpack/, rebuild with jetpack build packages/publicize
  5. Don't forget to run pnpm unlink in Jetpack when done

Testing Steps:

Test with Automattic/jetpack#45938

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you tested accessibility for your changes?
  • Have you used memoizing on expensive computations?
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@github-actions
Copy link

github-actions bot commented Nov 14, 2025

@gmjuhasz gmjuhasz requested a review from a team November 14, 2025 15:32
@gmjuhasz gmjuhasz self-assigned this Nov 14, 2025
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Nov 14, 2025
@matticbot
Copy link
Contributor

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • help-center
  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug fix/social/remove-nextdoor-preview-limit on your sandbox.

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

Labels

[Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants