-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature
: Add recent section, search bar and sorting to dashboard
#384
base: improvement/redesign-dashboard
Are you sure you want to change the base?
Feature
: Add recent section, search bar and sorting to dashboard
#384
Conversation
…ity for requesting and saving recently accessed courses
Feature
: Add recent section to dashboardFeature
: Add recent section, search bar and sorting to dashboard
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.
Awesome, I like this change!
I have a few code comments and one general remark:
When using the sorting option or the search, it looks like the LazyColumn tries to remember which element the user has been looking at previously and adjusts the scroll state to still show that item after reordering.
https://github.com/user-attachments/assets/42d236b7-db20-4611-8495-c710fa6c53ff
Here the "General Testing Course" is the topmost course and in focus, and when I press the change order button, I would expect to see the (previous) bottommost element ("Test Course Matthias Linhuber"). But instead I still see the "General Testing Course" and have to scroll to the top of the list to see the "Test Course Matthias Linhuber"
...rc/main/kotlin/de/tum/informatics/www1/artemis/native_app/feature/dashboard/ui/CourseList.kt
Outdated
Show resolved
Hide resolved
...n/de/tum/informatics/www1/artemis/native_app/feature/dashboard/ui/CourseOverviewViewModel.kt
Outdated
Show resolved
Hide resolved
...n/de/tum/informatics/www1/artemis/native_app/feature/dashboard/ui/CourseOverviewViewModel.kt
Show resolved
Hide resolved
...n/de/tum/informatics/www1/artemis/native_app/feature/dashboard/ui/CourseOverviewViewModel.kt
Outdated
Show resolved
Hide resolved
...in/kotlin/de/tum/informatics/www1/artemis/native_app/feature/dashboard/ui/CoursesOverview.kt
Outdated
Show resolved
Hide resolved
...in/kotlin/de/tum/informatics/www1/artemis/native_app/feature/dashboard/ui/CoursesOverview.kt
Outdated
Show resolved
Hide resolved
I agree, this is really unintuitive and feels strange, I added function to always save the last list position before changing the sorting and doing filtering. This way after doing a reordering the list can revert to its previous position. It should all work as expected now. Could you check again, @FelberMartin? |
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.
Looking very nice now!
...rc/main/kotlin/de/tum/informatics/www1/artemis/native_app/feature/dashboard/ui/CourseList.kt
Outdated
Show resolved
Hide resolved
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 lgtm!
Also functionality works as described 😊.
Problem Description
As mentioned in #350 the recent section is currently missing in the Android app. Furthermore it is currently not possible to search for a course or change the ordering of courses in the last as it is in the web app.
Changes
This PR is a follow up PR of #380 and adds the recent section and a search bar as well as a button to change the alphabetical order of the list.
The recently accessed section includes the last three accessed courses and is is implemented in a new
DashboardStorageService
that usesandroidx.datastore
to store the last three accessed courses as a json string and provides decoding and encoding functionality.The architecture of the dashboard state has been modified to be a mutableStateFlow to enable filtering and sorting.
Steps for testing
Screenshots