Automattic / Gravatar-SDK-iOS

Gravatar SDK is a Swift library that allows you to integrate Gravatar features into your own iOS applications.
https://gravatar.com
Mozilla Public License 2.0
36 stars 1 forks source link

Add some avatar customization options in ProfileViewConfiguration #270

Closed pinarol closed 3 months ago

pinarol commented 3 months ago

Closes #245

Description

I added following properties to AvatarConfiguration:

I also removed some logic from DefaultAvatarProvider that waits until the avatar download ends to set the avatar border. I added that logic but I think it wasn't much necessary. I adjusted the placeholder implementation accordingly to hide the border during placeholder state.

Testing Steps

I added snapshot test but I also added a "Customize Avatar" switch to Demo App > Profile View controller. Demo App> Profile Cards can also be checked to see if there are regressions.

pinarol commented 3 months ago

I was curious how/why snapshot of empty views has changed:

Screenshot 2024-06-05 at 15 47 44

The diff is on the border and hardly recognizable, I can't say I make much sense of it 🤔

Screenshot 2024-06-05 at 15 48 02
etoledom commented 3 months ago

I like how the loading placeholders automatically adapt to the new shapes ✨