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

Avatar picker empty views #338

Closed pinarol closed 1 month ago

pinarol commented 1 month ago

Closes #

Description

Adds the subviews inside the borders to handle empty avatar state and the error state.

Screenshot 2024-08-07 at 15 27 44 Screenshot 2024-08-06 at 11 33 08 Screenshot 2024-08-07 at 15 58 42

Testing Steps

pinarol commented 1 month ago

I'll wait for https://github.com/Automattic/Gravatar-SDK-iOS/pull/337 to be merged first. We'll have some conflicts otherwise.

pinarol commented 1 month ago

I get this error message even when the token is not expired, but just wrong. I'm not sure if we can differentiate these two scenarios, can we?

It depends on the backend but usually we get 401 on both cases. We should still test these in real life once Gravatar OAUTH is ready.

etoledom commented 1 month ago

It depends on the backend but usually we get 401 on both cases. We should still test these in real life once Gravatar OAUTH is ready.

Okay, let's keep it this way for now 👍

pinarol commented 1 month ago

Text(subtext) doesn't specify the color, so I'd spect it to be black/white as is shown on the ContentLoadingErrorView preview. But it's grey on the AvatarPickerView preview and runtime 🤔

Interesting inconsistency. Should be solved when I set the color explicitly. I just forgot to do that.