-
Notifications
You must be signed in to change notification settings - Fork 69
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
Add payments activity widget emoji survey #8309
Conversation
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.
Code changes are looking good!
I've included some comments in areas where improvements could be made.
Test the buildOption 1. Jetpack Beta
Option 2. Jurassic Ninja - available for logged-in A12s🚀 Launch a JN site with this branch 🚀 ℹ️ Install this Tampermonkey script to get more options. Build info:
Note: the build is updated when a new commit is pushed to this PR. |
Size Change: +1.76 kB (0%) Total Size: 1.2 MB
ℹ️ View Unchanged
|
Nitpick - We should change the title of this PR to more accurately reflect the component's name. Payments Overview Widget is the parent component of which this PR's component is a part of. |
client/overview/survey/emoticons.js
Outdated
( rating === currentRating ? ' selected' : '' ); | ||
|
||
const getIcon = function () { | ||
if ( rating === '1' ) { |
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.
Considering the significant markup duplication in that function, I propose passing the unicode emoji text as a prop and retain only one instance of <span role="img" aria-label="emoticon">
.
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.
In addition, another thing we could do to here is have an object (similar to what we do in strings.tsx
files) where we map emoji IDs to the appropriate unicode text and use this function to just check the array to make sure rating is valid and render the span with the approriate unicode.
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.
changed in 2f32d7c thx!
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 for your work on this PR! I have left a few nitpicks and one minor comment (about translation)
Also I asked a question in slack related to the survey results p1710168340907879/1709737434.351679-slack-C03KTTK2YMA
could you please take a final look? I'll be happy to approve after that! 🚢
handover comments pepjwh-Ok-p2#comment-926 |
0f03609
to
1791f0d
Compare
Ah FFS I made a mess of this rebase |
7406ab0
to
1791f0d
Compare
Moved to #8506 to clean up the mess I made of the commit history. Commits have been cherry-picked to branch |
Changes proposed in this Pull Request
Emoji-based survey component to capture the user sentiment for the new Payments Overview Widget.
Todo
Testing instructions
wp option update _wcpay_feature_payment_overview_widget 1
in CLIpublic-api.wordpress.com
anddev-mc.a8c.com
to your sandbox's IP address if you didn't alreadyPayments -> Overview
MJ5lCh.mp4
npm run changelog
to add a changelog file, choosepatch
to leave it empty if the change is not significant. You can add multiple changelog files in one PR by running this command a few times.Post merge