Bug 2045566 - Add Firefox Labs APIs#7413
Conversation
|
This is missing a few more tests and a changelog entry, but its ~ done |
ab04bbb to
4f8205e
Compare
4c8d66d to
49703cc
Compare
49703cc to
33480d7
Compare
ohall-m
left a comment
There was a problem hiding this comment.
Thanks for working on this!! The API surface looks perfect, thank you!
Just leaving a note that I've began manually testing locally with this patch. My main goal is to test using nimbus-cli and pull getAvailableFirefoxLabs. I also hope to test connecting enrollInFirefoxLab and unenrollFromFirefoxLab.
LGTM, mostly just want to test and understand a few more things.
| pub requires_restart: bool, | ||
| pub title_string_id: String, | ||
| pub description_string_id: String, | ||
| pub connect_url: Option<String>, |
There was a problem hiding this comment.
nit: Android calls this feedback_url, but it doesn't really matter, since we have to deserialize it to the view type anyway. Fenix generally tries to keep implementation specific names away, when we can.
There was a problem hiding this comment.
Yep this can be feedback_url, no problem.
| Enrolled, | ||
| AlreadyEnrolled, | ||
| NoExperiment, | ||
| NotFirefoxLabsOptIn, |
There was a problem hiding this comment.
Thanks for chatting with me about these on Slack! Just leaving what we talked about for future reference, please feel free to correct:
Enrolled-> Do nothing, leave toggle enabledAlreadyEnrolled-> Do nothing, leave toggle enabledNoExperiment-> "This Lab is no longer available". Can only happen if there is a background update while the user has the screen open.NotFirefoxLabsOptIn-> Generic error message, lab remove from screen.Error-> Generic error message.
I also asked on Figma again if we want any specific messaging in these situations.
There was a problem hiding this comment.
We should also remove the entry in the case of NoExperiment
ohall-m
left a comment
There was a problem hiding this comment.
r+ from an Android/Kotlin perspective. [Patch still needs a qualified Nimbus reviewer.]
I manually tested on Android using nimbus-cli and successfully was able to getAvailableFirefoxLabs and enroll/unenroll from a cli Labs that set nimbus-validation's settings-punctuation.
I didn't test edge cases, but established the general flow works as expected.
Pull Request checklist
[ci full]to the PR title.