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

Publicize: make the default social media message blank #21477

Merged
merged 6 commits into from
Oct 29, 2021

Conversation

alshakero
Copy link
Member

@alshakero alshakero commented Oct 20, 2021

Currently, the Publicize message field has the following placeholder

Write a message for your audience here. If you leave this blank, we’ll use an excerpt of the post content as the message.“.

While in reality we use the post title.

I realize this solution is hard to make perfect in every language, but I think it's good enough. If you think it's not, changing the placeholder or leaving the default message empty might be more fool-proof solutions.

Fixes Automattic/wp-calypso#57144 and #21530

Changes proposed in this Pull Request:

This PR proposes making it blank.

Does this pull request change what data or activity we track or use?

No.

Testing instructions:

  1. Using the Jetpack link below, create a new long-ish post.
  2. Click publish, the default message contents should be blank.
  3. You should be able to modify the message.
  4. Twitter threads should still use the post title.

@matticbot
Copy link
Contributor

Caution: This PR has changes that must be merged to WordPress.com
Hello alshakero! These changes need to be synced to WordPress.com - If you 're an a11n, please commandeer and confirm D68773-code works as expected before merging this PR. Once this PR is merged, please commit the changes to WP.com. Thank you!
This revision will be updated with each commit to this PR

@alshakero alshakero changed the title Use truncated post content as default Publicize message Publicize: use truncated post content as default Publicize message Oct 20, 2021
@github-actions github-actions bot added [Extension] Publicize Block editor plugin [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ labels Oct 20, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Oct 20, 2021

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ⚠️ All commits were linted before commit.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped.
Then, add the "[Status] Needs Team review" label and ask someone from your team review the code.
Once you’ve done so, switch to the "[Status] Needs Review" label; someone from Jetpack Crew will then review this PR and merge it to be included in the next Jetpack release.


Jetpack plugin:

  • Next scheduled release: November 2, 2021.
  • Scheduled code freeze: October 25, 2021.

@github-actions github-actions bot added the [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! label Oct 20, 2021
@alshakero alshakero force-pushed the fix/default-post-message branch from 57ea2f6 to 537c7ec Compare October 20, 2021 19:20
@alshakero alshakero removed the [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! label Oct 20, 2021
@github-actions github-actions bot added the [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! label Oct 20, 2021
@alshakero alshakero added the [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. label Oct 20, 2021
@jeherve
Copy link
Member

jeherve commented Oct 21, 2021

This is a bit tricky, as the end result depends on the platform.

On Facebook for example (one of our most popular Publicize options), if you leave that field empty we will use the excerpt.

Screenshot 2021-10-21 at 9 24 53

Screenshot 2021-10-21 at 9 23 54

I'll cc @pablinos, who's been working on quite a few improvements to this interface in the past few weeks.

@pablinos
Copy link
Contributor

Yes, we've been considering this a little. I've been starting to think that we should leave the textbox blank because, as @jeherve mentions, the default message changes based on the network being shared to. It would also simplify things as we have code in place to work out if the message has been edited or not.

I'd prefer that we shorten the message to something like, "Write a message for your audience here" and rely on some other help to let people know the message that we'll use. We can also rely on on the social previews feature, although that might need updating to make sure that it's a true preview.

@jeherve jeherve removed the [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. label Oct 25, 2021
@alshakero alshakero changed the title Publicize: use truncated post content as default Publicize message Publicize: make the default Publicize message blank Oct 26, 2021
@alshakero alshakero force-pushed the fix/default-post-message branch from d7c9c7f to 5d9d1ef Compare October 26, 2021 12:14
@alshakero alshakero changed the title Publicize: make the default Publicize message blank Publicize: make the default social media message blank Oct 26, 2021
@alshakero alshakero added [Status] In Progress [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. and removed [Status] In Progress [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! labels Oct 26, 2021
@alshakero
Copy link
Member Author

This is ready for review!

@retrofox
Copy link
Contributor

This is ready for review!

it seems the testing instructions are not updated according to the latest changes. Is it right?

@jeherve jeherve requested a review from retrofox October 26, 2021 16:10
@jeherve jeherve added this to the jetpack/10.4 milestone Oct 26, 2021
@jeherve jeherve requested a review from pablinos October 26, 2021 16:10
retrofox
retrofox previously approved these changes Oct 26, 2021
Copy link
Contributor

@retrofox retrofox left a comment

Choose a reason for hiding this comment

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

before after
image image
  • Confirmed that when the post doesn't have a publicized message, the text is taken from the post title for Twitter accounts
  • It's possible to edit the publicized message via the text control

@retrofox retrofox added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Oct 26, 2021
@alshakero alshakero force-pushed the fix/default-post-message branch from 3d6ae05 to 6bca5cd Compare October 27, 2021 09:09
@alshakero alshakero added the [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. label Oct 27, 2021
@alshakero
Copy link
Member Author

Hi! This just needs another approval after rebase.

@retrofox
Copy link
Contributor

Hi! This just needs another approval after rebase.

Accepted. :-)
you might like to merge with master instead of rebasing in order to do not lose the ✅ , just FYI

@jeherve jeherve removed the [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. label Oct 27, 2021
Comment on lines +265 to +268
if ( isTweetStorm() ) {
if ( postTitle ) {
return postTitle.substr( 0, getShareMessageMaxLength() ) + DEFAULT_TWEETSTORM_MESSAGE;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we still need this if we're relying on the back end to create the default message? Without the hasEditedShareMessage logic, this text will look like it has been added by the user, and will be used when sharing the message. That might not be an issue as long as it's in sync with whatever would be produced server side.

Copy link
Member Author

Choose a reason for hiding this comment

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

That's interesting! I didn't know the server side generated the message. I'm not too familiar with this, do you think I should remove this check? Looking at this code, it does seem like this JS code is redundant.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, that's what I'm thinking, although I notice the default there doesn't include the post title. We probably need to run some tests, but it would make sense to have all this logic in one place.

If we need to, we could add the title of the post to the default custom message.

We could merge this and deal with the tweetstorm logic as a separate change.

@alshakero alshakero merged commit 351cd5b into master Oct 29, 2021
@alshakero alshakero deleted the fix/default-post-message branch October 29, 2021 09:53
@github-actions github-actions bot removed the [Status] Ready to Merge Go ahead, you can push that green button! label Oct 29, 2021
@github-actions
Copy link
Contributor

Great news! One last step: head over to your WordPress.com diff, D68773-code, and commit it.
Once you've done so, come back to this PR and add a comment with your changeset ID.

Thank you!

@alshakero
Copy link
Member Author

r234186-wpcom

davidlonjon added a commit that referenced this pull request Nov 2, 2021
…ng-formatting

* master:
  docker: Add script to create "fake" translations for testing i18n (#21407)
  Add webpack-config package (#21482)
  Update dependency composer/semver to v3.2.6 (#21608)
  Update dependency eslint-plugin-import to v2.25.2 (#21607)
  Update JS unit testing packages (#21605)
  Admin page: Fix pricing/currency displayed on the upgrade page (#21594)
  Update dependency @rollup/plugin-node-resolve to v13.0.6 (#21599)
  Publicize: Add new publicize icon toggle component (#20957)
  Search: hide search menu for atomic sites (#21565)
  Allow /wp/v2/sites/1234/batch endpoint to process widget updates (#21549)
  tooling: Add `.mjs` as a JavaScript extension (#21589)
  Jetpack: PHPCS src/class-tracking (#21583)
  Publicize: make the default social media message blank (#21477)
davidlonjon added a commit that referenced this pull request Nov 2, 2021
* master:
  docker: Add script to create "fake" translations for testing i18n (#21407)
  Add webpack-config package (#21482)
  Update dependency composer/semver to v3.2.6 (#21608)
  Update dependency eslint-plugin-import to v2.25.2 (#21607)
  Update JS unit testing packages (#21605)
  Admin page: Fix pricing/currency displayed on the upgrade page (#21594)
  Update dependency @rollup/plugin-node-resolve to v13.0.6 (#21599)
  Publicize: Add new publicize icon toggle component (#20957)
  Search: hide search menu for atomic sites (#21565)
  Allow /wp/v2/sites/1234/batch endpoint to process widget updates (#21549)
  tooling: Add `.mjs` as a JavaScript extension (#21589)
  Jetpack: PHPCS src/class-tracking (#21583)
  Publicize: make the default social media message blank (#21477)
davidlonjon added a commit that referenced this pull request Nov 2, 2021
* master: (40 commits)
  docker: Add script to create "fake" translations for testing i18n (#21407)
  Add webpack-config package (#21482)
  Update dependency composer/semver to v3.2.6 (#21608)
  Update dependency eslint-plugin-import to v2.25.2 (#21607)
  Update JS unit testing packages (#21605)
  Admin page: Fix pricing/currency displayed on the upgrade page (#21594)
  Update dependency @rollup/plugin-node-resolve to v13.0.6 (#21599)
  Publicize: Add new publicize icon toggle component (#20957)
  Search: hide search menu for atomic sites (#21565)
  Allow /wp/v2/sites/1234/batch endpoint to process widget updates (#21549)
  tooling: Add `.mjs` as a JavaScript extension (#21589)
  Jetpack: PHPCS src/class-tracking (#21583)
  Publicize: make the default social media message blank (#21477)
  Photon: do not serve Wikipedia images from CDN. (#21572)
  Publicize: update endpoint (#21510)
  [Plugin] Backup: Update initial backup screen (#21559)
  RNA Connect Screen: Remove unused files (#21570)
  RNA Connection: Add ConnectScreenRequiredPlan Component (#21521)
  Update PHPUnit coverage configs (#21557)
  cli: Fix skeleton phpunit config (#21555)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Extension] Publicize Block editor plugin [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ Touches WP.com Files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Publicize isn't posting the custom exceprt to LinkedIn and instead posting truncated post content
5 participants