Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 

Repository files navigation

A301-CodePath

CodePath X Github Open-source contribution

Contribution [#5003]: Notification center: review the messages strings

Contribution Number: [1]
Student: Imran (NYAN LIN ZAW)
Issue: Yoast/wordpress-seo#5003
Status: Phase III – Complete (Issue Resolved Upstream)


Fork link: https://github.com/MImran2002/wordpress-seo.git

Why I Chose This Issue

I chose this issue because it combines front-end usability, accessibility and responsive design. While the technical change itself appears relatively small, it addresses a broader software engineering principle: content and presentation should be separated whenever possible.

I am also interested in learning more about how WordPress plugins handle localization and responsive interfaces. Since Yoast SEO is widely used in production environments, this issue provides an opportunity to contribute to a open-source codebase I am comfortable while improving my understanding of maintainable UI and translation practices.


Understanding the Issue

Problem Description

Several notification center messages are constructed using two separate translatable strings joined together with a forced HTML line break (<br />). This implementation can reduce translation quality because translators receive fragmented context instead of a complete message. It also creates layout issues when notifications are displayed on smaller screens.

Expected Behavior

Notification messages should be represented as a single translatable string that can wrap naturally according to the available screen width. Translators should receive the entire message as one unit, improving clarity and consistency across languages.

Current Behavior

Some notifications are built from multiple strings separated by a <br /> tag. The forced line break creates unnecessary layout constraints and can result in awkward formatting on responsive layouts.

Affected Components

Based on issue discussion, the following functions were identified as locations where the problem still exists:

  • page_comments_notice()
  • permalink_notice()

Additional occurrences may exist and should be identified during implementation.


Reproduction Process

Environment Setup

Operating System: Windows 11

PHP Version: 8.3.31

WordPress Version: Not yet installed (environment preparation phase)

Node Version: v24.15.0

Composer Version: 2.10.1

Setup Notes:

  • Forked the Yoast SEO repository and cloned it locally for development.
  • Verified the required development tools listed in the project documentation. While Git and Node.js were already installed, PHP, Composer, Yarn, and Grunt were missing from my local environment.
  • Installed PHP 8.3 on Windows using Winget. During installation, PHP was successfully installed but was not reachable through PowerShell because the executable path was not automatically connected. I investigated the installation directory, manually identified the PHP executable location, and updated the environment PATH so that PHP commands could be executed from the terminal.
  • Attempted to install Composer but encountered failures when downloading packages through HTTPS. Investigation using php --ini revealed that PHP was running without an active configuration file. I copied and configured a php.ini file from php.inidevelopment and enabled the required extensions, including OpenSSL, cURL, MBString, FileInfo, and ZIP by uncommenting. These extensions were necessary for secure package downloads, dependency management, and archive extraction during installation.
  • Installed Composer and verified the installation using Composer diagnostic tools. Composer dependency installation initially failed due to missing ZIP support and additional PHP configuration issues, which were resolved by enabling the appropriate extensions and validating the PHP environment.
  • Installed the project dependencies using Composer and reviewed the dependency installation process to better understand the project's build workflow.
  • Encountered additional build failures during Yoast SEO's dependency prefixing stage.
  • Examined the repository's composer.json configuration and identified that the build process specifies PHP 7.4 compatibility requirements for parts of the dependency pipeline. This investigation helped explain the failures occurring within Symfony Finder and PHP-Scoper.
  • Through troubleshooting these issues, I gained experience with PHP environment configuring, Composer management, WordPress plugin development, and debugging compatibility issues in large open-source projects.
  • Successfully completed the environment setup process and began investigating the notification center components related to Issue #5003.

Steps to Reproduce

  1. Install and activate the Yoast SEO plugin.
  2. Configure WordPress to trigger notification center recommendations.
  3. Open the notification center.
  4. Inspect notification messages generated by page_comments_notice() and permalink_notice().
  5. Observe that messages are split using multiple strings and forced line breaks.

Reproduction Evidence

  • Commit showing reproduction: N/A
  • Screenshots/logs: Environment setup logs and successful local WordPress installation with Yoast SEO activated.
  • Needed wordpress to run the plugin:
    • image
  • Log in activating the plug-in:
    • image
  • My findings: While preparing to reproduce the issue, I reviewed the issue discussion, investigated the affected notification center components, and successfully configured a local development environment. During this process, I discovered that Issue #5003 had already been resolved and merged by the Yoast SEO maintainers. As a result, the original behavior described in the issue could no longer be reproduced in the current codebase.
  • Issue being closed: Yoast/wordpress-seo#5003

Solution Approach

Analysis

The root cause appears to be that notification messages are constructed using multiple translation strings joined together with HTML line breaks.

Proposed Solution

No implementation was performed because the issue had already been resolved in the upstream repository before local development and reproduction were completed.

Implementation Plan

Understand

Reviewed the issue discussion and examined the rationale behind the requested change.

Match

Identified the notification center components and functions referenced by maintainers and contributors.

Plan

Prepared a local WordPress and Yoast SEO development environment to reproduce the issue and implement a fix.

Implement

No implementation was necessary because the issue had already been resolved.

Review

Verified the current repository state and reviewed the existing implementation.

Evaluate

Confirmed that the issue was no longer reproducible and that the upstream solution addressed the reported concerns.


Testing Strategy

Unit Tests

Not applicable. No code modifications were made because the issue had already been resolved.

Integration Tests

Verified that Yoast SEO could be successfully installed, built, activated, and executed within a local WordPress environment.

Manual Testing

Reviewed the current notification center behavior and confirmed that the original issue could not be reproduced in the latest codebase.


Implementation Notes

Week 1 Progress

  • Reviewed Issue #5003 and related discussion.
  • Identified rationale for removing forced line breaks.
  • Located affected functions from issue comments.
  • Began reproducing issue locally.

Week 2 Progress

  • Forked the repository and created a local development environment.
  • Installed PHP, Composer, and project dependencies.
  • Troubleshot environment configuration, dependency installation, and PHP compatibility issues.
  • Reviewed Issue #5003 and related discussion.
  • Identified the rationale for removing forced line breaks from translatable strings.
  • Investigated the notification rendering workflow and began reproducing the issue locally.
  • Successfully configured the development environment and prepared the project for contribution.

Week 3 Progress

  • Successfully configured a complete local WordPress development environment using LocalWP.
  • Installed and activated Yoast SEO locally.
  • Built the project using Composer, Yarn, and Grunt.
  • Investigated the notification center implementation.
  • Determined that Issue #5003 had already been resolved upstream before implementation work began.

Code Changes

  • Files modified: None.
  • Key commits: None.
  • Approach decisions: Chose not to introduce redundant changes after confirming that the issue had already been resolved in the current codebase.

Pull Request

PR Link: [GitHub PR URL]

PR Description

Maintainer Feedback

Status: Awaiting Review


Learnings & Reflections

Technical Skills Gained

  • WordPress plugin development workflow.
  • Composer dependency management and troubleshooting.
  • JavaScript asset compilation using Yarn and Grunt.
  • PHP compatibility debugging and dependency resolution.
  • Local WordPress environment configuration using LocalWP.
  • Open-source contribution workflows including issue analysis, environment setup, repository forking, and codebase investigation.

Challenges Overcome

  • Installed and configured a PHP development environment on Windows.
  • Resolved PATH and command-line configuration issues for PHP.
  • Enabled required PHP extensions, including OpenSSL and ZIP.
  • Installed and configured Composer for dependency management.
  • Learned the dependency management and build workflow used by a large production WordPress plugin.
  • Successfully built and activated a large production WordPress plugin locally.
  • Investigated a completed issue and verified its resolution through local testing.

What I'd Do Differently Next Time

Before investing significant effort into environment setup and reproduction, I would verify whether the issue is still open and actively available for contribution. I would also identify a backup issue early in the process so that development work can continue if the original issue is resolved by another contributor.

Resources Used

  • Yoast SEO Issue #5003
  • Claude Code

About

CodePath X Github Open-source contribution

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors