- Remove unnecessary nullable types
- Replace no-op method bodies with Unit
- Convert to expression body
- Replace if with when
- Remove braces from 'when' entries
- Remove braces from if statement
- Convert to single line lambda
- oneline if/returns
- Replace 'contains' call with 'in' operator
Following this refactor, it could be great to envision a more "strict" code formatter like ktlint 1.0 (we are currently stuck at 0.48.1)
* [CI] Runs build in macos to generate a cache for androidTest runs
* Build projects before running emulator
* Fixes flaky coroutines test
* Moves spotless up in local tests job
* Enables config cache by setting problems to warn. Fixes#1022
- Prevent logging multiple times (because of `onResume()` callback)
- Remove unnecessary io dispatcher: `ListenableFuture<T>.await()` is already main-safe and prevent acquiring io slot.
- Merge comments into a single javadoc comment on the `ProfileVerifierLogger` type.
- Add proper javadoc format with markdown specific blocks.
- Update logs & tag to be more uniform.
Closes#945
* WIP: Adds screenshot tests to :core:designsystem
Change-Id: I0672845feba4064652dd8d60f07047b87864e121
* 🤖 Updates screenshots
* Creates tests for more components and cleans up
Change-Id: I61fe3ae6a4e8a41a599d520e16fc14aa6a643a22
* WIP: More cleanup and more combinations of themes
Change-Id: I34312bc7d147b31f1c638cd505a9c241f8267523
* Added the rest of the screenshot tests for designsystem
Change-Id: Ic427db5491910781c038882055524e3f3dbed194
* Some more cleanup
Change-Id: I7384e55864719af9122ad9da8e50a09cb9a60180
* Spotless
Change-Id: I22aa46e1f56b8b638c9d609ababbe49d471a26c6
* 🤖 Updates screenshots
* ScreenshotHelper cleanup
Change-Id: Ic94d41618e7850ab47f294d8022b405f18c843f0
* Adds screenshot tests using Roborazzi (Robolectric Native Graphics)
- Adds Roborazzi to convention plugins
- Adds Screenshot helper in :core-testing
- Creates screenshot suites for :app and :feature-foryou
* CI and spotless
* Moves :app tests to testDemo and makes NiaAppScreenSizesScreenshotTests prettier
* CI: Moves local tests to their own step
* CI: Adds --rerun to screenshot task
* CI: Moves screenshots before local tests
* CI: Fixes wrong if statement in workflow
* CI WIP: trying to trigger the push step
* CI: Re-enables roborazzi verification
* Fixes flaky screenshot tests by setting LocalInspectionMode on
* CI: screenshot commits now use the original author intead of bot account
* CI: Disables globbing because file_pattern didn't work
* CI: Trying new file pattern for png files
* CI: Adds a check for forks
* 🤖 Updates screenshots
* Code review: toml cleanup, comments
* Use new github.event.pull_request.head.repo.fork
Co-authored-by: Simon Marquis <contact@simon-marquis.fr>
* Uses Robolectric qualifiers to set the dpi, adds section to README
* Spotless
* Delegates creation of repository to Hilt in test
* Revert "Use new github.event.pull_request.head.repo.fork"
* 🤖 Updates screenshots
* Empty commit to trigger GHA on main branch
* Makes time zones deterministic in screenshot tests
* Increases GMD timeout to 90m, but it has to be reduced
---------
Co-authored-by: Simon Marquis <contact@simon-marquis.fr>
Continues the work initiated in #738.
Extract the SDK version check inside a `GrantPostNotificationPermissionRule` class that delegates to a regular `GrantPermissionRule`.
Implement search feature
- Add a feature module named "search"
- Add a SearchScreen that is navigated by tapping the search icon at the top left corner
- Add a data layer that takes care of populating the *Fts tables and querying them by a search query
- Add a SearchViewModel that wires up the data layer of the Fts tables with the SearchScreen
The SearchScreen has following features:
- The user is able to type the search query in the TextField
- The search result is displayed as the user types
- When the search result is clicked, it navigates to:
- The InterestsScreen when a topic is clicked
- Chrome custom tab with the URL of the clicked news resource
- When the search result is clicked or the IME is explicitly closed by the user, the current search query in the TextField is saved as recent searches
- Latest recent searches are displayed in the SearchScreen
When a news resource is unread, display a dot on its card in the news
feed. When the For You section has unread resources, display a dot on
its icon in the navigation bar.
Update the read status when a resource is opened.
* github/main:
Bump version to 4
Remove unused DropdownMenu component
Route topic chip tap events up to NiaNavHost
Apply suggestions from code review
Migrate custom room configuration into a convention plugin
Update docs/ArchitectureLearningJourney.md - User action follow topic
Update docs/ArchitectureLearningJourney.md - Writing data
Change-Id: I417abcaba792bbf297a8156bb1c4cf677dcb8bea
> `Transformations` is now written in Kotlin. This is a *source incompatible change* for those classes written in Kotlin that were directly using syntax such as `Transformations.map`
> Kotlin code *must* now use the Kotlin extension method syntax that was previously only available when using `lifecycle-livedata-ktx`.
> The `collectAsStateWithLifecycle()` APIs of `lifecycle-runtime-compose` are no longer in experimental status. (I09d42, b/258835424)
Changelog: https://developer.android.com/jetpack/androidx/releases/lifecycle#2.6.0-alpha05
Adds a usage of accompanist/testharnness to force a given DpSize for its content, overriding the density if necessary to ensure that the size is achieved. This allows testing UI at arbitrary sizes on arbitrary emulators, lessening the need for using multiple emulators at different sizes (and filtering tests) when Android-specific window size has been hoisted appropriately.
The initial test using it is a test for checking whether or not the navigation bar or navigation rail is being shown, and these tests can run on any emulator.
Change-Id: I315384e5eafac23a3cd6d3818d9828f6d3c1acfc
* Move Hilt setup to convention plugin
* Disable Hilt on modules where it's not needed
* Enable non-transitive R classes
* Fix `configuration` blocks called in wrong scope
* Move imperative Flavors code from build.gradle
* Disable unnecessary build features globally
* Disable configure-on-demand as it's not encouraged
* Don't use internal AGP packages in plugins
Change-Id: I1bee3e3fd0103054637b979a350f9fd2312ae8ba