Skip to content
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: Save messages for later #259

Merged
merged 63 commits into from
Jan 23, 2025

Conversation

FelberMartin
Copy link
Collaborator

@FelberMartin FelberMartin commented Dec 30, 2024

Problem Description

The Android app did not yet support the "Saved Messages" feature recently introduced in the webapp. This PR introduces the related use cases.

Changes

  • Created new network service SavedPostService
    • Extended BasePost with new SavedPost
  • Created actions to mark/unmark a post as saved
  • Created new section in the ConversationOverview for Saved messages
  • Introduced new SavedPostsScreen for displaying the list of saved posts
    • Implemented design heavily inspired by the webapp
    • Pressing on a saved post navigates the user to the post's thread
    • Long pressing on a post shows a BottomSheet with action to change the status
    • Introduced MetisModificationTaskHandler for sharing MetisModification functionality
    • Changed core of PostItem to be re-used by SavedPostItem
  • Created tests

Steps for testing

  • Go to any chat
    • Long press on a post to show to action bottomSheet and save it for later -> Post is highlighted in blue and a "Saved for later" indicator is shown
    • Click on post to show it in the thread view
    • Here you can also change the isSaved via the ActionTabBar
  • Go back to the conversationOverview
    • Notice the new "Saved messages" section
    • Click on "In progress" -> saved messages are shown
    • Click on the saved post -> navigate to the post's thread
    • Navigate back
    • Change the savedPostStatus of the post via the action bottomSheet

Screenshots

20250110-1626-45.7874155.mp4

Known Issues

Further Input needed : Sometimes I could observe that when navigating to a post via the SavedPostScreen that the thread failed to load. Even after multiple retries the thread only very shortly showed up but then disappeared again. I could not consistently reproduce this issue, so if you find a scenario where this occurs regularly, please let me know

@FelberMartin FelberMartin added the database changes This PR includes database changes and should be treated with extra care when merging label Dec 30, 2024
@FelberMartin FelberMartin self-assigned this Dec 30, 2024
@FelberMartin FelberMartin changed the base branch from develop to chore/set-tum-artemis-server-as-default December 31, 2024 11:03
Copy link
Contributor

@julian-wls julian-wls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really nice and works as expected.

Regarding the flickering of the PostActionBar: I also noticed that after the reload the isSaved Button is sometimes not correctly updated, but I wa not able to constantly reproduce this.
I also noticed some padding issues, see below:

@FelberMartin
Copy link
Collaborator Author

I added the paddings as requested. While debugging the padding I found that there are some issues with the padding propagated by the CourseScreenUI, but I will create a follow up PR about this, this PR is already way to huge :D

Regarding the inconsistent icon in the PostActionBar I was not able to reproduce it. In case you find out how, let me know :)

Copy link
Contributor

@eylulnc eylulnc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking really nice! One point for discussion: what do you think about placing the button in 'In Progress' inside the text area (I dont know if its possible though😅), aligned to the right, or using icon buttons like on the web? Just a thought to improve UI but not a must 😅

@FelberMartin
Copy link
Collaborator Author

One point for discussion: what do you think about placing the button in 'In Progress' inside the text area (I dont know if its possible though😅), aligned to the right, or using icon buttons like on the web? Just a thought to improve UI but not a must 😅

It is somehow possible, we can not directly put the button inside the textarea, but next to or below it. That's what it would look like with the button inside the card:

image

Compared to previous:
image

Let me know what you think @eylulnc :D

@eylulnc
Copy link
Contributor

eylulnc commented Jan 18, 2025

One point for discussion: what do you think about placing the button in 'In Progress' inside the text area (I dont know if its possible though😅), aligned to the right, or using icon buttons like on the web? Just a thought to improve UI but not a must 😅

It is somehow possible, we can not directly put the button inside the textarea, but next to or below it. That's what it would look like with the button inside the card:

image

Compared to previous: image

Let me know what you think @eylulnc :D

I really like the new one, I think it looks more appealing 😊

Copy link
Contributor

@julian-wls julian-wls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code lgtm now,
I agree with @eylulnc. The new design with the button inside the list item looks better.
I also tested the changes once again in detail and couldn't find any issues. This branch can be merged imo.

…ion/save-messages-for-later

# Conflicts:
#	app/src/main/java/de/tum/informatics/www1/artemis/native_app/android/db/AppDatabase.kt
#	feature/core-modules-test/src/test/kotlin/de/tum/informatics/www1/artemis/native_app/feature/coremodulestest/AppModuleTest.kt
#	feature/course-view/src/main/kotlin/de/tum/informatics/www1/artemis/native_app/feature/courseview/ui/course_overview/CourseUiScreen.kt
#	feature/metis/conversation/src/test/kotlin/de/tum/informatics/www1/artemis/native_app/feature/metis/conversation/BaseChatUITest.kt
#	feature/metis/conversation/src/test/kotlin/de/tum/informatics/www1/artemis/native_app/feature/metis/conversation/ui/ConversationProfilePictureUiTest.kt
#	feature/metis/conversation/src/test/kotlin/de/tum/informatics/www1/artemis/native_app/feature/metis/conversation/ui/post/ConversationBottomSheetUiTest.kt
#	feature/metis/src/main/kotlin/de/tum/informatics/www1/artemis/native_app/feature/metis/ConversationConfiguration.kt
#	feature/metis/src/main/kotlin/de/tum/informatics/www1/artemis/native_app/feature/metis/ui/SinglePageConversationBody.kt
#	feature/metis/src/test/kotlin/de/tum/informatics/www1/artemis/native_app/feature/metis/communication_moduleTest.kt
@FelberMartin FelberMartin added ready to merge This PR can be merged and removed ready for review This PR can be reviewed labels Jan 22, 2025
…ater

# Conflicts:
#	core/ui/src/main/kotlin/de/tum/informatics/www1/artemis/native_app/core/ui/Spacings.kt
#	feature/metis/conversation/src/main/kotlin/de/tum/informatics/www1/artemis/native_app/feature/metis/conversation/ui/post/PostItem.kt
#	feature/metis/conversation/src/test/kotlin/de/tum/informatics/www1/artemis/native_app/feature/metis/conversation/BaseChatUITest.kt
#	feature/metis/manage-conversations/src/main/kotlin/de/tum/informatics/www1/artemis/native_app/feature/metis/manageconversations/ui/conversation/create_personal_conversation/PotentialRecipientsUi.kt
@FelberMartin FelberMartin merged commit 1ab77bb into develop Jan 23, 2025
5 checks passed
@FelberMartin FelberMartin deleted the feature/communication/save-messages-for-later branch January 23, 2025 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
database changes This PR includes database changes and should be treated with extra care when merging ready to merge This PR can be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants