-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Add a blank space between the emoji and the message within a notice popup #35698
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
Conversation
| ), | ||
| } | ||
| ); | ||
| createNotice( 'success', `🎉 ${ noticeContent }`, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Github does not show the unicode character here which is [U+200E] and should be represented like 🎉[U+200E] ${ noticeContent }.
| ), | ||
| } | ||
| ); | ||
| createNotice( 'success', `🎉 ${ noticeContent }`, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as previous comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdperez86 there is a related issue that removes the duplicated copy Product published. View in store.. Could we handle it here? ( Remove the View in store.).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, so we can close this one
| 'Successfully moved product to Trash.', | ||
| 'woocommerce' | ||
| ); | ||
| createNotice( 'success', `🎉 ${ noticeContent }` ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as previous comment
Test Results SummaryCommit SHA: d8eeed3
To view the full API test report, click here. To view the full E2E test report, click here. To view all test reports, visit the WooCommerce Test Reports Dashboard. |
| status, | ||
| } ).then( | ||
| ( newProduct ) => { | ||
| const noticeContent = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick, if we move this inside the conditional (if ( ! skipNotice ) {) we will set the const noticeContent knowing that we will use it, otherwise, we could set it without using it later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right!!! thanks
octaedro
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job @mdperez86, this is testing well and code looks good. I just left a small suggestion, not a blocker at all, so I'll approve this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mdperez86. I left a small request from a related issue (copy removal).
LGTM
| ), | ||
| } | ||
| ); | ||
| createNotice( 'success', `🎉 ${ noticeContent }`, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdperez86 there is a related issue that removes the duplicated copy Product published. View in store.. Could we handle it here? ( Remove the View in store.).
AnnaMag
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
All Submissions:
Changes proposed in this Pull Request:
What happened here was that anytime we want to use an emoji as part of a text message inside of a notice the following happends:
We expect the message to looks like
🎉 Product successfully updated.but that string is converted to:
so any blank space between the image and the string literal is trimmed, resulting in
🎉Product successfully updated..To avoid this behaviour my suggestions here is to add an invisible charater + the blank space at the begining of the string literal
🎉[U+200E] Product successfully updated.to prevent the trimming process. So the rendered result should looks like:Note:
[U+200E]is an invisible unicode character and not a blank space.Closes #35541
Closes #35716
How to test the changes in this Pull Request:
Products -> Add New (MVP)page🎉 Product successfully updated.Other information:
pnpm --filter=<project> changelog add?FOR PR REVIEWER ONLY: