Automattic / gravatar-enhanced

An enhanced version of Gravatar for WordPress.
https://wordpress.org/plugins/gravatar-enhanced/
0 stars 0 forks source link

Woo: Account details avatar init #16

Closed lamosty closed 1 month ago

lamosty commented 1 month ago

In this PR, we add the initial version of the Gravatar and Gravatar Quick Editor integration in the Woo Account details page:

image

It adds your avatar above the Woo account navigation menu and after hovering over the avatar and clicking on it, it opens the quick editor where you can change the avatar.

Props @jcheringer for most of the work/code.

Testing instructions

Using a local WP site, install Woo. Navigate to /my-account/edit-account/ and make sure you can see either the default avatar or your based on the user email you have in your local WP setup. If you have some kind of non-existent email or a local one, it will show the default avatar.

johngodley commented 1 month ago

Ok, everything works as described although the avatar never seems to update on the WP site - it flashes a bit, but stays the same.

One final code comment: woocommerce_account_details_avatar. It's quite a long and wordy name, and the others are so short. Could we just use woocommerce instead?

lamosty commented 1 month ago

Thanks for the feedback.

One final code comment: woocommerce_account_details_avatar. It's quite a long and wordy name, and the others are so short. Could we just use woocommerce instead?

In https://github.com/Automattic/gravatar-enhanced/pull/17/files, I'm doing some refactoring of this function, shortening woocommerce to wc as it's done in Woo. Should I do it here or is it ok if it's done in the follow-up PR? That PR is for a new feature but I thought we should co-locate it inside the woocommerce folder.

lamosty commented 1 month ago

@johngodley fixed the feedback and also refactored the long name to "wc". Also changed the main name to my-account since this works under the whole My Account page, not just the Account Details subpage.

I modified the readme.txt with this new feature, also added it to the bottom changelog. Should I make some screenshot of the feature? How does previewing changes to readme.txt work? Under the Screenshots section, I see only this:

== Screenshots ==

1. Gravatar card on profile page
2. Avatar options
3. Gravatar block

but no pictures since this is a .txt file. Never developer a plugin before so asking for a friend.

lamosty commented 1 month ago

Thanks John!

Ah, I see. I couldn't reproduce the non-updating issue, but didn't try the proxy option. Great that you figured it out.