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/4378/add temporary messages while sending #4422

Merged
merged 40 commits into from
Jan 10, 2025

Conversation

mahibi
Copy link
Collaborator

@mahibi mahibi commented Nov 6, 2024

resolve #4378

🖼️ Screenshots

When sending, a clock icon is shown:

When being offline, an icon is shown:

When sending failed, a warning icon is shown:

On long click, actions are offered for temporary messages:

  • "Copy" button is always available.
  • When sending failed or connection is gone, "Delete" and "Edit" is available.
  • When sending failed, "Resend" button is available.

🚧 TODO

  • recycler view problem
  • implement resend logic
  • change implementation of temporary messages in offline mode (dataStore -> Room)
  • change usage of TemporaryMessageViewHolder (use for sending failed messages and "no-internet-connection" mode)
  • check "Unread messages" bug
  • fix duplicate "Today"-bug (or any other date indicator)
  • add logic to show/hide Resend button
  • add "copy" logic
  • uncomment retry logic (for now commented out to get failed messages on bad connection)
  • undo ReadStatus logic??
  • fix that temp messages are swapped for a moment
  • when editing temp message, keep it's position
  • comment in openHelperFactory
  • DB migration ok?
  • check if parent message handling still works
  • change click handling
  • isSilent (also add to DB migration)
  • try to remove flickering of status (caused by coroutine scope for networkMonitor.isOnline)

for followup (maybe not directly related to this PR, but happened during developing):

  • add logic to check for bad internet connection. Show a warning?
    • e.g. to add solution for StreamResetException when pulling chat messages
  • fix loading spinner overlay with chat messages (not sure if related to this PR)

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔖 Capability is checked or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

@mahibi mahibi force-pushed the feature/4378/addTemporaryMessagesWhileSending branch from d335f4f to 17995ee Compare November 21, 2024 21:45
@mahibi mahibi force-pushed the feature/4378/addTemporaryMessagesWhileSending branch 4 times, most recently from 43335b2 to 85aeab0 Compare December 4, 2024 14:47
@mahibi mahibi force-pushed the feature/4378/addTemporaryMessagesWhileSending branch 4 times, most recently from 3356718 to 14caa73 Compare December 13, 2024 12:51
@mahibi mahibi force-pushed the feature/4378/addTemporaryMessagesWhileSending branch 2 times, most recently from 4fcc62c to fc05012 Compare December 27, 2024 11:46
@mahibi mahibi force-pushed the feature/4378/addTemporaryMessagesWhileSending branch 2 times, most recently from bfe6f70 to 55d0880 Compare January 3, 2025 17:28
@mahibi mahibi marked this pull request as ready for review January 3, 2025 17:28
@mahibi mahibi self-assigned this Jan 3, 2025
@mahibi mahibi added the 2. developing Work in progress label Jan 3, 2025
@mahibi mahibi force-pushed the feature/4378/addTemporaryMessagesWhileSending branch from 55d0880 to c7e8e1f Compare January 6, 2025 11:41
@mahibi mahibi added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Jan 6, 2025
@mahibi mahibi modified the milestones: 20.1.1, 21.0.0 Jan 6, 2025
@alperozturk96
Copy link

alperozturk96 commented Jan 7, 2025

Maybe when the device is offline, the icon could be replaced with a schedule icon instead of the “Wi-Fi off” icon.

@nimishavijay
Copy link
Member

Super nice! :) Small design feedback:

  • Instead of a loading spinner, we could use a schedule symbol to make it less distracting (similar to Whatsapp and Telegram, they show a very similar icon)
  • Instead of the warning icon in the screenshot, we can use the error symbol, also for consistency with other apps (eg. SMS app in Android)
  • I'm wondering if we could the same error symbol for even the "no connection" state, as it is just another type of error where you can edit/resend etc. The red banner is already very eye catching, and I haven't seen a similar icon in any other apps, so I'm thinking it might confuse users. What do you think? :)

@mahibi
Copy link
Collaborator Author

mahibi commented Jan 7, 2025

Super nice! :) Small design feedback:

* [ ]  Instead of a loading spinner, we could use a [schedule symbol](https://fonts.google.com/icons?icon.query=time&selected=Material+Symbols+Outlined:schedule:FILL@0;wght@400;GRAD@0;opsz@24&icon.size=24&icon.color=%23222222) to make it less distracting (similar to Whatsapp and Telegram, they show a very similar icon)

We have loading spinners on web, desktop app and iOS, so i think we should have it for android as well..?

* [ ]  Instead of the warning icon in the screenshot, we can use the [error symbol](https://fonts.google.com/icons?icon.query=warning&selected=Material+Symbols+Outlined:error:FILL@0;wght@400;GRAD@0;opsz@24&icon.size=24&icon.color=%23222222), also for consistency with other apps (eg. SMS app in Android)

fine for me

* [ ]  I'm wondering if we could the same error symbol for even the "no connection" state, as it is just another type of error where you can edit/resend etc. The red banner is already very eye catching, and I haven't seen a similar icon in any other apps, so I'm thinking it might confuse users. What do you think? :)

In "no connection" state, the resend button is not available. When using the same icon for both states it would be confusing when the resend button is available or not. So i suggest to have seperate icons.
Not sure if the schedule icon suggested by @alperozturk96 is the best suggestion for it.. We have to keep in mind that at some point we want to have scheduled messages and we also need an icon for it..
The iOS app uses also a loading spinner when being offline, but i think all the movements are too much when having multiple messages pending..

Maybe @nickvergessen has opinions on this?

@nimishavijay
Copy link
Member

We have loading spinners on web, desktop app and iOS, so i think we should have it for android as well..?

I would say for Android we follow the standard of other apps on Android so it looks as native as possible :) also because of what you mentioned

but i think all the movements are too much when having multiple messages pending

So I'd suggest the schedule icon instead of the loading spinner

We have to keep in mind that at some point we want to have scheduled messages and we also need an icon for it..

Taking a quick look at Signal and Telegram, a calendar icon is used in those, so we could do the same

the resend button is not available. When using the same icon for both states it would be confusing when the resend button is available or not. So i suggest to have seperate icons.

Oh I see! Then it makes sense.

@nickvergessen
Copy link
Member

Instead of a loading spinner, we could use a schedule symbol to make it less distracting (similar to Whatsapp and Telegram, they show a very similar icon)

We have loading spinners on web, desktop app and iOS, so i think we should have it for android as well..?

I think we shouldn't use the schedule icon as scheduling is still a planned feature and it would be confusing?

mahibi added 11 commits January 10, 2025 12:32
Signed-off-by: Marcel Hibbe <[email protected]>
Signed-off-by: Marcel Hibbe <[email protected]>
Signed-off-by: Marcel Hibbe <[email protected]>
Signed-off-by: Marcel Hibbe <[email protected]>
by moving networkMonitor.isOnline to separate check and by setting
binding.checkMark.visibility = View.INVISIBLE
binding.sendingProgress.visibility = View.GONE
before setting the status icons
to to handle recyclerview behavior

Signed-off-by: Marcel Hibbe <[email protected]>
during sending: edit and delete should not be shown..

Signed-off-by: Marcel Hibbe <[email protected]>
Signed-off-by: Marcel Hibbe <[email protected]>
@mahibi mahibi force-pushed the feature/4378/addTemporaryMessagesWhileSending branch from e82585d to 6e24cca Compare January 10, 2025 11:36
@mahibi
Copy link
Collaborator Author

mahibi commented Jan 10, 2025

/backport to stable-20.1

Copy link
Contributor

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/4422-talk.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud Talk app.

@mahibi mahibi force-pushed the feature/4378/addTemporaryMessagesWhileSending branch from ec23fa6 to 4f4ac5e Compare January 10, 2025 12:19
Copy link
Contributor

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/4422-talk.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud Talk app.

Copy link
Contributor

Codacy

Lint

TypemasterPR
Warnings106104
Errors3636

SpotBugs

CategoryBaseNew
Bad practice66
Correctness222222
Dodgy code7171
Internationalization33
Malicious code vulnerability33
Performance44
Security11
Total310310

Copy link
Member

@nickvergessen nickvergessen left a comment

Choose a reason for hiding this comment

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

🐘

@mahibi mahibi merged commit 88bb5d5 into master Jan 10, 2025
18 checks passed
@mahibi mahibi deleted the feature/4378/addTemporaryMessagesWhileSending branch January 10, 2025 12:43
@mahibi
Copy link
Collaborator Author

mahibi commented Jan 10, 2025

not backported.
will be released with v21.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show pending indicator for messages that are being sent (incl retry)
5 participants