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

conversation view in inbox and message screen #74

Closed
tomholub opened this issue Aug 8, 2017 · 9 comments · Fixed by #2821
Closed

conversation view in inbox and message screen #74

tomholub opened this issue Aug 8, 2017 · 9 comments · Fixed by #2821
Assignees
Milestone

Comments

@tomholub
Copy link
Collaborator

tomholub commented Aug 8, 2017

this will be a big one - we'll get to this when all of the basics are done

@tomholub tomholub added this to the sometime later milestone Aug 8, 2017
@tomholub tomholub modified the milestones: even later, sometime later Aug 17, 2017
@tomholub
Copy link
Collaborator Author

tomholub commented Sep 5, 2019

part of #714

@tomholub tomholub modified the milestones: even later, soon Jun 3, 2021
@tomholub
Copy link
Collaborator Author

tomholub commented Jun 3, 2021

I'd like to consider a simpler version of this issue.

Did you say there was an issue managing more than one webview on a screen?

To simplify, we could consider:

  • only use conversation view in inbox when Gmail API is used. This means that inbox items will be equivalent between FlowCrypt app and Gmail app
  • when I click a conversation, render a similar conversation list that Gmail renders, where I can click and unpack individual messages in conversation, with the following changes compared to Gmail app:
    • only one email at a time can be unpacked (unpacking another email will pack the previously unpacked email)
    • by default, always unpack the first unread email in the conversation (which contains quoted previous emails anyway - usually)

@DenBond7
Copy link
Collaborator

Hi @sosnovsky. I need some advice on this issue.

Please try the freshest changes at cb0f6c3. (just in case, it may crashes) This commit contains changes that show how I can organize threads in the app.

I've spent a few weeks researching, trying different approaches, and so on. This task is terrible as it will include many breaking changes in the app to support compatibility with IMAP realization for other email providers. I have to review and change about 50% of the app functionality.

I'm asking you to check the current progress as I don't see the appropriate deadline for this task for now(this task can easily take a few weeks more). I've tried to use a similar approach as we have on the iOS app and Gmail app for Android. But it doesn't work well. I can't show the whole conversation on a single screen. The last changes display a list of threads -> clicking on a thread opens ViewPager with thread details(messages list) -> clicking on a message opens ViewPager with message details.

I'd like to hear some feedback. Need to know if it looks ok and if I should work that way. Or I should to find a way to show conversation on a single screen.

@sosnovsky
Copy link
Collaborator

sosnovsky commented Sep 13, 2024

Hi @DenBond7, what are difficulties with implementing full conversation view on the single screen - some technical limitations or it's more about positioning UI elements?
Do you try to implement conversation view only for Gmail or for other IMAP providers too?

Current implementation is better than showing single messages on inbox screen, but having full conversation on the single screen without need to open separate ViewPager for each message will be more convenient, and more common for mobile email clients.

@DenBond7
Copy link
Collaborator

what are difficulties with implementing full conversation view on the single screen - some technical limitations or it's more about positioning UI elements?

If to be short - both of them. More details:

  1. Performance and expected UI behavior. I have HTML. I need to use WebView. It uses more resources than other views. It's logical to use the RecyclerView here for better performance. However, RecyclerView + WebView is not a good choice because both of them use scrolling and conflict. I catch unexpected scrolling and content jumping. I can render all messages as is one by one. It work well, but only for small conversations. For big conversations the app will exceed RAM limitations very soon. Also, I have ViewPager for switching between threads on that screen. It adds more unexpected swipes(but I think it can be fixed). I've tested a lot of mobile clients and haven't found any that implemented a conversation view(looks like it's not simple)) ). Also, I've investigated the Gmail App for Android. It looks like it uses only a single WebView(custom) to show messages in a thread. That's why UI looks smoothy there. Maybe it's the right direction.
  2. IMAP. For now, the conversation view works only for Gmail API. But combining different behaviors generates a lot of changes in the code(database, syncing and so on). + testing all of that. It's a lot of work ((.

Current implementation is better than showing single messages on inbox screen, but having full conversation on the single screen without need to open separate ViewPager for each message will be more convenient, and more common for mobile email clients.

Agree. that's why I looked for your advice)). The main question here - is time. I've already spent a lot of time and don't see the appropriate results. And unfortunately can't predict any deadlines. I need to know if I should continue or maybe it will be better to switch to other issues and leave the current one for a better time.

@sosnovsky
Copy link
Collaborator

IMAP. For now, the conversation view works only for Gmail API. But combining different behaviors generates a lot of changes in the code(database, syncing and so on). + testing all of that. It's a lot of work ((.

Ok, I think we can leave it as is for IMAP, so it'll continue showing single messages, not conversation view.
As IMAP users are probably just a little percent of total users count.

Also, I've investigated the Gmail App for Android. It looks like it uses only a single WebView(custom) to show messages in a thread. That's why UI looks smoothy there. Maybe it's the right direction.

Do you think it's possible to implement conversation view this way in our app too? We can try it, and if you'll see that it should work - let's go this way.

@DenBond7
Copy link
Collaborator

Do you think it's possible to implement conversation view this way in our app too? We can try it, and if you'll see that it should work - let's go this way.

I'm going to investigate it this week

DenBond7 added a commit that referenced this issue Nov 14, 2024
DenBond7 added a commit that referenced this issue Nov 27, 2024
DenBond7 added a commit that referenced this issue Nov 27, 2024
DenBond7 added a commit that referenced this issue Nov 27, 2024
DenBond7 added a commit that referenced this issue Nov 28, 2024
DenBond7 added a commit that referenced this issue Dec 2, 2024
DenBond7 added a commit that referenced this issue Dec 2, 2024
DenBond7 added a commit that referenced this issue Dec 2, 2024
@DenBond7
Copy link
Collaborator

DenBond7 commented Dec 5, 2024

Need to add tests for the following cases(will be updated):

  • Threads list
    • Identify thread with attachments
    • Identify thread with pgp
    • correct recipients and messages count + draft count
      • 1 message in thread
      • a few messages in thread + 1 draft
      • a few messages in thread + a few drafts
      • 1 message in thread + 2 drafts
  • Thread details screen
    • Thread rendering
      • Render thread with a single standard message
      • Render thread with a single encrypted message
      • Render thread with a few only encrypted messages
      • Render thread with a few only standard messages
      • Render thread with mixed messages
      • Render thread with a few messages + single draft
      • Render thread without attachments
    • Attachments
      • Display attachments list
      • preview attachment
      • download attachment
      • downloading inlined encrypted attachments
    • lookup public keys and re-verify signature if missing pubkey(maybe can be moved for later)
    • swipe-to-refresh to fetch the last state of a thread
    • delete a draft
    • Show verification results
    • reply/reply all/forward block for the last one message
    • ability to reply/reply all/forward for some message in a thread
    • forwarding messages with embedded attachments
    • changing reading state for an opened message
    • update thread details during swipe-to-refresh and other updates
    • update thread details after sending a new message
    • handle a situation when a thread is not found
  • Change labels option
    • on thread details screen
    • on threads list screen
  • syncing thread on thread details screen
    • updating labels
    • deleting messages
    • adding a new message
  • add actions on a thread
    • on the threads list screen
      • read/unread
      • delete
      • archive
      • move to spam
      • unspam
      • delete permanently
      • untrash -> move to inbox
    • on the thread details screen
      • unread
      • delete
      • archive
      • move to spam
      • unspam
      • delete permanently
      • untrash -> move to inbox
  • fix drafts
    • editing drafts from the messages list on the thread details screen
    • updating thread messages list after adding a draft
    • updating thread messages list after updating a draft
    • updating thread messages list after deleting a draft
    • deleting a draft after sending a message

sosnovsky pushed a commit that referenced this issue Jan 23, 2025
* Added ThreadEntity.| #74

* Reverted back some changes.| #74

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Added a base implementation of loading threads.| #74

* Added showing thread messages count + correct labels + all recipients in a thread.| #74

* wip

* wip

* Added NewMessageDetailsFragment as a temp container for the future changes.| #74

* wip

* Rename .java to .kt

* wip

* wip

* wip

* Added the final version of MotionLayout in the message details screen.| #74

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Last worked version for separate screens.| #74

* wip

* Added a simple version of thread details fragment.| #74

* Added displaying header.| #74

* Added handling errors during loading messages for a thread.| #74

* Improved item decoration.| #74

* Added expanded state for a messages list.| #74

* wip

* wip

* wip

* Added a cache for WebView height(prevent blinking).| #74

* wip

* wip

* wip

* Fixed asking missed passphrase and process a message then.| #74

* Refactored code

* Added displaying attachments.| #74

* Added updating labels.| #74

* Changed ordering for messages in a thread.| #74

* Added opening the freshest message in a thread.| #74

* Fixed using the same avatar icon for expanded/collapsed state.| #74

* Fixed displaying pgp badges.| #74

* Added displaying reply buttons based on the last message type.| #74

* Added template logic for reply/reply all/forward.| #74

* Added logic for reply/reply all.| #74

* Added a base logic for forward.| #74

* Fixed labels order for item on the threads list screen.| #74

* Fixed deleting threads on the threads list screen.| #74

* Fixed syncing 'unread' state on the threads list screen.| #74

* Fixed syncing 'labels' on the threads list screen.| #74

* Fixed deleting threads on the threads list screen.| #74

* Refactored code

* Fixed syncing 'new' threads and update existing on the threads list screen.| #74

* Fixed syncing 'new' threads and update existing on the threads list screen. Part 2.| #74

* Fixed updating avatars on the threads list screen.| #74

* Added displaying Draft(count) on the threads list screen. + Fixed syncing on on the threads list screen.| #74

* Removed unused code

* Refactored code

* Added actions(delete, read, archive and etc.) to the thread details screen.| #74

* Fixed showing/canceling notification about new message in a thread.| #74

* Fixed deleting thread messages when a thread moved to TRASH.| #74

* Fixed deleting thread messages when a thread was deleted permanently. Refactored code.| #74

* Fixed to use LocalFolder for threads.| #74

* Improved deleting threads.| #74

* Improved archiving threads.| #74

* Improved moving threads.| #74

* Fixed changing read state for an opened message.| #74

* Fixed UI for threads in a list.| #74

* Added identification threads with attachements and PGP. Refactored code.| #74

* Improved EmbeddedAttachmentsProvider(use LruCache).| #74

* Added handling attachment preview.| #74

* Added handling downloading attachments.| #74

* Added a progress with details when downloading and processing a message(simple version).| #74

* Added an option to edit a draft from the message list on the thread details screen.| #74

* Added search threads functionality.| #74

* wip

* Disabled swiping actions when a user is searching messages.| #74

* Fixed broken code.| #74

* Added ability to delete a draft on the thread messages list.| #74

* Modified PgpMsg to skip attachments RAW data if needed.| #74

* Improved displaying and downloading inlined attachments.| #74

* Improved UI.| #74

* Added some missed functionality to MessageExpandedViewHolder.| #74

* Added some missed functionality to MessageExpandedViewHolder. Part 2.| #74

* Added some missed functionality to MessageExpandedViewHolder. Part 3.| #74

* Fixed some compilation issues for tests.| #74

* Added some missed functionality to MessageExpandedViewHolder. Part 4.| #74

* Added some missed functionality to MessageExpandedViewHolder. Part 5.| #74

* Fixed lint issues.| #74

* Fixed displaying duplicate dialogs during fast swiping between threads.| #74

* Improved swiping between threads.| #74

* Fixed preview/downloading inlined encrypted attachments.| #74

* Fixed a small UI issue.| #74

* Added the database migration from 45 to 46. Base steps.| #74

* Added the database migration from 45 to 46. Final steps.| #74

* Restored some code.| #74

* Fixed some tests.| #74

* Fixed some tests.| #74

* Fixed some tests.| #74

* Fixed opening outgoing messages for useGmailConversationMode == true.| #74

* Fixed some issues for IMAP implementation.| #74

* Fixed some UI issues.| #74

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Clean unused code.| #74

* wip

* wip

* Improved UI for drafts.| #74

* wip(fixing drafts functionality).| #74

* wip

* wip

* Added swipe-to-refresh for thread details screen.| #74

* Fixed updating existing drafts.| #74

* Improved UI for drafts.| #74

* Improved UI.| #74

* Migrated to use drafts().send() to send drafts(fixed deleting drafts after sending).| #74

* Fixed labels random position on the thread details screen.| #74

* wip

* wip

* wip

* wip

* wip

* Fixed forwarding messages.| #74

* Fixed some NPE

* Fixed outbox count issue

* Added updating the thread details during swipe-to-refresh and other updates.| #74

* Fixed forwarding messages.| #74

* Fixed onClick for bottom buttons on the thread details screen.| #74

* Fixed a few bugs on the thread details screen.| #74

* Extracted RecipientLookUpManager to a separate class. Refactored code.| #74

* Fixed lookup public keys and re-verify signature if missing pubkey.| #74

* refactored code

* Fixed updating drafts on the thread details screen.| #74

* Fixed updating drafts on the thread details screen. Step 2.| #74

* Fixed updating drafts on the thread details screen. Step 3.| #74

* Fixed updating drafts on the thread details screen. Step 3.| #74

* Handle a situation when a thread not found.| #74

* Fixed updating messages on the thread details screen after sending a message.| #74

* Fixed deleting a draft if a message was send quickly.| #74

* wip

* wip

* Fixed drafts in DRAFT folder.| #74

* wip

* Fixed some tests.| #74

* Fixed lint issue.| #74

* Disabled some tests.| #74

* Fixed showing snippet.| #74

* Fixed subject issue.| #74

* Fixed searching issue.| #74

* Migrated to use the logic "show the freshest in the bottom".| #74

* Added some tests for threads list. Refactored code.| #74

* wip

* wip

* wip

* wip

* wip

* Updated ThreadsListGmailApiFlowTest.| #74

* Added ThreadDetailsGmailApiFlowTest(template).| #74

* wip

* wip

* Refactored code

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants