Merge branch 'github/main'

pull/836/head
Automerger 1 year ago
commit da1ee0c412

@ -45,11 +45,6 @@ understanding of which libraries and tools are being used, the reasoning behind
UI, testing, architecture and more, and how all of these different pieces of the project fit UI, testing, architecture and more, and how all of these different pieces of the project fit
together to create a complete app. together to create a complete app.
NOTE: Building the app using an M1 Mac will require the use of
[Rosetta](https://support.apple.com/en-gb/HT211861). See
[the following bug](https://github.com/protocolbuffers/protobuf/issues/9397#issuecomment-1086138036)
for more details.
# Architecture # Architecture
The **Now in Android** app follows the The **Now in Android** app follows the

@ -57,7 +57,11 @@ fun LazyGridScope.newsFeed(
when (feedState) { when (feedState) {
NewsFeedUiState.Loading -> Unit NewsFeedUiState.Loading -> Unit
is NewsFeedUiState.Success -> { is NewsFeedUiState.Success -> {
items(feedState.feed, key = { it.id }) { userNewsResource -> items(
items = feedState.feed,
key = { it.id },
contentType = { "newsFeedItem" },
) { userNewsResource ->
val resourceUrl by remember { val resourceUrl by remember {
mutableStateOf(Uri.parse(userNewsResource.url)) mutableStateOf(Uri.parse(userNewsResource.url))
} }

@ -171,7 +171,7 @@ Using the above modularization strategy, the Now in Android app has the followin
<tr> <tr>
<td><code>core:ui</code> <td><code>core:ui</code>
</td> </td>
<td>Composite UI components and resources used by feature modules, such as the news feed. Unlike the <code>designsystem<code> module, it is dependent on the data layer since it renders models, like news resources. <td>Composite UI components and resources used by feature modules, such as the news feed. Unlike the <code>designsystem</code> module, it is dependent on the data layer since it renders models, like news resources.
</td> </td>
<td> <code>NewsFeed</code> <code>NewsResourceCardExpanded</code> <td> <code>NewsFeed</code> <code>NewsResourceCardExpanded</code>
</td> </td>

@ -182,7 +182,7 @@ internal fun ForYouScreen(
onTopicClick = onTopicClick, onTopicClick = onTopicClick,
) )
item(span = { GridItemSpan(maxLineSpan) }) { item(span = { GridItemSpan(maxLineSpan) }, contentType = "bottomSpacing") {
Column { Column {
Spacer(modifier = Modifier.height(8.dp)) Spacer(modifier = Modifier.height(8.dp))
// Add space for the content to clear the "offline" snackbar. // Add space for the content to clear the "offline" snackbar.
@ -240,7 +240,7 @@ private fun LazyGridScope.onboarding(
-> Unit -> Unit
is OnboardingUiState.Shown -> { is OnboardingUiState.Shown -> {
item(span = { GridItemSpan(maxLineSpan) }) { item(span = { GridItemSpan(maxLineSpan) }, contentType = "onboarding") {
Column(modifier = interestsItemModifier) { Column(modifier = interestsItemModifier) {
Text( Text(
text = stringResource(R.string.onboarding_guidance_title), text = stringResource(R.string.onboarding_guidance_title),

Loading…
Cancel
Save