lihenggui
d7727f1cac
Ignore function naming check when annotated with @Test
2 years ago
lihenggui
97ecd911c5
Suppress ktlint:standard:function-naming in ResultKtTest
2 years ago
lihenggui
9dac5b80c3
Move @Suppress("ktlint:standard:max-line-length") to function scope
2 years ago
lihenggui
5aa9122f08
Remove violations: property-naming
2 years ago
lihenggui
402ca7d782
Remove violations: discouraged-comment-location
2 years ago
lihenggui
5e965962c5
Spotless
2 years ago
Simon Marquis
171e2e83f5
Reduce overall build complexity
...
- Reduce the visibility of multiple Hilt `Module`s and implementations of public interfaces
- Correctly configure the visibility of dependencies:
- `api` when it's part of it's public `api`
- `implementation` when it's part of it's internal `implementation`
- Remove unnecessary dependencies in build.gradle.kts files
- Remove unnecessary dependencies provided by plugins
- Remove unnecessary applied plugins (i.e. roborazzi)
- Sort dependencies in `build.gradle.kts`
- Delete unused entries in `libs.versions.toml`
2 years ago
Simon Marquis
7bdf942a47
Merge branch 'main' into firebase-ktx
2 years ago
Yuya
907be7d667
Update thumbTrackSizePercent calculation for readability
...
Change-Id: I7ef067a950b4b5911b8c2e6a8c1f72c3e95d938d
2 years ago
Yuya
cc6677872d
Update thumb movement range by thumb size, in app scrollbars
...
Change-Id: I4438debd5037965a837758e0c78b110ab8197da5
2 years ago
Ben Trengrove
20002b25ed
Merge pull request #1067 from android/ben/itemstate
...
Remove redundant mutable state in NewsFeed
2 years ago
dahunsi
58567379dc
Fix typo in app scrollbars
...
Change-Id: Ie72f1410fa8e5a68a520321c34d4fad251016486
2 years ago
Ben Trengrove
1d65b7b702
Remove redundant mutable state
2 years ago
Ben Trengrove
41a7a697da
Apply spotless
2 years ago
Ben Trengrove
a7c7b520a4
Use custom Modifier.Node instead of background
2 years ago
Ben Trengrove
6a95579954
Move state into a state holder and remove redundant Box
2 years ago
Ben Trengrove
a142660048
Move scrollbar changes out of composition
2 years ago
Simon Marquis
4c8e0319ee
spotless
2 years ago
Simon Marquis
6d93ce5ead
Firebase: Migrate to using the Kotlin extensions (KTX) APIs in the main modules
...
https://firebase.google.com/docs/android/kotlin-migration
Requirements: Firebase BoM 32.5.0, but let's update to the latest 32.6.0.
And remove warnings:
- `'logEvent(String, ParametersBuilder.() -> Unit): Unit' is deprecated. Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration .`
- `'param(String, String): Unit' is deprecated. Migrate to use the KTX API from the main module: https://firebase.google.com/docs/android/kotlin-migration .`
2 years ago
Simon Marquis
6a3a5ea692
Kotlinify codebase
...
- 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)
2 years ago
Simon Marquis
8d0b893459
Update Robolectric 4.11.1
...
- https://github.com/robolectric/robolectric/releases/tag/robolectric-4.11
- https://github.com/robolectric/robolectric/releases/tag/robolectric-4.11.1
> Robolectric 4.11 adds support for Android SDK 34 (U). It also contains many bug fixes, performance improvements, and Shadow API enhancements. Robolectric 4.11 removes support for Android SDKs 18 and below.
Removing explicit API 33 Robolectric configuration.
2 years ago
Simon Marquis
142a37cd94
Move Android instrumented test `ThemeTest` to unit test
2 years ago
Daniel Santiago
20129f083b
Update to Hilt 2.48.1 and use the KSP version
...
* Moved protobuf to separate module to avoid having to wire KSP's Plugin with the Protobuf Plugin.
* `@Binds` function cannot be an extension function.
* Commented `kotlin.compiler.execution.strategy=in-process` in CI to circumvent OOMs due to increased metaspace usage.
2 years ago
rosariopf
137a5de28c
remove ktx import from FirebaseAnalyticsHelper.kt
2 years ago
Mario Manhique
9d43ecfdb9
Update MainDispatcherRule.kt
...
Updated MainDispatcherRule parameter accessibility to private because its only needs to be accessible inside that class.
2 years ago
Don Turner
bbcabea220
Fix formatting issues
...
Change-Id: Ia90a4aad72db737455b70de9b4583689d6a0e5d6
2 years ago
rosariopf
9abc0cc2d4
upgrade to Firebase BoM 32.5.0 and drop Firebase KTX
2 years ago
Adetunji Dahunsi
53d8bef434
Merge pull request #972 from tjmtic/now-update-888
...
Update primitive mutable states to mutableState API where applicable
2 years ago
Jonathan Koren
45b11a0571
fixed for PR 985
2 years ago
TM
0d31a62bbd
Merge remote-tracking branch 'upstream/main' into now-update-888
2 years ago
Simon Marquis
c85e361ef9
Fix compiler warning: Remove single lambda parameter declaration
2 years ago
Adetunji Dahunsi
27dd4e66ad
Merge pull request #947 from android/tj/staggered-grid-feed
...
Use lazy vertical staggered grid in feed to maximize space utilization
2 years ago
TM
190189b7e4
Update compose-runtime version; Update primitive mutable states to mutableState API where applicable
2 years ago
Don Turner
3d85cd06d0
Merge pull request #958 from McGalanes/main
...
Use typesafe project accessors
2 years ago
Don Turner
97933b1686
Merge pull request #959 from McGalanes/convention-plugins-toml
...
Add convention plugins to version catalogs
2 years ago
dahunsi
0ccd6d2f29
Fix spotless
...
Change-Id: Ia931fc5662af50a6045a51783d72cb5b68e2486a
2 years ago
dahunsi
401b42388a
Address PR feedback
...
Change-Id: I50b49d3e216535e384b64849f915b37f6e2acbbc
2 years ago
Don Turner
6628ddfdaf
Merge pull request #912 from lihenggui/main
...
Upgrade Gradle to v8.3
2 years ago
Minseong Kim
a147118fdd
Fit typo in SystemTrayNotifier.kt
2 years ago
Melwin Magalhaes
f470be2860
Add convention plugins to version catalogs
2 years ago
Melwin Magalhaes
d089ccd9d7
Use typesafe project accessors for project modules
2 years ago
dahunsi
738fbc190d
Use animateItemPlacement() on feed
...
Change-Id: Id120a6e84e0641679fa54ebf0e34bb04165aa419
2 years ago
dahunsi
9c8f1256a0
Fix spotless
...
Change-Id: I7ee8bc84beb38d00983aa7b0da3f3073e1249992
2 years ago
dahunsi
768c484090
Use lazy vertical staggered grid in feed to maximize space utilization
...
Change-Id: I66fff57bd0f11f5f73e7e5c9b5c51b0fa6a76926
2 years ago
Simon Marquis
79bb3b9edf
Merge remote-tracking branch 'origin/main' into resource-prefix
2 years ago
Simon Marquis
415e35c35e
Enforce `resourcePrefix` on Android library modules
...
```
:ui-test-hilt-manifest -> ui_test_hilt_manifest_
:core:analytics -> core_analytics_
:core:common -> core_common_
:core:data -> core_data_
:core:data-test -> core_data_test_
:core:database -> core_database_
:core:datastore -> core_datastore_
:core:datastore-test -> core_datastore_test_
:core:designsystem -> core_designsystem_
:core:domain -> core_domain_
:core:network -> core_network_
:core:notifications -> core_notifications_
:core:testing -> core_testing_
:core:ui -> core_ui_
:feature:bookmarks -> feature_bookmarks_
:feature:foryou -> feature_foryou_
:feature:interests -> feature_interests_
:feature:search -> feature_search_
:feature:settings -> feature_settings_
:feature:topic -> feature_topic_
:sync:sync-test -> sync_test_
:sync:work -> sync_work_
```
2 years ago
Simon Marquis
2bbb982b3a
Migrate from `java` to `kotlin` sourceSet directory
2 years ago
Jose Alcérreca
ff9f38198f
Adds screenshot tests to :core:designsystem ( #931 )
...
* 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
2 years ago
Don Turner
a2c0450965
Merge pull request #925 from SimonMarquis/remove-dispatcher
...
Remove unnecessary dispatcher switch in `DefaultRecentSearchRepository`
2 years ago
Simon Marquis
7f5a8619fe
Remove unnecessary dispatcher switch in `DefaultRecentSearchRepository`
...
As mentioned in the following discussion: https://github.com/android/nowinandroid/discussions/818
Room already takes care of switching dispatchers if the DAO method is correctly annotated with the `suspend` modifier.
2 years ago
Roy Matero
bde73dbbfa
Merge branch 'android:main' into main
2 years ago
Simon Marquis
14bd622e05
Replace identical `InstantSerializer` with KotlinX datetime default serializer
2 years ago
Jose Alcérreca
a84292a4a5
Adds dark screenshot tests and fixes background colors in ForYou ( #918 )
...
* Adds dark screenshot tests and fixes background colors in ForYou
* 🤖 Updates screenshots
2 years ago
Roy Matero
6122d92cf8
Renamed toggle function signature with boolean parameters
...
Change-Id: I0d6c0ed4d4c0ee4bd387e5645fc558970f5f202b
2 years ago
Milosz Moczkowski
7ddd177402
Merge pull request #759 from SimonMarquis/lint/sarif
...
Android Lint improvements
2 years ago
Jose Alcérreca
9748be62c5
Adds Screenshot testing with Roborazzi ( #876 )
...
* 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>
2 years ago
lihenggui
f7df999c22
Upgrade Gradle to v8.3
2 years ago
Milosz Moczkowski
7c7b2f5a95
Merge pull request #889 from RivanParmar/main
...
Rename SearchResult.kt.kt to SearchResult.kt
2 years ago
Jose Alcérreca
2ddeb7a456
Fixes icons size in onboarding and restores LocalInspection for images ( #909 )
...
* Fixes icons size in onboarding and restores LocalInspection for images
2 years ago
Simon Marquis
bd6fc86158
Widen `isNotEmpty` with `isNotBlank` to potentially catch blank values
2 years ago
Simon Marquis
5503aba044
Update `var` with fake default value to the more "correct" `lateinit var`
2 years ago
Simon Marquis
b924cfd6f2
Restore `Unknown` type as empty `String`
2 years ago
Simon Marquis
66a7cb6dca
Fix broken text
2 years ago
Simon Marquis
642d32bf38
Restore original `type` labels
2 years ago
Simon Marquis
9c60c758ee
Fix missing removal
2 years ago
Simon Marquis
26e41f18b2
spotlessApply
2 years ago
Simon Marquis
81bec2e367
Replace `NewsResourceType` enum with simpler String type
...
See this discussion for rationale: https://github.com/android/nowinandroid/discussions/901
2 years ago
Adetunji Dahunsi
adfa471cd5
Merge pull request #850 from qamarelsafadi/loading-progress-for-image
...
Fix #849 : Loading progress for image
2 years ago
RivanParmar
f72c80bde1
Rename SearchResult.kt.kt to SearchResult.kt
2 years ago
Don Turner
596a036dcc
Merge pull request #873 from SimonMarquis/misc-warnings
...
Fix miscellaneous warnings
2 years ago
qamarelsafadi
9adac89946
Merge remote-tracking branch 'origin/loading-progress-for-image' into loading-progress-for-image
2 years ago
Qamar A. Safadi
9abe814915
Merge branch 'android:main' into loading-progress-for-image
2 years ago
qamarelsafadi
eecf95eaf7
fix formatting
2 years ago
Don Turner
6014a3118c
Merge pull request #872 from SimonMarquis/data-objects
...
Convert 'sealed' sub-object to 'data object'
2 years ago
Don Turner
148d388b2b
Merge pull request #874 from SimonMarquis/string-decoder
...
Replace StringDecoder injection with simpler API
2 years ago
qamarelsafadi
b291ac5f38
feat: replacing SubcomposeAsyncImage as its not recommended to use with lazyLayout
2 years ago
Qamar A. Safadi
1574ad250c
Merge branch 'android:main' into loading-progress-for-image
2 years ago
Don Turner
f225d46363
Merge pull request #879 from tatsuyafujisaki/rename-constants
...
Rename constants
2 years ago
AlirezaJoon
60775d6bf8
fix: add label to animations for fixing lint issue
2 years ago
Qamar A. Safadi
72e515d512
Merge branch 'android:main' into loading-progress-for-image
2 years ago
Tatsuya Fujisaki
0e28640b15
Rename constants
2 years ago
Adetunji Dahunsi
c650518885
Merge pull request #722 from android/tj/scrollbars
...
Add scrollbars to app
2 years ago
Simon Marquis
a9df0e45c0
Replace StringDecoder injection with simpler API
...
The initial reason for this `StringDecoder` was to make sure the AndroidX navigation route would not use incompatible chars in the resulting String.
For that, `Uri.encode(String)` was used, but this is an Android API (`android.net.Uri`).
Unit tests would fail because Uri is not mocked (since we are not using Robolectric).
Therefore, a `StringDecoder` interface was introduced with 2 implementations: `UriDecoder` and `FakeStringDecoder`, Hilt modules were added, etc.
FWIW, the naming of the API was misleading: `StringDecoder.decodeString(encodedString: String)` does not inform how encoded the input is, so `UriDecoder` could "decode" something that was not necessarily uri "encoded".
The solution to this problem was to simply use regular Java APIs:
- `URLDecoder.decode(urlEncodedTopicId, "UTF-8")`
- `URLEncoder.encode(topicId, "UTF-8")`
2 years ago
Simon Marquis
54ad808e74
Fix miscellaneous warnings
...
- Remove unused namespace declaration
- Collapse empty manifest tags
- Remove redundant qualifier name
- Remove redundant suppression
2 years ago
Simon Marquis
28c9412cc9
Convert 'sealed' sub-object to 'data object'
2 years ago
qamarelsafadi
64365f818a
feat: make painter in one line
2 years ago
qamarelsafadi
a913c85c4d
feat: move the placeholder default value to the method
2 years ago
Qamar A. Safadi
86c51d369c
Merge branch 'android:main' into loading-progress-for-image
2 years ago
prosixe
a132e331bc
Typo fix for topics
...
tocpis -> topics
2 years ago
qamarelsafadi
58a42a6c85
feat: remove check if placeholder null and put a default placeholder if its not passed.
2 years ago
qamarelsafadi
6bc6fe1551
fix: modifier to Modifier
2 years ago
qamarelsafadi
ef7141d361
fix: review notes
2 years ago
qamarelsafadi
13fe767fb9
feat: fix format issue
2 years ago
qamarelsafadi
325dfb6edb
Merge remote-tracking branch 'origin/loading-progress-for-image' into loading-progress-for-image
2 years ago
Qamar A. Safadi
a9c16ab94e
Merge branch 'android:main' into loading-progress-for-image
2 years ago
qamarelsafadi
8166ec18cb
feat: fix format issue
2 years ago
Adetunji Dahunsi
867e2464db
Merge pull request #835 from blackbracken/avoid_retrieving_unnecessary_entity
...
Call getNewsResourceIds instead of getNewsResources
2 years ago
qamarelsafadi
3e04a65ca4
feat: Show loading progress for Image Component as a solve for
...
//TODO b/228077205,
2 years ago
qamarelsafadi
51c007c51c
feat: Show loading progress for Image Component as a solve for
...
//TODO b/228077205,
2 years ago
qamarelsafadi
acc5942978
Merge remote-tracking branch 'origin/main'
2 years ago
Qamar Safadi
e33036f039
feat: Show loading progress for Image Component as a solve for
...
//TODO b/228077205,
2 years ago
TJ Dahunsi
451c2e9b74
Interact with scrollbar only if drag direction matches scrollbar orientation
...
Change-Id: I8fb5a64098ea83458d25fd2b7363a6b5dd3fef2f
2 years ago
TJ Dahunsi
3e7aa961c5
Replace usages of 'displacement' to 'moved' in parameter names
...
Change-Id: I5b3da60041b046454e848d187f6dd2bfadf22b9a
2 years ago
TJ Dahunsi
f77f6c134d
PR feedback
...
Change-Id: I6e9f4a2ba53e81d32d07e229eb848541801eca18
2 years ago
TJ Dahunsi
7a889b64a6
PR feedback
...
Change-Id: I48492e3c121ff8b2ee6bbbac08aa1829f6a6467f
2 years ago
TJ Dahunsi
843826a68f
Check if first item size == 0
...
Change-Id: I41acffad84d9db1cf407f77b04530643933f98bf
2 years ago
TJ Dahunsi
208e03709b
Even better names
...
Change-Id: Ia699c3ce8fd1ce7a6e406b00c81dc196b487ed65
2 years ago
TJ Dahunsi
a97dec9633
Fix spotless
2 years ago
TJ Dahunsi
81c6076153
Added clarifying comments to code and used better variable names
2 years ago
TJ Dahunsi
b27c1b3d0d
Default scrollbars to dormant
2 years ago
TJ Dahunsi
ef85588d40
Extract scrollbar values to constants
2 years ago
TJ Dahunsi
acf0526226
Add hoverable to scrollbar
2 years ago
TJ Dahunsi
66a4e78105
Add scrollbars to app
2 years ago
Márton Braun
1bef42844f
Merge pull request #752 from SimonMarquis/kotlin-1.9.0
...
Kotlin 1.9.0
2 years ago
Simon Marquis
150e1426f0
Add protobuf generated sources to the sourceSets
...
And update to version 3.23.4.
2 years ago
blackbracken
143d28d240
reformat by spotless
2 years ago
blackbracken
5a9ab08cfc
add kdoc for getNewsResourceIds
2 years ago
blackbracken
8dff654571
Call getNewsResourceIds instead of getNewsResources
2 years ago
Milosz Moczkowski
182131da16
Merge pull request #823 from ahmed-madhoun1/allow_localised_date_format
...
Allow localised date format
2 years ago
Don Turner
ecd8a4a3f7
Merge pull request #812 from Askeri-Muhendis/main
...
Kotlin Coding conventions
2 years ago
TJ Dahunsi
9cba513495
Track when deep link notifications are opened
...
Change-Id: I223b1c8fbca36f9b7f2a35d9cb2fa901d6f5be91
2 years ago
ahmedmadhoun1
39244db2d8
Allow localised date format
2 years ago
Simon Marquis
9236bf5007
Merge branch 'main' into lint/sarif
2 years ago
İbrahim Ethem Şen
6f727c4eb6
Merge branch 'android:main' into main
2 years ago
İbrahim Ethem Şen
83ee29744e
Kotlin coding conventions places companion object at the bottom of the class
2 years ago
Tomáš Mlynarič
43c087d7aa
Add named arguments
...
Change-Id: Ic91ae4fc04bf8eb92c3e5845c7e984475526ec91
2 years ago
Tomáš Mlynarič
f5a5811506
Add contentType to news feed
...
Before
ScrollForYouFeedBenchmark_scrollFeedCompilationFull
frameDurationCpuMs P50 4.9, P90 6.9, P95 7.6, P99 9.5
frameOverrunMs P50 -10.3, P90 -6.8, P95 -2.8, P99 -2.1
Traces: Iteration 0 1 2 3 4 5 6 7 8 9
After
ScrollForYouFeedBenchmark_scrollFeedCompilationFull
frameDurationCpuMs P50 4.6, P90 6.3, P95 7.2, P99 9.2
frameOverrunMs P50 -10.6, P90 -8.7, P95 -7.8, P99 -4.7
Traces: Iteration 0 1 2 3 4 5 6 7 8 9
Change-Id: I5589776f9627c27154873529c9ca9dd055a8a8ef
2 years ago
Simon Marquis
e125658335
Merge branch 'main' into lint/sarif
2 years ago
James Rose
09a7b4bfda
Merge pull request #748 from SimonMarquis/fix/permissions
...
Grant `POST_NOTIFICATIONS` permission in more instrumented tests
2 years ago
Adetunji Dahunsi
1ef0ced20c
Merge pull request #776 from SimonMarquis/fix/714
...
Keep track of matching `Network`s inside `NetworkCallback`
2 years ago
Simon Marquis
06d07dbca4
Apply changes from review comments
2 years ago
Miłosz Moczkowski
da09e124a7
Refactor icons
2 years ago
Milosz Moczkowski
38201a0314
Merge pull request #770 from android/refactor/remove_unused_statements
...
Remove unused statements
2 years ago
Simon Marquis
769e5dd458
Keep track of matching `Network`s inside `NetworkCallback`
...
This will ensure the connectivity state remains synchronized with the `ConnectivityManager`.
Fixes #714
2 years ago
Miłosz Moczkowski
bdc607d289
Remove redundant suppressions
...
Change-Id: Iae08b6f284cf7a387922fdec34c8a0aa0da809ef
2 years ago
Miłosz Moczkowski
31dd5ecf59
Remove redundant statements
...
Change-Id: Iaa25b7ba033d5e9c85cc2dc433197ed7b8b6cb89
2 years ago
Simon Marquis
9085cad91c
Cleanup unused string resources
2 years ago
Simon Marquis
d562d566a8
Android Lint improvements
...
- Create `LintConventionPlugin` to configure Lint on all compatible modules: Android applications, Android libraries and JVM modules.
- Run `lintProdRelease` in CI instead of the default `lintDemoDebug` which is less important compared to production code.
- Rearrange CI steps to make it more clear that Lint should is an additional step after build (build -> test -> lint).
- Enable SARIF support and upload results to GitHub's CodeQL to get inline feedback on PRs.
If we really need better perfs, we could restore `lint.checkDependencies = true` on the `:app` module and only execute `:app:lintProdRelease`.
But in practice, this does not change the total build time on this project.
2 years ago
Adetunji Dahunsi
ee64466308
Merge pull request #749 from android/tj/reactive-only-dao
...
Ensure DAO exposes only reactive types
2 years ago
Don Turner
e9c72913cd
Provide Default dispatcher for instrumented tests
...
Change-Id: I488a9b9d9d3864ce9496614ab35332ec19d06bcc
2 years ago
Don Turner
e74d70cc38
Updating TestDataStoreModule to use ApplicationScope
2 years ago
TJ Dahunsi
56034631b5
Fix tests
...
Change-Id: Ie6b62071d2023e3a7ffe1553ab606e3f6b386a5e
2 years ago
Don Turner
46d39ed85d
Add top level application scope, use IO dispatcher for DataStore
...
Change-Id: I1512b1665587c73abd5e8a78aa9abd3eed24ab79
2 years ago
TJ Dahunsi
0d416f2404
Ensure DAO exposes only reactive types
...
Change-Id: I8992ccf6525cd4c5ea9503d532b500e4d310b7fb
2 years ago
Simon Marquis
100cd47161
Grant `POST_NOTIFICATIONS` permission in more instrumented tests
...
Continues the work initiated in #738 .
Extract the SDK version check inside a `GrantPostNotificationPermissionRule` class that delegates to a regular `GrantPermissionRule`.
2 years ago
Don Turner
5dd82b3829
Merge pull request #681 from SimonMarquis/di/coroutine-scope
...
Add Application-wide `CoroutineScope` in the DI graph
2 years ago
Neelansh Sahai
467c8b6415
Merge pull request #706 from gururani-abhishek/remove-onItemClick-parameter
...
fix #614 : removed unused onItemClick parameter from NewsResourceCardList.kt
2 years ago
Alex Vanyo
3a89b11811
Adjust JDK setup to remove toolchain
...
Change-Id: Ie0f43cb8f0fe504ed3e98ef35703949959688699
2 years ago
Milosz Moczkowski
8146e84cab
Merge pull request #583 from SimonMarquis/jvmToolchain
...
Configure jvmToolchain for Android and Kotlin projects
2 years ago
Adetunji Dahunsi
3ec9746ce9
Merge pull request #716 from SimonMarquis/SimonMarquis-patch-3
...
Simplify handling of nullability in `ConnectivityManagerNetworkMonitor`
2 years ago
Don Turner
89e1bbefd1
Merge pull request #719 from android/add-search-analytics
...
Add analytics for search queries
2 years ago
James Rose
2bd3bc7bb2
Mark all news resources read on first sync
...
Otherwise, there will be unread articles until the user clicks through
every article that has ever been published.
2 years ago
Don Turner
cec53a996c
Add analytics for search queries
...
Change-Id: If5290a903afb928fc1c3aaa66a52d2f182aba118
2 years ago
Simon Marquis
8e39c933bd
Update ConnectivityManagerNetworkMonitor.kt
2 years ago
Simon Marquis
32698353c5
Extract common code to update the Flow value
2 years ago
Simon Marquis
3fcdda6bb6
Update ConnectivityManagerNetworkMonitor.kt
2 years ago
Simon Marquis
cbe308f8a2
Update ConnectivityManagerNetworkMonitor.kt
2 years ago
Simon Marquis
b3a0b43eba
Update ConnectivityManagerNetworkMonitor.kt
2 years ago
Simon Marquis
5e33c57144
Simplify handling of nullability in `ConnectivityManagerNetworkMonitor`
2 years ago
TJ Dahunsi
757fecc403
Fix build
2 years ago
TJ Dahunsi
bdff1bfc01
Route notification deep link through for you screen, with spotless fixes
2 years ago
TJ Dahunsi
7312b33e9e
Route notification deep link through for you screen
2 years ago
TJ Dahunsi
03c4f27434
Add pending intent for opening notification links
2 years ago
TJ Dahunsi
6a4b8f65ef
Notify users when news are updated
2 years ago
Simon Marquis
62820784e1
Merge branch 'main' into jvmToolchain
2 years ago
gururani-abhishek
8645c1bbff
added comment to document what happens on tapping news resource card.
2 years ago
gururani-abhishek
c65cbc6c2a
added back launchCustomChromeTab()
2 years ago
gururani-abhishek
4e658ac537
fix #614 : removed unused onItemClick parameter from NewsResourceCardList.kt
...
1. removed the unused onItemClick parameter
2. removed now redundant variables it used
3. removed its description from the comments.
2 years ago
Don Turner
b4e1209911
Merge pull request #667 from SimonMarquis/cleanup/warnings
...
Cleanup warnings and replace deprecated methods
2 years ago
Milosz Moczkowski
6168049ac5
Merge pull request #598 from takagimeow/fix/clean-up-unused-update-topics
...
Clean up unused updateTopics and updateNewsResources methods
2 years ago
Simon Marquis
1df26b4b20
Replace unused variable with simpler method calls
2 years ago
Simon Marquis
119550fe38
Remove `DSL_SCOPE_VIOLATION` suppression as it is now fixed in Gradle 8.1
2 years ago
Don Turner
59d48f472e
Merge pull request #662 from android/av/agp-8.0
...
Update to AGP 8.0
2 years ago
Takeshi Hagikura
61db05b707
Implement search feature ( #685 )
...
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
2 years ago
Adetunji Dahunsi
d7bdee8e0c
Merge pull request #649 from android/tj/backend-requested-sync
...
Wire up backend requested sync
2 years ago
Adetunji Dahunsi
aa8a86acd7
Applied code review suggestions
...
Change-Id: I12fab8e0d27a8a1805e0063054ec3382bebd78f1
2 years ago
Adetunji Dahunsi
a4c0b91f95
Update core/data/src/test/java/com/google/samples/apps/nowinandroid/core/data/repository/OfflineFirstNewsRepositoryTest.kt
...
Co-authored-by: Don Turner <dturner@users.noreply.github.com>
2 years ago
Adetunji Dahunsi
9661005128
Used more explicit variable names in tests
...
Change-Id: I2e0ebead70441eced05eb786aaa7683bfefa8976
2 years ago
Adetunji Dahunsi
18830eef5f
Add comments explaining backend sync and made variable names easier to grok
...
Change-Id: I90cd7444de95efa20bf243a922a772f7849a23ec
2 years ago
Adetunji Dahunsi
a6b1bb7177
Update core/data/src/main/java/com/google/samples/apps/nowinandroid/core/data/repository/OfflineFirstNewsRepository.kt
...
Co-authored-by: Don Turner <dturner@users.noreply.github.com>
2 years ago
Simon Marquis
c0f1423427
Run Spotless
2 years ago
Simon Marquis
1a89c975b8
Add Application-wide `CoroutineScope` in the DI graph
...
Following the work of #607 .
2 years ago
Simon Marquis
fd826c8e23
Delete no longer used `AUTHORS_ASSET` reference
2 years ago
Milosz Moczkowski
d12eaacf92
Merge pull request #671 from android/kotlin-version-updates
...
Update Kotlin, Compose compiler, serialization versions
2 years ago
Márton Braun
dc9d2cf72f
Update Kotlin, Compose compiler, serialization versions
...
Change-Id: I2aa0d07769e79e6f85824a391418566aef6b721e
2 years ago
Adetunji Dahunsi
d2d42e1095
Wire up backend requested sync
...
Change-Id: I1d4485b589c7e94527a2a02f371cd3f030231622
2 years ago
James Rose
f2680a8973
Add missing method doc
2 years ago
James Rose
bb973872c7
Merge branch 'main' into jr/track-viewed
2 years ago
James Rose
08d87ecb1a
Rename getUserNewsResources to observeAll
2 years ago
Alex Vanyo
534e39a771
Update to AGP 8.0
...
Change-Id: I27eb106e484e2003d732782a39612dc72c845282
2 years ago
Milosz Moczkowski
2ffe3af41c
Merge pull request #575 from takagimeow/fix/provide-true-to-local-inspection-mode
...
Provide true to LocalInspectionMode
2 years ago
Milosz Moczkowski
dd3c6827d2
Merge pull request #600 from takagimeow/cleanup-unused-args
...
Remove newsResourceTitle from AnalyticsHelper.logNewsResourceOpened method
2 years ago
Milosz Moczkowski
3ca31bedec
Merge branch 'main' into patch-2
2 years ago
Adetunji Dahunsi
1961b56ea8
Backend triggered sync
...
Change-Id: I53c43b136ebb755f6258b1e815301dddb3b536a3
2 years ago
Milosz Moczkowski
c6c600dd82
Merge pull request #624 from SimonMarquis/gradle-sort
...
Sort and group Gradle dependencies
2 years ago
Chris Sinco
577fdc790c
Fix trailing commas based on spotless check
3 years ago
Chris Sinco
738325af29
Merge branch 'main' into ui-polish
3 years ago
James Rose
317f47c3cf
Incorporate code review changes: Move UserNewsResourceRepository to data
...
module; move UserNewsResource to model module. Implement unread dot for
bookmarked articles. Keep the flows cold in UserNewsResourceRepository.
3 years ago
Simon Marquis
3d7b71963c
Sort and group Gradle dependencies thanks to square/gradle-dependencies-sorter
3 years ago
James Rose
b1286ca188
Display unread state on the news feed and bottom nav bar
...
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.
3 years ago
James Rose
0e19a2746c
Replace GetUserNewsResourcesUseCase with UserNewsResourceRepository
...
This moves the responsibility for joining the UserData and the
NewsResources to UserNewsResourceRepository. This way, the work can be
done once and shared with all consumers in a SharedFlow, rather than
having each consumer perform the join itself by invoking the UseCase.
3 years ago
James Rose
b8fc2c9302
Add viewed status for news resources to data layer
3 years ago
Adetunji Dahunsi
48a0f3d501
Merge pull request #608 from android/tunjid-batch-sync
...
Batch sync news resources from remote
3 years ago
Keisuke Takagi
13202f99fd
Merge branch 'main' of https://github.com/takagimeow/nowinandroid into fix/clean-up-unused-update-topics
3 years ago
Don Turner
09a697c8a1
Merge pull request #607 from android/mv/tests
...
Provide a CoroutineScope to fake DataStores
3 years ago
Adetunji Dahunsi
4cb7d6dda1
Fix tests for batched news resource sync
...
Change-Id: I37545eba8618edc936eb12fa38628d98f85f52ed
3 years ago
Adetunji Dahunsi
6be949aed4
Spotless fix
...
Thought I was cool enough to edit code in the browser. Spotless said no.
3 years ago
Adetunji Dahunsi
4d6188e7ab
Batch sync news resources from remote
...
Batch sync news resources from remote to reduce json payload size.
3 years ago
Alex Vanyo
042b5ff393
Merge pull request #603 from amalhanaja/redundant-managed-device
...
Remove redundant code block for managed virtual device creation
3 years ago
Manuel Vivo
b9cf596927
Fix spotless
3 years ago
Manuel Vivo
aa98df6666
Provide a CoroutineScope to fake DataStores
3 years ago
Don Turner
2b5e3332bc
Make Hilt provide Firebase.analytics
...
Change-Id: I57bec82713ce7ce3a17cd4ad0f377c28c2aedb89
3 years ago
AlfianHanantio
1fb989bba9
Remove redundant code block for managed virtual device creation
3 years ago
Keisuke Takagi
a1dae8c858
remove newsResourceTitle
3 years ago
Keisuke Takagi
8cd9750877
Merge branch 'main' of github.com:takagimeow/nowinandroid into fix/clean-up-unused-update-topics
3 years ago
Adetunji Dahunsi
eae24bc821
Merge pull request #592 from android/tj/news-resource-query
...
Add NewsResourceQuery to better query encapsulation
3 years ago
Adetunji Dahunsi
3da3911180
Add NewsResourceQuery to better query encapsulation
...
Change-Id: I93f8c8ae2d1144975f6f9ff1ba93be9a4600768a
3 years ago
Keisuke Takagi
be7c335bba
remove invalid overriding method
3 years ago
Keisuke Takagi
77ae65db53
remove unused updateNewsResources method
3 years ago
Keisuke Takagi
d72f9a31e3
remove invalid overriding method
3 years ago
Keisuke Takagi
e94af21e22
remove unused updateTopics method
3 years ago
Caren
769b5a5d12
Merge pull request #582 from yschimke/loaders
...
Improve network pooling and avoid startup image fetches.
3 years ago
Keisuke Takagi
30759e68db
Merge branch 'main' of github.com:takagimeow/nowinandroid into fix/provide-true-to-local-inspection-mode
...
Conflicts:
core/ui/src/main/java/com/google/samples/apps/nowinandroid/core/ui/NewsResourceCard.kt
3 years ago
Simon Marquis
5cb1fa2fa3
Configure jvmToolchain on the single Kotlin jvm project
3 years ago
Yuri Schimke
2c6cd4af12
Fixes
...
Change-Id: Iedcafbf0ad7b853544b7b5b3f37685a0a868c2e6
3 years ago
Yuri Schimke
2e5c29c9e4
Improve network pooling and avoid startup image fetches.
...
Change-Id: If747fb0833d31ce7c9bedffd400160e979bc945e
3 years ago
Don Turner
3d6ca9b7d8
Merge remote-tracking branch 'github/main' into feb9automerger
...
* 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
3 years ago
Márton Braun
39c76443b1
Remove unused DropdownMenu component
...
Change-Id: I7ee7e8f1995667c7e54459f4333594c4605cc5a9
3 years ago
Márton Braun
2f5de17634
Route topic chip tap events up to NiaNavHost
...
Change-Id: I228c486f5cde1bb47530e8f115a435bfa34381a7
3 years ago
Don Turner
a1bd4beadb
Add Firebase analytics. See go/nia-firebase-services.
...
Change-Id: I0cbbda0bba761d8019241f6165db231fe94fb689
3 years ago
Keisuke Takagi
0cd5abe77b
Provide true to LocalInspectionMode
3 years ago
Simon Marquis
bf9e388610
Migrate custom room configuration into a convention plugin
...
And use `CommandLineArgumentProvider` to avoid breaking cacheability: https://issuetracker.google.com/issues/132245929
3 years ago
Miłosz Moczkowski
7b11622c5d
Replace global variables with PreviewParameterProvider
3 years ago
Márton Braun
56ecffbadd
Run Spotless to add trailing commas (and apply other rule updates)
...
Change-Id: I5f8e49a3ef004c7e9e7dfe4bc55f0a35dc575209
3 years ago
Angie Sasmita
463d7ac6e8
Merge pull request #542 from android/as/dynamic-color-option
...
Add dynamic color option in settings for API >=32
3 years ago
mlykotom
61c044a712
Merge branch 'main' into tm/fix-benchmarks-no-people
...
Change-Id: I94ca19fad5527c11a2f0f28cc43a23ab22f419a7
3 years ago
Mohsen Rzna
816be8b385
Android-CI workflow -> GMD refactor ( #537 )
...
This PR is about updating the operating system to macOS-12 as the previous one was going to be deprecated, as well as updating the checkout to v3 to avoid the warnings in the panel; adding setup SDK action to accept the license which was missing from the beginning.
I also added imports instead of adding them directly with the codes.
As a reference, there was another PR with a similar topic, but it wasn't complete: #483
3 years ago
Angie Sasmita
2159f12d3f
Small fix for naming and boolean logic
...
Change-Id: I3dd291bdd581494574c557329bf23f5ed07af0bb
3 years ago
Angie Sasmita
2430c8c25b
Fix Spotless issue manually
...
Change-Id: Icd560e6ceaaeee0a6f502fe49b3403ab07f926ef
3 years ago
Angie Sasmita
c97e7980c8
Add dynamic color option in settings for API >=32
...
Change-Id: Ib42c1cbd0208e98ef7610a1c8aca5d721aa464e6
3 years ago
Takeshi Hagikura
7d22f3103f
Introduce GMD + ATD ( #479 )
...
Introduce Gradle Managed Device definitions to modules that have instrumented tests.
At the moment, defining it as a convention plugin isn't possible due to the bug. That bug is now fixed and will be included in Android Studio Flamingo.
Once Flamingo becomes stable, convert the GMD definitions as a convention plugin (#523 )
Change-Id: I0866369e3d0bbe148ca5ec1f92bad59239a347b8
3 years ago
Don Turner
5ef7084baa
Refactor Topics news feed, tidy a few other bits up
...
Change-Id: Id4c9d1bce484137b363ec4cd21a45ca9863a2e7f
3 years ago
magicalmeghan
286196a43d
fixed string issue for testTopicsChipColorBackground_matchesFollowedState test
3 years ago
magicalmeghan
103a497415
Merge remote-tracking branch 'github/mm/chipcolor' into mm/chipcolor
3 years ago
magicalmeghan
00fe2292ad
removed hardcoded strings
3 years ago
Don Turner
44c01135b9
fix spotless, tidy test data
...
Change-Id: I4ceb7b85e5a8dd4d4f20088b2594c6b4030299bb
3 years ago
magicalmeghan
45144528a3
Updated NewsResourceCardTest
3 years ago
Don Turner
b9771fdb1b
mapToUserNewsResources converts List<NewsResource> to List<UserNewsResource>
...
Change-Id: I072effef0f66caf51227ba8c64f0857fb837308d
3 years ago
Don Turner
e825185652
Move mapping logic into secondary constructor
...
Change-Id: I032326f502d27f2d3bd9fb8273ae44df878d172c
3 years ago
Don Turner
c629c72f69
Move construction of UserNewsResource into separate function
...
Change-Id: I7c1f6427cd7d95c2016349fec301b88455b33cf2
3 years ago