-
Notifications
You must be signed in to change notification settings - Fork 11
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
QuickEditor: Missing action on gravatar icon #400
QuickEditor: Missing action on gravatar icon #400
Conversation
📲 You can test the changes from this Pull Request in Gravatar Demo by scanning the QR code below to install the corresponding build.
|
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.
Adds a redirection to https://gravatar.com/profile in a custom browser
I don't think the current code will use the custom browser tab. It will launch the browser. Launcing the custom tab looks more or less like this:
val customTabIntent: CustomTabsIntent = CustomTabsIntent.Builder()
.build()
customTabIntent.launchUrl(context, URL)
I've also left a comment in the Issue on how to show the specific profile rather /profile
. This could show the wrong profile if the user is logged in with a different email then used in the QE.
@@ -24,7 +26,9 @@ import com.gravatar.quickeditor.R | |||
import com.gravatar.ui.GravatarTheme | |||
|
|||
@Composable | |||
internal fun QETopBar(onDoneClick: () -> Unit, modifier: Modifier = Modifier) { | |||
internal fun QETopBar(onDoneClick: () -> Unit, gravatarIconUrl: String, modifier: Modifier = Modifier) { |
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.
internal fun QETopBar(onDoneClick: () -> Unit, gravatarIconUrl: String, modifier: Modifier = Modifier) { | |
internal fun QETopBar(onDoneClick: () -> Unit, onGravatarIconClick: () -> Unit = {}, modifier: Modifier = Modifier) { |
I would expose the onGravatarIconClick
rather than pass the URL to let the parent composable decide what behavior they want on icon tap. I think it's more flexible, WDYT?
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.
Fixed in 187258d
You're right, I had that in mind but then decided to go with a regular tab in the code to do the same as the "view profile" button, forgot to change that in the PR description. |
This is important. I think we'll need to "launch" the callback at least to |
In that case if the email is not associated to a gravatar account it will 404. That's what I did in my first commit. Also if the user is signed in a different email there will be an error message in the bottom sheet after oauth, so I think it's enough. |
If you think that's a better URL to open I think it's best to discuss with iOS folks to make sure both platforms are aligned. |
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.
Permission to merge into the release branch? They're targeting this release on iOS. |
Closes #376
Description
Adds a redirection to https://gravatar.com/profile in a
custombrowser tab when clicking on the bottomsheet's Gravatar icon in the top right corner.edit: launches in a regular browser tab to align with the behavior of the "view profile" button.
Testing Steps