Skip to content
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

Show all avatars in the Profile card regardless of the rating #558

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

AdamGrzybkowski
Copy link
Contributor

Closes #549

Description

The profile card in the QE wouldn't show avatars that are not G-rated. This fixes the problem by updating the request URL param.

Before After
avatar_rating_before avatar_rating_after

Testing Steps

  1. Launch the QE
  2. Set one Avatar's rating to X
  3. Select that avatar
  4. Confirm you can see it displayed in the Profile card

@AdamGrzybkowski AdamGrzybkowski added Bug Something isn't working [Feature] Gravatar-Quickeditor Gravatar Quick Editor module labels Jan 24, 2025
@AdamGrzybkowski AdamGrzybkowski added this to the 2.3.0 milestone Jan 24, 2025
@@ -50,6 +51,7 @@ internal fun ProfileCard(
avatarUrl(
AvatarQueryOptions {
preferredSize = sizePx
rating = ImageRating.X
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pinarol Is that the rating you're using in the iOS SDK?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest we rename rating to maxRating in AvatarQueryOptions. Currently, I think it's a bit confusing that devs may need to explicitly set the rating to X in a user's profile card, even though the avatar won't have this rating 99% of the time.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree about it being confusing, but that would be a breaking change. We can't simply rename it.

As far as I'm aware the naming matches the URL query params on purpose and the docs mention how this works.

@AdamGrzybkowski AdamGrzybkowski force-pushed the adam/549_restricted_avatars branch from 1d0ccfa to 2111676 Compare January 24, 2025 14:30
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Jan 24, 2025

📲 You can test the changes from this Pull Request in Gravatar Demo by scanning the QR code below to install the corresponding build.
App Name Gravatar Demo
Commit9a1d824
Direct Downloadgravatar-demo-prototype-build-pr558-9a1d824.apk

Copy link
Member

@mlumeau mlumeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AdamGrzybkowski AdamGrzybkowski force-pushed the adam/549_restricted_avatars branch from 2111676 to 9a1d824 Compare January 27, 2025 12:46
@AdamGrzybkowski AdamGrzybkowski merged commit a3fc077 into trunk Jan 27, 2025
17 checks passed
@AdamGrzybkowski AdamGrzybkowski deleted the adam/549_restricted_avatars branch January 27, 2025 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working [Feature] Gravatar-Quickeditor Gravatar Quick Editor module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

QuickEditor: The profile card doesn’t show the lower rating avatars.
4 participants