-
Notifications
You must be signed in to change notification settings - Fork 3
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
Enhancing FeedbackScreen with Performance Metrics #283
Conversation
…into feature/improve-feedback-2
… in current implementation
…into feature/improve-feedback-2
…into feature/improve-feedback-2
…into feature/improve-feedback-2
} | ||
} | ||
else -> { | ||
Text( | ||
text = "No feedback available.", | ||
style = AppTypography.bodyLargeStyle, | ||
color = MaterialTheme.colorScheme.secondary) | ||
color = MaterialTheme.colorScheme.secondary, | ||
modifier = Modifier.testTag("feedbackNoMessage")) |
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.
Good adaptation for the dark mode. Well done.
// Display Talk Time Percentage | ||
MetricDisplayItem( | ||
title = "Talk Time (Percentage)", | ||
value = |
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.
Could have added tests for the MetricDisplayItem.
var feedbackMessage by remember { mutableStateOf<String?>(null) } | ||
var decisionResult by remember { mutableStateOf<ChatViewModel.DecisionResult?>(null) } | ||
var isLoading by remember { mutableStateOf(true) } | ||
var errorMessage by remember { mutableStateOf<String?>(null) } | ||
|
||
val practiceContext by apiLinkViewModel.practiceContext.collectAsState() | ||
val userProfile by userProfileViewModel.userProfile.collectAsState() | ||
val talkTimePercentageMean = userProfile?.statistics?.talkTimePercMean |
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.
You should replace the talk time percentage mean by the paceMean.
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 pull request significantly enhances the FeedbackScreen by adding performance metrics (Talk Time in Seconds and Percentage) and introducing a reusable composable function for displaying metrics. It maintains strong UI consistency and adds robust testing, ensuring maintainability and improved user experience. Good code coverage, 0 code duplication and CI passes. Well done.
Feature Value:
- Adding Talk Time metrics provides insights into users' speaking sessions, improving the app's value. (Talk Time percentage could be replaced by pace as we updated it in stats screen)
- The feedback messages guide users effectively, encouraging further interactions.
- Introducing MetricDisplayItem composable is a clean and reusable solution, reducing redundancy.
UI Consistency:
- The FeedbackScreen integrates well the new metrics without disrupting existing layouts.
- Proper alignment and styling are maintained
UI Test Coverage:
- The PR introduces comprehensive UI tests to validate the presence and visibility of metric titles and values.
Fixes:
- Well done removing the ChatGPT Prompt being the first message we see on ChatScreen. (Though not related to this PR. It would be better to do it in another PR)
Suggestions:
- Could add UI tests for MetricDisplayItem (your code coverage is good regardless)
- You should replace the talk time percentage stat by the pace to be consistent with the stat screen
- Generally, avoid doing unrelated tasks in the same PR (in this case its a small change)
Overall, other than the replacement of talk time percentage by the pace your PR is ready for merging. Good job.
…into feature/improve-feedback-2
Quality Gate passedIssues Measures |
Summary
This PR enhances the
FeedbackScreen
by integrating key performance metrics—Talk Time (Seconds) and Talk Time (Percentage)—to provide users with valuable insights into their speaking sessions. It introduces a reusable composable function,MetricDisplayItem
, to streamline the presentation of metrics and improve code maintainability. Comprehensive UI tests have been added to validate the correctness and reliability of these features.Related Issues
Key Changes
1. Display of Performance Metrics in FeedbackScreen
2. Creation of
MetricDisplayItem
Composable3. UI Enhancements
FeedbackScreen
to accommodate the new metrics seamlessly without disrupting existing design elements.4. ChatGPT Prompt Displayed
4. Comprehensive UI Testing
Example Interaction
Scenario: User Completes a Session
120.00
75.50%
Strengths
MetricDisplayItem
composable simplifies code structure and enhances maintainability.Potential Areas for Improvement
3. Future Scalability
Conclusion
This PR significantly enhances the
FeedbackScreen
by introducing essential performance metrics and improving the overall user experience. The reusableMetricDisplayItem
composable and comprehensive testing ensure a maintainable and robust implementation. I'm looking forward for your comments on this new PR!