-
Notifications
You must be signed in to change notification settings - Fork 5
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
Conversation
📲 You can test the changes from this Pull Request in Gravatar Prototype Build by scanning the QR code below to install the corresponding build.
|
|
||
@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 { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this 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
🎉
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.