-
Notifications
You must be signed in to change notification settings - Fork 2
S10 Events screen enhancements #277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoded testTag
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tag however shouldn't be hardcoded
| color = MaterialTheme.colorScheme.onBackground, | ||
| modifier = | ||
| Modifier.padding(horizontal = screenWidth / 15) | ||
| .testTag("MyEventsTitle")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoded testTag
DanThePol
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.