Skip to content

#954 add cc and bcc recipients#1381

Merged
tomholub merged 22 commits intomasterfrom
feature/issue-954-cc-bcc
Feb 21, 2022
Merged

#954 add cc and bcc recipients#1381
tomholub merged 22 commits intomasterfrom
feature/issue-954-cc-bcc

Conversation

@sosnovsky
Copy link
Collaborator

@sosnovsky sosnovsky commented Feb 14, 2022

This PR adds cc and bcc recipients on compose screen

close #954
close #1352


Tests (delete all except exactly one):

  • Tests added or updated - updated CheckComposeEmailAfterReopening test

To be filled by reviewers

I have reviewed that this PR... (tick whichever items you personally focused on during this review):

  • addresses the issue it closes (if any)
  • code is readable and understandable
  • is accompanied with tests, or tests are not needed
  • is free of vulnerabilities
  • is documented clearly and usefully, or doesn't need documentation

@tomholub
Copy link
Collaborator

Once you get closer to having it ready, please also share a video of the ui - thank you 👍

@sosnovsky
Copy link
Collaborator Author

sosnovsky commented Feb 16, 2022

@tomholub here is video of current implementation of cc/bcc recipients feature:

Simulator.Screen.Recording.-.iPhone.13.-.2022-02-16.at.11.41.32.mp4

@tomholub
Copy link
Collaborator

Looks good so far 👍

@sosnovsky sosnovsky requested a review from tomholub February 18, 2022 15:16
@sosnovsky sosnovsky marked this pull request as ready for review February 18, 2022 15:16
Copy link
Collaborator

@tomholub tomholub left a comment

Choose a reason for hiding this comment

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

Code looks good. I'll test run it now

Comment on lines +810 to +826
private func updateRecipientsNode(layoutHeight: CGFloat, type: RecipientType) {
let currentHeight = self.recipientsNodeHeight(type: type)

guard currentHeight != layoutHeight, layoutHeight > 0 else {
return
}

switch type {
case .to:
self.calculatedRecipientsToPartHeight = layoutHeight
case .cc:
self.calculatedRecipientsCcPartHeight = layoutHeight
case .bcc:
self.calculatedRecipientsBccPartHeight = layoutHeight
}
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

There's quite a bit of rendering or layouting code now in this VC, which makes business logic less obvious. Would it make sense to move it into some sort of decorator or rendering file (specific for this VC) instead of being here? Could be another PR, more of a maintenance task.

Copy link
Collaborator

@tomholub tomholub left a comment

Choose a reason for hiding this comment

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

I'll approve and merge this but it needs improvement.

First: Cc/Bcc recipients are not respected on reply-all. To reproduce:

  1. open a message that has cc or bcc recipients in it. In my case, it was to:me,cc:many people. It could also be from:me,to:somebody,cc:others,bcc:the rest for example.
  2. tap reply all
  3. the message I'm composing now is to:original sender but it's missing all the cc.

Second: The UI is disorderly. Let's follow what Gmail app does more closely - they do it well:

  • instead of Add Recipient placeholder, let's put To label to the left of the input that stays there
  • Similarly for cc and bcc when we expand it. Add cc and bcc to the left as labels
  • Let's auto-collapse all of this, only showing the email bubbles, when switches to subject or body (lost focus)
  • Let's re-expand the recipient area when user taps on the collapsed rendering

This way, we no longer need to have Add Recipient, Add cc Recipient, Add bcc recipient placeholders which take up a lot of space, each occupying own line. When user adds a few recipients, it quickly overwhelms my small screen (12 mini) whereas on Gmail app, it's comfortable.

@tomholub tomholub merged commit 5ce6e81 into master Feb 21, 2022
@tomholub tomholub deleted the feature/issue-954-cc-bcc branch February 21, 2022 14:37
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

Successfully merging this pull request may close these issues.

UI tests failing on Semaphore adding cc and bcc recipients

2 participants