Bug 1842203 - Implement the final UX for the FedCM provider prompt#3091
Conversation
c0ed29b to
663a7b3
Compare
|
Thanks for putting this patch, it is looking really good! There are some components that are already using compose, but not sure if they are already handling Themes. |
|
It looks like in the previous compose implementation we didn't have the concept of themes, we were just passing colors https://github.com/mozilla-mobile/firefox-android/blob/main/android-components/components/compose/awesomebar/src/main/java/mozilla/components/compose/browser/awesomebar/AwesomeBarDefaults.kt#L24-L30. |
|
Ideally we would like to create a generic class or contract for all AC components to use, and apps could provide to AC, which just covers the minimal colors and theme management for now and we could extend later. This is what we are doing in Fenix for themes , we would like to have simplify version on AC, which could live on our Colors components or even better if we could create a new component for having everything related to compose where we could have themes, theme management, and a maybe (in the future) have based reusable compose components which could be reuse across AC ✨. |
|
Ideally this contract could be pass to PromptFeature(
private val provideTheme : ()-> ACTheme
//....
)Having a function could help us to delegate the responsibility of theme management to the app and AC will only query the actual correct theme dark or light. |
MozillaNoah
left a comment
There was a problem hiding this comment.
first pass. I mainly have a bunch of nits, but this is coming together well!
| startComposable: (@Composable () -> Unit)? = null, | ||
| ) { | ||
| // Used to propagate the ripple effect to the whole row | ||
| val interactionSource = remember { MutableInteractionSource() } |
There was a problem hiding this comment.
was this necessary? Normally Modifier.clickable applies a ripple to the entire layout.
There was a problem hiding this comment.
For some reason I don't understand, not using this interactionSource gives a "solid" selected state that isn't a ripple :
no-ripple.mov
This is the result I get when using the interactionSource:
ripple.mov
There was a problem hiding this comment.
If I had to guess, it's likely because of the lack of MaterialTheme wrapping all of the Compose code, which might be addressed by the patch we've talked about offline.
663a7b3 to
8f66a5d
Compare
8f66a5d to
f572f8f
Compare
MozillaNoah
left a comment
There was a problem hiding this comment.
second pass. this is probably good to come out of draft now!
| <string name="mozac_feature_prompts_manage_address">Manage addresses</string> | ||
|
|
||
| <!-- Federated Credential Management prompts --> | ||
| <!--Content description for the Provider favicon in the Select Provider FedCM prompt --> |
There was a problem hiding this comment.
You might want to be a little more descriptive and avoid some of the business acronyms for the comments, since a lot of the localizers don't necessarily poke into everything in the app to be able to have the context.
There was a problem hiding this comment.
I realised I ended up not using this string, as I think there's no need for the Screen Reader to read a view that is purely decorative. (see Cases that don't require content labels in Google Documentation.
Thanks for pointing this out!
| startComposable: (@Composable () -> Unit)? = null, | ||
| ) { | ||
| // Used to propagate the ripple effect to the whole row | ||
| val interactionSource = remember { MutableInteractionSource() } |
There was a problem hiding this comment.
If I had to guess, it's likely because of the lack of MaterialTheme wrapping all of the Compose code, which might be addressed by the patch we've talked about offline.
f572f8f to
b7375e1
Compare
b7375e1 to
53a2b6b
Compare
53a2b6b to
b34e7c9
Compare
8eb5047 to
133c811
Compare
…dialogs in Compose
bc8d695 to
42f4c97
Compare
42f4c97 to
eadef48
Compare
Pull Request checklist
After merge
To download an APK when reviewing a PR (after all CI tasks finished running):
Checksat the top of the PR page.firefoxci-taskclustergroup on the left to expand all tasks.build-apk-{fenix,focus,klar}-debugtask you're interested in.View task in Taskclusterin the newDETAILSsection.GitHub Automation
https://bugzilla.mozilla.org/show_bug.cgi?id=1842203
https://bugzilla.mozilla.org/show_bug.cgi?id=1847784