Conversation
|
| Box(contentAlignment = Alignment.Center, modifier = Modifier.fillMaxSize()) { | ||
| val annotatedText = buildAnnotatedString { | ||
| withStyle(style = SpanStyle(color = MaterialTheme.colorScheme.onBackground)) { | ||
| append("You don't have any events yet, explore ") |
There was a problem hiding this comment.
I think that these "magic strings" (lines 198-210) are justified, since it's a message that's used once and is separated into 3 substrings of different text styles that get appended together. Except for the "explore" tag and "explore_link" annotation
| color = MaterialTheme.colorScheme.onBackground, | ||
| modifier = | ||
| Modifier.padding(horizontal = screenWidth / 15) | ||
| .testTag("FavouritesTitle")) |
There was a problem hiding this comment.
This testTag shouldn't be left as a hardcoded string - put it in the resource manager in values/strings.xml and fetch it using getString(LocalContext.current, R.string.string_name)
| color = MaterialTheme.colorScheme.onBackground, | ||
| modifier = | ||
| Modifier.padding(horizontal = screenWidth / 15) | ||
| .testTag("JoinedTitle")) |
| withStyle(style = SpanStyle(color = MaterialTheme.colorScheme.onBackground)) { | ||
| append("You don't have any events yet, explore ") | ||
| } | ||
| pushStringAnnotation(tag = "explore", annotation = "explore_link") |
There was a problem hiding this comment.
The tag however shouldn't be hardcoded
| color = MaterialTheme.colorScheme.onBackground, | ||
| modifier = | ||
| Modifier.padding(horizontal = screenWidth / 15) | ||
| .testTag("MyEventsTitle")) |
DanThePol
left a comment
There was a problem hiding this comment.
Code looks great and it works fine. It would be better if the various tags weren't hardcoded though, so that's the only change I'd like to request. Aside from that there are no problems I can see.



Events screen enhancements
Description:
This PR enhances the user experience by providing a clear message when there are no events to display in the "Joined events," "Favorites," and "My events" categories. Additionally, it makes a portion of this message clickable, guiding users to explore more events.
Changes Made:
Event Filtering Checks:
joinedEvents,favouriteEvents, andmyEventsto store filtered lists of events based on the user’s joined, favorite, and created events.Empty State Message:
joinedEvents,favouriteEvents, andmyEvents) are empty.ClickableText Implementation:
ClickableTextto make the word "here" clickable, with a blue color and underline to indicate its interactivity.Route.EXPLOREscreen.UI Enhancements:
buildAnnotatedStringto style the message appropriately, ensuring the clickable part is visually distinct and functional.Impact:
This change improves the user interface by:
Testing:
Route.EXPLOREscreen.Screenshots:

This PR ensures that users have a guided experience even when their event lists are empty, improving overall engagement with the app.