Remove/Address TODOs in onboarding
Summary
This PR removes TODOs that we don't need anymore and address some of them when it makes sense.
Checklist
- [x] New or updated tests have been added to cover the changes following the testing guidelines.
- [x] The code follows the project's code style and best_practices.
- [x] The changes have been thoroughly tested, and edge cases have been considered.
- [x] Changes are backward compatible whenever feasible. Any breaking changes are documented in the changelog for users and/or in the code for developers depending on the relevance.
Any other notes
No TODO should be left from the onboarding code base the last one is going to be address in #6115
The split of the tests are in a dedicated commit that can be ignored.
Last TODOs to address are to verify the URL for the documentation and it is going to be addressed in another PR.
Taking "No TODO should be left from the onboarding code base" very seriously:
Missed:
- https://github.com/home-assistant/android/blob/6229df022dfd04343d16eeabfc2cce792bd94820/onboarding/src/main/kotlin/io/homeassistant/companion/android/compose/composable/HAWebView.kt#L56
- https://github.com/home-assistant/android/blob/6229df022dfd04343d16eeabfc2cce792bd94820/onboarding/src/main/kotlin/io/homeassistant/companion/android/launcher/LauncherActivity.kt#L120
- https://github.com/home-assistant/android/blob/6229df022dfd04343d16eeabfc2cce792bd94820/onboarding/src/main/kotlin/io/homeassistant/companion/android/onboarding/wearmtls/WearMTLSScreen.kt#L272
What about:
- https://github.com/home-assistant/android/blob/6229df022dfd04343d16eeabfc2cce792bd94820/onboarding/src/main/kotlin/io/homeassistant/companion/android/frontend/navigation/FrontendNavigation.kt#L56 ?
- https://github.com/home-assistant/android/blob/6229df022dfd04343d16eeabfc2cce792bd94820/onboarding/src/main/kotlin/io/homeassistant/companion/android/util/TLSWebViewClient.kt#L23 ?
- https://github.com/home-assistant/android/blob/6229df022dfd04343d16eeabfc2cce792bd94820/onboarding/src/main/kotlin/io/homeassistant/companion/android/launcher/LauncherViewModel.kt#L169 ?
Taking "No TODO should be left from the onboarding code base" very seriously:
Missed:
* https://github.com/home-assistant/android/blob/6229df022dfd04343d16eeabfc2cce792bd94820/onboarding/src/main/kotlin/io/homeassistant/companion/android/compose/composable/HAWebView.kt#L56
Removed in base branch
* https://github.com/home-assistant/android/blob/6229df022dfd04343d16eeabfc2cce792bd94820/onboarding/src/main/kotlin/io/homeassistant/companion/android/launcher/LauncherActivity.kt#L120
Missed it 👍🏻. I need to decide what to do here.
* https://github.com/home-assistant/android/blob/6229df022dfd04343d16eeabfc2cce792bd94820/onboarding/src/main/kotlin/io/homeassistant/companion/android/onboarding/wearmtls/WearMTLSScreen.kt#L272
Missed it 👍🏻. Removed
What about:
* https://github.com/home-assistant/android/blob/6229df022dfd04343d16eeabfc2cce792bd94820/onboarding/src/main/kotlin/io/homeassistant/companion/android/frontend/navigation/FrontendNavigation.kt#L56 ?
Already removed in https://github.com/home-assistant/android/pull/6115
* https://github.com/home-assistant/android/blob/6229df022dfd04343d16eeabfc2cce792bd94820/onboarding/src/main/kotlin/io/homeassistant/companion/android/util/TLSWebViewClient.kt#L23 ?
Removed in base branch
* https://github.com/home-assistant/android/blob/6229df022dfd04343d16eeabfc2cce792bd94820/onboarding/src/main/kotlin/io/homeassistant/companion/android/launcher/LauncherViewModel.kt#L169 ?
Missed 👍🏻. Need to be handled
What was addressed seems good. I tried checking the tests and think everything moved to a logical place but might've missed one, especially back stack navigation with multiple screens is sometimes hard to place.
Setting this as draft while you handle the 3 remaining cases in the previous comment. Please change to ready for review when decided and committed (edit: oh they're randomly in #6123 so that title is wrong, then just undraft when merged) :)
@TimoPtr I think this one is ready and good now that you merged the other PR into this, but I'll let you handle the merging.