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

Hide the quoted email when display a reply #2902

Open
DenBond7 opened this issue Dec 2, 2024 · 9 comments
Open

Hide the quoted email when display a reply #2902

DenBond7 opened this issue Dec 2, 2024 · 9 comments
Assignees
Milestone

Comments

@DenBond7
Copy link
Collaborator

DenBond7 commented Dec 2, 2024

          I also noticed that for every reply ever received in the thread conversation view, the quoted email is permanently shown, whether it is an indented blockquote or uses ">" for the quoted email.

image

Meanwhile, Gmail and the FlowCrypt browser extension hide the previous conversations/quoted emails and provide a triple-dot icon button that, when clicked, reveals the previous conversation. I just thought it might be something missing or an improvement for UX to help users focus on the important replies first.

image

image

Originally posted by @martgil in #2821 (comment)

@DenBond7 DenBond7 self-assigned this Dec 2, 2024
@DenBond7 DenBond7 added this to the 1.6.0 milestone Dec 2, 2024
@DenBond7 DenBond7 modified the milestones: 1.6.2, 1.6.3 Dec 24, 2024
@DenBond7 DenBond7 modified the milestones: 1.6.3, 1.6.2 Jan 23, 2025
@DenBond7
Copy link
Collaborator Author

@sosnovsky
Copy link
Collaborator

No, it's done natively - we toggle shouldShowQuote flag when user taps ... button.
And depending on shouldShowQuote value we show/hide quoteNode

https://github.com/FlowCrypt/flowcrypt-ios/blob/72cb26b61786a736f91f6dad2c0a42d655410237/FlowCryptUI/Cell%20Nodes/MessageTextSubjectNode.swift#L80

@DenBond7
Copy link
Collaborator Author

And depending on shouldShowQuote value we show/hide quoteNode

private let messageNode = ASEditableTextNode()
private let quoteNode = ASEditableTextNode()

messageNode or quoteNode - is it a view(part of UI, Sorry, I don't know the right terminology) that can show HTML?

You have a separate view to show base content and quoted text. Right?

@ioanmo226
Copy link
Collaborator

ioanmo226 commented Jan 23, 2025

The messageNode and quoteNode are similar to TextView components, which display message content and quote content, respectively.
To show HTML content in iOS, we first convert the HTML to an NSAttributedString.
This NSAttributedString is then set as the content for both the messageNode and quoteNode.

When the user taps the toggleQuoteButtonNode, it triggers an action that toggles the visibility of the quoteNode.

@DenBond7
Copy link
Collaborator Author

One more question

On Android, we sanitize received content. We have the following

Do you have something similar?

Why am I asking? I have to use WebView to show received content because we allow some tags that I can't show inside TextView. Just interesting what is permitted on iOS.

@DenBond7
Copy link
Collaborator Author

DenBond7 commented Feb 3, 2025

@sosnovsky @ioanmo226 One more question. How do you identify quotes for encrypted messages?

@sosnovsky
Copy link
Collaborator

We have simple check for finding lines which start from On and end with wrote: - https://github.com/FlowCrypt/flowcrypt-ios/blob/72cb26b61786a736f91f6dad2c0a42d655410237/FlowCrypt/Functionality/Mail%20Provider/Message%20Provider/ProcessedMessage.swift#L160

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

No branches or pull requests

3 participants