Merged
Conversation
87f2330 to
8ef1153
Compare
igorschoester
commented
Feb 6, 2025
Comment on lines
+21
to
+25
| try { | ||
| return numberFormat.format( data ); | ||
| } catch ( e ) { | ||
| return data.toString( 10 ); | ||
| } |
Contributor
Author
There was a problem hiding this comment.
There can be errors if the setup is wrong, but currently this can not error (at least AFAIK).
But it seems nice to keep this in, unrelated to the numberFormat we get. Just that currently the catch has no test coverage.
igorschoester
commented
Feb 6, 2025
| * @param {import("../services/data-formatter")} dataFormatter The data formatter. | ||
| * @returns {function(?TopPageData[]): TopPageData[]} Function to format the top pages data. | ||
| */ | ||
| export const createTopPageFormatter = ( dataFormatter ) => ( data = [] ) => data.map( ( item ) => ( { |
Contributor
Author
There was a problem hiding this comment.
Exporting this just for easy use in the test 😅
a381ce9 to
e38fd01
Compare
|
A merge conflict has been detected for the proposed code changes in this PR. Please resolve the conflict by either rebasing the PR or merging in changes from the base branch. |
Base automatically changed from
420-create-frontend-data-provider-and-wp-implementation
to
trunk
February 10, 2025 07:40
* get the locale from the HTML tag * pass the data formatter in the widget factory * use the data formatter int he top pages widget * add tests # Conflicts: # packages/js/src/dashboard/services/widget-factory.js # packages/js/src/general/initialize.js
* ignore complexity in setup, don't think that will be nicer if spread out over more functions * add doc block in mock * decrease allowed warnings to be the same as the current amount
e38fd01 to
790b323
Compare
Pull Request Test Coverage Report for Build 23527d3e85b95e18e96cfffbdce3864bc740d719Warning: 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
💛 - Coveralls |
Contributor
|
CR & AC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Summary
This PR can be summarized in the following changelog entry:
Relevant technical choices:
langinstead of the WP user locale as this seems easier. No script data transfer needed and the WP user locale uses an underscore instead of a dash.Test instructions
Test instructions for the acceptance test before the PR gets merged
This PR can be acceptance tested by following these steps:
htmltag'lang). For example, in Dutch the separators are reversed (1,234.56 vs 1.234,56 in US)notAnalyzedif fed anything elseScreenshot
Without feature flag
Relevant test scenarios
Test instructions for QA when the code is in the RC
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
Other environments
[shopify-seo], added test instructions for Shopify and attached theShopifylabel to this PR.Documentation
Quality assurance
Innovation
innovationlabel.Fixes https://github.com/Yoast/reserved-tasks/issues/421