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

Export inclusive language csv contents #21987

Open
wants to merge 3 commits into
base: trunk
Choose a base branch
from

Conversation

rohans456
Copy link
Contributor

Context

  • GitHub action to generate the CSV file contents

Summary

This action would allow the creation of the CSV file contents with the inclusive language configuration. This action can be triggered from the GitHub interface.

This PR can be summarized in the following changelog entry:

Relevant technical choices:

  • YML, JavaScript

Test instructions

  1. Go to the "Actions" tab
  2. Select "Generate CSV" from the Workflow list
  3. Click on "Run workflow"
  4. Refresh the page and click on the run build
  5. Click on "run-commands" and wait for the process to complete
  6. The contents of the CSV file will be generated and displayed in the log.
  7. Copy and save the contents to a blank file and save in the csv format to see the actual content.

You can run a demo by visiting the workflow on this forked repository: https://github.com/rohans456/wordpress-seo/actions/workflows/generate_csv.yml

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

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.

QA can test this PR by following these steps:

Impact check

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

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 #

@rohans456 rohans456 requested a review from mhkuu January 22, 2025 13:27
@coveralls
Copy link

coveralls commented Jan 22, 2025

Pull Request Test Coverage Report for Build 25684be2df1ec3c3709d692487b889d1b619eb89

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-25.6%) to 29.002%

Totals Coverage Status
Change from base Build df0bc85d18ba1d1ee47d9e86c715107e398c9892: -25.6%
Covered Lines: 1308
Relevant Lines: 4510

💛 - Coveralls

Copy link
Contributor

@mhkuu mhkuu left a comment

Choose a reason for hiding this comment

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

Nice work, let's improve a little bit more by limiting the output further and adhering to the coding standards! 👍 Please also read https://yoast.atlassian.net/wiki/spaces/LIN/pages/2464317534/Development+DoD to further improve the pull request (e.g. add a label, add a changelog, etc.).

@@ -30,6 +30,7 @@
"build:types": "tsc",
"clean": "rm -rf build",
"pretest": "grunt get-premium-configuration",
"export:inclusive-language": "jest inclusiveLanguage",
Copy link
Contributor

Choose a reason for hiding this comment

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

Please make this more specific so that only the export is run.

if ( doExport ) {
writeToTempFile( "inclusive-language-database.csv", resultLines.join( "\n" ) );
console.log("result=== \n"+resultLines.join( "\n" ));
Copy link
Contributor

Choose a reason for hiding this comment

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

Please fix the formatting of this line, and temporarily disable the eslint rule that adds a warning for console.log statements (see https://stackoverflow.com/a/34215841).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants