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

Rename Twitter to X #21248

Merged
merged 18 commits into from Mar 27, 2024
Merged

Rename Twitter to X #21248

merged 18 commits into from Mar 27, 2024

Conversation

leonidasmi
Copy link
Contributor

@leonidasmi leonidasmi commented Mar 20, 2024

Context

  • We want to rename all user-facing references from Twitter, to X.
  • That incudes schema output, like sameAs attributes.

Summary

This PR can be summarized in the following changelog entry:

  • Renames all user-facing Twitter references to X, including the X profile's sameAs schema output URL.

Relevant technical choices:

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:


User's profile

  • Go to Users->Profile and in the Contact Info verify that we ask for X username (without @) instead of Twitter username (without @)
    image
  • Fill that field and make sure that you have at least one post assigned as an author, so that we can visit the author archive page.
  • In the author archive page, confirm that the sameAs attribute in the Person node in the schema has a x.com domain instead of a twitter.com domain
  • Go to Yoast SEO->Settings->Site representation and select Person and select the user you are currently
  • Go to the homepage and again confirm that the sameAs attribute in the Person node in the schema has a x.com domain instead of a twitter.com domain.
  • Check coming into this PR/RC with having a value previously stored with trunk/released version
    • Check that storing nothing again, changes the https://twitter.com/test value of the sameAs attribute to https://x.com/test
    • Check that going to that profile page, you're able to save without changing anything in the X field. Then, check that the frontend output hasn't changed.
    • Check that changing the value of the X field has the expected change in the frontend

Organization's profile

  • Go to the First Time configuration and select to represent an organization
  • Confirm that in the Social Profiles section, you see X mentioned instead of Twitter, including the label and placeholder of the relevant field:
    image
  • Add either https://x.com/test or https://twitter.com/test or test and store that. Confirm in the frontend that the sameAs attribute of the Organization node is https://x.com/test
  • Refresh the FTC page and confirm that the X field is populated with https://x.com/test
  • Go to Yoast SEO->Settings->Site representation and confirm that the X field in the Other profiles section is showing test
  • Add either https://x.com/test or https://twitter.com/test or test and store that. Confirm in the frontend that the sameAs attribute of the Organization node is https://x.com/test
  • Check coming into this PR/RC with having a value previously stored with trunk/released version
    • Check that storing nothing again, changes the https://twitter.com/test value of the sameAs attribute to https://x.com/test
    • Check that going to those FTC/settings pages, you're able to save without changing anything in the X field. Then, check that the frontend output hasn't changed.
    • Check that changing the value of the X field has the expected change in the frontend
  • Also confirm that searching for Social, Share, Tweet and now Twitter too, in the settings search, displays the Organization X instead of Organization Twitter
  • Also confirm that putting a wrong value in the X field, gives a The profile is not valid. Please use only 1-25 letters, numbers and underscores or enter a valid X URL. message and if you tried to save it like that, it would give a notice with the same message:
    image

Conflicting plugins

  • Install one of the plugins that are conflicting for open graph, like https://wordpress.org/plugins/opengraph/
  • Go to Yoast SEO->General and check the notification that was added
  • Confirm that it mentions X and not twitter in ...which might make Facebook, X, LinkedIn and other social networks use the wrong texts...:
    image

Twitter card data setting

  • In Yoast SEO->Settings->Features, we now have a X card data feature card, and not a Twitter card data feature card. It also mentions X instead of Twitter in its description:
    image
  • In that card also confirm that the Learn More link has an aria-lable mentioning X and not Twitter: Learn more about X card data (Opens in a new browser tab)
  • Also confirm that searching for Social, Share, Tweet and now Twitter too, in the settings search, displays the X card data instead of Twitter card data

Post publish sidebar

  • Go to the block editor and save a post
  • Confirm that the post-edit sidebar that appears shows the new X logo and references X instead of Twitter:
    image

X appearance in sidebar/metabox

  • Make sure you dont have Premium enabled

  • Go to either Block editor/Classic editor/Elementor editor

  • Go to the social tab in the metabox (for block and classic) or click the Social Media appearance in the sidebar (for block and elementor)

  • Confirm that the second tab is now named X appearance and not Twitter appearance

  • Open it and check that the fields are now called X Image, X Title and X description

  • Confirm that you see X share preview above the upsell. Also confirm that the Unlock with Yoast SEO Premium still links to https://yoa.st/social-preview-twitter
    image

  • Confirm the same with having the Open Graph feature disabled from Yoast settings:
    image

  • Activate Premium and confirm the same


AI Generator for Twitter

  • Activate Premium

  • Go to edit a post and go to the social appearance to add X title and description

  • When you click Use AI for the X title or description, confirm that the modal that opens has a AI X title generator title and above the preview it reads X preview.
    image

  • Do that for all editors

Relevant test scenarios

  • Changes should be tested with the browser console open
  • Changes should be tested on different posts/pages/taxonomies/custom post types/custom taxonomies
  • Changes should be tested on different editors (Default Block/Gutenberg/Classic/Elementor/other)
  • Changes should be tested on different browsers
  • Changes should be tested on multisite

Test instructions for QA when the code is in the RC

  • QA should use the same steps as above.

Impact check

This PR affects the following parts of the plugin, which may require extra testing:

  • Check that og: and twitter: meta tags are staying the same with this PR and without.
    • Check that with Premium both enabled and disabled
    • Check that, with Open graph feature enabled and disabled
    • Check that with all editors
  • Check that the AI generator for twitter is working as before
    • Check that the X preview is looking like before
    • An extra check is to check the Network tab to find the get_suggestions request and confirm that it has platform:"Twitter" parameter
    • Quickly smoke test the AI generator for the other social media and google as well.

UI changes

  • This PR changes the UI in the plugin. I have added the 'UI change' label to this PR.

Other environments

  • This PR also affects Shopify. I have added a changelog entry starting with [shopify-seo], added test instructions for Shopify and attached the Shopify label to this PR.

Documentation

  • I have written documentation for this change. For example, comments in the Relevant technical choices, comments in the code, documentation on Confluence / shared Google Drive / Yoast developer portal, or other.

Quality assurance

  • I have tested this code to the best of my abilities.
  • During testing, I had activated all plugins that Yoast SEO provides integrations for.
  • I have added unit tests to verify the code works as intended.
  • If any part of the code is behind a feature flag, my test instructions also cover cases where the feature flag is switched off.
  • I have written this PR in accordance with my team's definition of done.
  • I have checked that the base branch is correctly set.

Innovation

  • No innovation project is applicable for this PR.
  • This PR falls under an innovation project. I have attached the innovation label.
  • I have added my hours to the WBSO document.

Fixes https://github.com/Yoast/reserved-tasks/issues/115

@leonidasmi leonidasmi added UI change PRs that result in a change in the UI changelog: other Needs to be included in the 'Other' category in the changelog labels Mar 20, 2024
@leonidasmi leonidasmi force-pushed the 115-rename-twitter-references-to-x branch from ceaa869 to c8b4abc Compare March 20, 2024 07:05
@leonidasmi leonidasmi force-pushed the 115-rename-twitter-references-to-x branch from 83b17c4 to bd1d232 Compare March 21, 2024 11:22
Copy link

@leonidasmi Please be aware that following packages have been abandoned and are not actively maintained anymore:

Package name Path
yoast-components packages/yoast-components
@yoast/babel-preset packages/babel-preset
@yoast/components packages/components
@yoast/e2e-tests packages/e2e-tests
@yoast/helpers packages/helpers
@yoast/jest-preset packages/jest-preset
@yoast/style-guide packages/style-guide

Please consider using the other packages instead.

@leonidasmi leonidasmi force-pushed the 115-rename-twitter-references-to-x branch from fda7ddf to acbb68f Compare March 21, 2024 13:18
@coveralls
Copy link

coveralls commented Mar 22, 2024

Pull Request Test Coverage Report for Build 71788701a3cbada3a4c855b346a4e826f85af8e8

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 3 of 7 (42.86%) changed or added relevant lines in 7 files are covered.
  • 4 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.03%) to 53.81%

Changes Missing Coverage Covered Lines Changed/Added Lines %
admin/class-plugin-conflict.php 0 1 0.0%
packages/js/src/components/social/SocialUpsell.js 0 1 0.0%
packages/js/src/containers/TwitterEditor.js 0 1 0.0%
packages/js/src/elementor/containers/TwitterEditor.js 0 1 0.0%
Files with Coverage Reduction New Missed Lines %
src/helpers/current-page-helper.php 4 94.19%
Totals Coverage Status
Change from base Build e4b23415dd2e66b1e5482f71f63d07bf47f19510: 0.03%
Covered Lines: 29550
Relevant Lines: 55097

💛 - Coveralls

@leonidasmi leonidasmi force-pushed the 115-rename-twitter-references-to-x branch from a439a0f to f858760 Compare March 22, 2024 09:55
Copy link
Member

@igorschoester igorschoester left a comment

Choose a reason for hiding this comment

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

CR 🏗️

Found some more cases you skipped (ignoring code and code comments):

More debatable, we might want to check developer.yoast.com too? 😅

admin/class-admin.php Show resolved Hide resolved
admin/class-expose-shortlinks.php Show resolved Hide resolved
css/src/metabox.css Show resolved Hide resolved
tests/Unit/Helpers/Social_Profiles_Helper_Test.php Outdated Show resolved Hide resolved
tests/Unit/Helpers/Social_Profiles_Helper_Test.php Outdated Show resolved Hide resolved
tests/Unit/Generators/Schema/Person_Test.php Show resolved Hide resolved
packages/js/src/components/PostPublish.js Show resolved Hide resolved
@leonidasmi
Copy link
Contributor Author

leonidasmi commented Mar 26, 2024

The wordpress-seo/admin/class-yoast-input-validation.php one, the wordpress-seo/packages/js/src/first-time-configuration/tailwind-components/helpers/index.js one and the wordpress-seo/inc/options/class-wpseo-option-social.php I decided not to fix because it doesnt look like they're possible to be shown, so we wouldnt be able to test. And I decided not to remove them either, to keep the scope of the already sizeable PR, small. I could have documented this though, my bad. I'll create a technical debt task for all three, if you agree @igorschoester.

The wordpress-seo/packages/js/src/settings/helpers/validation.js one though I plainly missed it, so good catch! I'm fixing it and also re-scanning the repo to see if I missed something else, although between us I think we now have covered everything.

More debatable, we might want to check developer.yoast.com too?

I had decided to not change the name of that filter, obviously, but good spot on changing the comment of it, at least! And also yes, I think we have to scan developer.yoast.com as well 😟

@leonidasmi leonidasmi marked this pull request as ready for review March 26, 2024 13:22
Copy link
Member

@igorschoester igorschoester left a comment

Choose a reason for hiding this comment

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

AT ✅

@igorschoester igorschoester added this to the 22.5 milestone Mar 27, 2024
@igorschoester igorschoester merged commit 3b81340 into trunk Mar 27, 2024
37 checks passed
@igorschoester igorschoester deleted the 115-rename-twitter-references-to-x branch March 27, 2024 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: other Needs to be included in the 'Other' category in the changelog UI change PRs that result in a change in the UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants