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

Add the initial avatar action menu [...] #570

Merged
merged 9 commits into from
Nov 21, 2024

Conversation

pinarol
Copy link
Contributor

@pinarol pinarol commented Nov 20, 2024

Closes #536

Description

Adds the menu with 2 sample items. At the moment the buttons don't do anything other than printing to the console.

Testing Steps

The avatars should have the ... menu, and 2 menu items should appear.

@pinarol pinarol added enhance New feature or request [Feature] Gravatar-QuickEditor Gravatar Quick Editor [Priority] Medium labels Nov 20, 2024
@pinarol pinarol self-assigned this Nov 20, 2024
@pinarol pinarol changed the title Add the initial avatar action menu Add the initial avatar action menu (...) Nov 20, 2024
@pinarol pinarol changed the title Add the initial avatar action menu (...) Add the initial avatar action menu [...] Nov 20, 2024
@pinarol pinarol marked this pull request as ready for review November 20, 2024 13:43
@pinarol pinarol marked this pull request as draft November 20, 2024 13:45
@wpmobilebot
Copy link

wpmobilebot commented Nov 20, 2024

Gravatar Prototype Build📲 You can test the changes from this Pull Request in Gravatar Prototype Build by scanning the QR code below to install the corresponding build.
App NameGravatar Prototype Build Gravatar Prototype Build
Build Number1746
Version1.0
Bundle IDcom.automattic.gravatar-sdk-demo-uikit.prototype-build
Commit1513894
App Center BuildGravatar SDK Demo - UIKit #394
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@pinarol pinarol marked this pull request as ready for review November 20, 2024 14:38
Comment on lines 70 to 81

@ViewBuilder
func ellipsisView() -> some View {
Image("more-horizontal", bundle: Bundle.module).renderingMode(.template)
.tint(.white)
.background(Color(uiColor: UIColor.gravatarBlack.withAlphaComponent(0.4)))
.cornerRadius(2)
.padding(CGFloat.DS.Padding.half)
}

@ViewBuilder
func actionsMenu() -> some View {
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe @ViewBuilder attribute is not needed here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right. Removing.


@ViewBuilder
func ellipsisView() -> some View {
Image("more-horizontal", bundle: Bundle.module).renderingMode(.template)
Copy link
Contributor

Choose a reason for hiding this comment

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

As an alternative: We can set the rendering mode directly in the asset catalog.
That's good if the icon is always meant to be used this way.

Copy link
Contributor Author

@pinarol pinarol Nov 21, 2024

Choose a reason for hiding this comment

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

Right but asset catalogs are more fragile. It is easy to lose that setting if we change the icon. Setting it programmatically is safer.

Copy link
Contributor

@etoledom etoledom left a comment

Choose a reason for hiding this comment

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

Looking good!

Just a couple small comments with optional changes

🎉

@pinarol pinarol merged commit e2e3a55 into trunk Nov 21, 2024
9 checks passed
@pinarol pinarol deleted the wppinar/add-avatar-action-menu branch November 21, 2024 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhance New feature or request [Feature] Gravatar-QuickEditor Gravatar Quick Editor [Priority] Medium
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Quick Editor: More options button with empty dialog menu
3 participants