Repository: Automattic/pocket-casts-android
File: modules/features/search/src/main/java/au/com/shiftyjelly/pocketcasts/search/SearchAutoCompleteResultsPage.kt (Kotlin)

Code before:
                                .padding(horizontal = 16.dp),
                            thickness = 0.5.dp,
                            color = MaterialTheme.theme.colors.secondaryText02,
                        )
                    }
                }
            }

            if (results.isNotEmpty()) {
                item {
                    TextP40(
                        modifier = Modifier
                            .clickable(
                                onClick = {
                                    onTermClick(SearchAutoCompleteItem.Term(searchTerm))
                                },
                            )
                            .padding(vertical = 8.dp, horizontal = 16.dp),
                        text = stringResource(LR.string.search_suggestions_view_all, searchTerm),
                        color = MaterialTheme.theme.colors.primaryInteractive01,
                    )
                }
            }
        }
    }
}

@Preview
@Composable
private fun PreviewSearchAutoCompleteResultsPage(
    @PreviewParameter(ThemePreviewParameterProvider::class) themeType: Theme.ThemeType,
) {
    AppThemeWithBackground(themeType) {
        SearchAutoCompleteResultsPage(
            isLoading = false,
            searchTerm = "matching",
            results = listOf(
                SearchAutoCompleteItem.Term("matching text"),
                SearchAutoCompleteItem.Term("matching text longer"),
                SearchAutoCompleteItem.Term("text only matching later"),
                SearchAutoCompleteItem.Term("this doesn't match but why is it returned then?"),
                SearchAutoCompleteItem.Folder(uuid = "", title = "folder matching", podcasts = listOf(SearchAutoCompleteItem.Podcast(uuid = "", title = "Podcast", author = "", isSubscribed = true)), color = 0x00ffff),
                SearchAutoCompleteItem.Podcast(uuid = "", title = "Matching podcast subscribed", author = "Author2", isSubscribed = true),
                SearchAutoCompleteItem.Podcast(uuid = "", title = "Matching podcast", author = "Author", isSubscribed = false),
            ),
            onTermClick = {},
            onEpisodeClick = {},
            onPodcastClick = {},
            onPodcastFollow = {},
            onFolderClick = {},
            onScroll = {},

Review comment (suggestion):
```suggestion
                        color = MaterialTheme.theme.colors.primaryInteractive01,
                        maxLines = 1,
                    )
```
This is very minor but I wonder if we should limit it to 1 line.

| Before | After |
| --- | --- |
| <img width="1198" height="2531" alt="Image" src="https://github.com/user-attachments/assets/8c30db60-2e53-4dc6-8eea-1a9265fd6b47" /> | <img width="1198" height="2531" alt="Image" src="https://github.com/user-attachments/assets/8a8168f2-1347-4574-a1e5-4899ab000480" /> |





Code after:
                        HorizontalDivider(
                            modifier = Modifier
                                .fillMaxWidth()
                                .padding(horizontal = 16.dp),
                            thickness = 0.5.dp,
                            color = MaterialTheme.theme.colors.secondaryText02,
                        )
                    }
                }
            }

            if (results.isNotEmpty()) {
                item {
                    TextP40(
                        modifier = Modifier
                            .semantics { role = Role.Button }
                            .clickable(
                                onClick = {
                                    onTermClick(SearchAutoCompleteItem.Term(searchTerm))
                                },
                            )
                            .padding(vertical = 8.dp, horizontal = 16.dp),
                        text = stringResource(LR.string.search_suggestions_view_all, searchTerm),
                        color = MaterialTheme.theme.colors.primaryInteractive01,
                        maxLines = 1,
                    )
                }
            }
        }
    }
}

@Preview
@Composable
private fun PreviewSearchAutoCompleteResultsPage(
    @PreviewParameter(ThemePreviewParameterProvider::class) themeType: Theme.ThemeType,
) {
    AppThemeWithBackground(themeType) {
        SearchAutoCompleteResultsPage(
            isLoading = false,
            searchTerm = "matching",
            results = listOf(
                SearchAutoCompleteItem.Term("matching text"),
                SearchAutoCompleteItem.Term("matching text longer"),
                SearchAutoCompleteItem.Term("text only matching later"),
                SearchAutoCompleteItem.Term("this doesn't match but why is it returned then?"),
                SearchAutoCompleteItem.Folder(uuid = "", title = "folder matching", podcasts = listOf(SearchAutoCompleteItem.Podcast(uuid = "", title = "Podcast", author = "", isSubscribed = true)), color = 0x00ffff),
                SearchAutoCompleteItem.Podcast(uuid = "", title = "Matching podcast subscribed", author = "Author2", isSubscribed = true),
                SearchAutoCompleteItem.Podcast(uuid = "", title = "Matching podcast", author = "Author", isSubscribed = false),
            ),
            onTermClick = {},