tmail-flutter icon indicating copy to clipboard operation
tmail-flutter copied to clipboard

Display Answered / Forwarded keywords

Open chibenwa opened this issue 3 years ago • 3 comments

Description

As a user I want to see which emails I answered or forwarded from the EmailList.

Today not done with TMail.

Here is what Thunderbird looks like as a reference:

Screenshot from 2022-10-21 14-08-00

Suggestions, at least for TMail Web:

Screenshot from 2022-10-21 14-05-07

Cc @dieptran88 do a design for it.

chibenwa avatar Oct 21 '22 07:10 chibenwa

@hknguyen91, please take a look and then create the prototype with it. From my aspect, it is useful, but maybe mess the view. I am a big fan of minimalism :)

hoangdat avatar Oct 21 '22 07:10 hoangdat

@hknguyen91, please take a look and then create the prototype with it. From my aspect, it is useful, but maybe mess the view. I am a big fan of minimalism :)

At the very least on "Web" view

chibenwa avatar Oct 21 '22 07:10 chibenwa

Screenshot_20221021-144441_Email

Here is an example of samsung mail app that also displays it.

chibenwa avatar Oct 21 '22 07:10 chibenwa

@hoangdat @chibenwa You should make a ticket with this involving cases such as the first time you replied, it'll show up the back arrow icon, what happens when this discussion come up with multiple mailings? The same with forward. And actually, this came up with a pre-word like this:https://www.figma.com/file/rRVxJpCu1G22D0jqyvK7I9/TeamMail?node-id=2654%3A159609

And I believed Dat already implement this.

hknguyen91 avatar Oct 24 '22 02:10 hknguyen91

what happens when this discussion come up with multiple mailings?

I do not understand the question

And actually, this came up with a pre-word like this:https://www.figma.com/file/rRVxJpCu1G22D0jqyvK7I9/TeamMail?node-id=2654%3A159609

I do not see anything related to Forward / reply in this figma...

chibenwa avatar Oct 24 '22 05:10 chibenwa

We could be having a little display next to the attachment icon

CF

Screenshot from 2022-10-24 13-53-22

BTW this is what the samsung email client is currently doing.

chibenwa avatar Oct 24 '22 06:10 chibenwa

I mean what was this icon represent? If this icon indicates you have answered an email yet or not, then what happens if I get an email (1), then I answered that email ( the arrow icon display)(2), and then the sender replied to it (3), so now (3), does the icon appear, still? and this time, if I reply to this discussion (4), then what is this icon represent? For the case of (4) or (2)?

=> What was this icon(4) represent? A discussion or only that you have replied to this?

hknguyen91 avatar Oct 24 '22 07:10 hknguyen91

If YOU replied to this email, the icon appears.

We do not care about the sender replying to your reply and so on and so on.

There is currently no notion of "conversation".

chibenwa avatar Oct 24 '22 07:10 chibenwa

To be applied

hoangdat avatar Oct 25 '22 04:10 hoangdat

@dieptran88 please create design ticket

hoangdat avatar Oct 25 '22 04:10 hoangdat

@dieptran88 do we have a design ticket for this?

chibenwa avatar Mar 30 '23 01:03 chibenwa

Yes, we discussed about this with Khanh

dieptran88 avatar Mar 30 '23 01:03 dieptran88

The design is validated: image

dieptran88 avatar Mar 30 '23 02:03 dieptran88

@hoangdat can we add this to the backlog?

@dieptran88 what do we do when the mail is both answered and forwarded?

chibenwa avatar Mar 30 '23 05:03 chibenwa

If an email has been replied to (1) and then forwarded (2), the icon will update to the newest state (2)

dieptran88 avatar Mar 30 '23 06:03 dieptran88

If an email has been replied to (1) and then forwarded (2), the icon will update to the newest state (2)

No there is no notion of "latest state" in email flag storage, Diep.

Anyway the behaviour of other mail apps is to show both (2 icons, or 1 icon combining both arrow).

Can you add this case in the visual?

chibenwa avatar Mar 30 '23 08:03 chibenwa

@dieptran88

chibenwa avatar Apr 03 '23 04:04 chibenwa

the design is updated image

dieptran88 avatar Apr 03 '23 12:04 dieptran88

Hi @chibenwa @Arsnael

I'm trying this case, I replied to an email from another account then I checked the response that email I don't see keywords: answered or forwarded. Could you help me support this case? Thanks all

Request

{
  "using": [
    "urn:ietf:params:jmap:core",
    "urn:ietf:params:jmap:mail",
    "urn:apache:james:params:jmap:mail:shares"
  ],
  "methodCalls": [
    [
      "Email/get",
      {
        "accountId": "9039d9068b20a681e63de6e52f0476b1d10efbc82153a690eb92dcb040517b90",
        "ids": [
          "7c884da0-d74b-11ed-85d9-2f62cdc4d454"
        ],
        "properties": [
          "bodyValues",
          "htmlBody",
          "attachments",
          "headers",
          "keywords",
          "mailboxIds"
        ],
        "fetchHTMLBodyValues": true
      },
      "c0"
    ]
  ]
}

Response

{
    "sessionState": "2c9f1b12-b35a-43e6-9af2-0106fb53a943",
    "methodResponses": [
        [
            "Email/get",
            {
                "accountId": "9039d9068b20a681e63de6e52f0476b1d10efbc82153a690eb92dcb040517b90",
                "notFound": [],
                "state": "eab51b50-d74b-11ed-85d9-2f62cdc4d454",
                "list": [
                    {
                        "id": "7c884da0-d74b-11ed-85d9-2f62cdc4d454",
                        "keywords": {
                            "$seen": true
                        },
                        "headers": [
                            {
                                "name": "Return-Path",
                                "value": " <[email protected]>"
                            },
                            {
                                "name": "org.apache.james.rspamd.flag",
                                "value": " NO"
                            },
                            {
                                "name": "org.apache.james.rspamd.status",
                                "value": " No, actions=no action score=2.0 requiredScore=15.0"
                            },
                            {
                                "name": "Received",
                                "value": " from postfix-in-0.postfix-in.tenant-upn.svc.cluster.local (EHLO incoming.upn.integration-open-paas.org) ([10.2.1.11])\r\n          by smtp.upn.integration-open-paas.org (JAMES SMTP Server ) with ESMTP ID 44037389\r\n          for <[email protected]>;\r\n          Mon, 10 Apr 2023 02:57:41 +0000 (UTC)"
                            },
                            {
                                "name": "Received",
                                "value": " from smtp.upn.integration-open-paas.org (unknown [10.2.2.0])\r\n\tby incoming.upn.integration-open-paas.org (Postfix) with ESMTPS id 1B9013A\r\n\tfor <[email protected]>; Mon, 10 Apr 2023 02:57:40 +0000 (UTC)"
                            },
                            {
                                "name": "Received",
                                "value": " from [192.168.1.34] (unknown [222.252.23.73])\r\n\tby smtp.upn.integration-open-paas.org (Postfix) with ESMTPSA id C05A021032\r\n\tfor <[email protected]>; Mon, 10 Apr 2023 02:57:39 +0000 (UTC)"
                            },
                            {
                                "name": "Message-ID",
                                "value": " <8db6533a-33aa-a6e0-d5b4-4c1b269817d3@upn.integration-open-paas.org>"
                            },
                            {
                                "name": "Date",
                                "value": " Mon, 10 Apr 2023 09:57:33 +0700"
                            },
                            {
                                "name": "MIME-Version",
                                "value": " 1.0"
                            },
                            {
                                "name": "User-Agent",
                                "value": " Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0)\r\n Gecko/20100101 Thunderbird/102.9.0"
                            },
                            {
                                "name": "Content-Language",
                                "value": " en-US"
                            },
                            {
                                "name": "To",
                                "value": " [email protected]"
                            },
                            {
                                "name": "From",
                                "value": " 23 <[email protected]>"
                            },
                            {
                                "name": "Content-Type",
                                "value": " text/plain; charset=UTF-8; format=flowed"
                            },
                            {
                                "name": "Content-Transfer-Encoding",
                                "value": " 7bit"
                            }
                        ],
                        "attachments": [],
                        "htmlBody": [
                            {
                                "charset": "UTF-8",
                                "size": 14,
                                "partId": "1",
                                "blobId": "7c884da0-d74b-11ed-85d9-2f62cdc4d454_1",
                                "language": [
                                    "en-US"
                                ],
                                "type": "text/plain"
                            }
                        ],
                        "mailboxIds": {
                            "fcc1fcf0-30a9-11eb-9a8d-254ee97830fe": true
                        },
                        "bodyValues": {
                            "1": {
                                "value": "anh Dat 23\r\n\r\n",
                                "isEncodingProblem": false,
                                "isTruncated": false
                            }
                        }
                    }
                ]
            },
            "c0"
        ]
    ]
}

nqhhdev avatar Apr 10 '23 03:04 nqhhdev

@nqhhdev is the user firstname29.surname29?

Other question: does Tmail flutter sets up those keywords? Like when you read a mail you update the keyword seen to true, if yo don't add those keywords after doing a forward or sent? I would think likely in the onSuccessUpdateEmail part when doing the "EmailSubmission/set" method call, where you can set those keywords when email is sent successfully.

If you do that and it does not work, then we might investigate on backend. If you don't do that yet, please try :)

Arsnael avatar Apr 10 '23 05:04 Arsnael

Just paste me your "EmailSubmission/set" method when sending a mail (answering and forwarding). If the keywords are not set in the onSuccessUpdateEmail then that's likely the root of the issue

Arsnael avatar Apr 10 '23 05:04 Arsnael

I'm trying this case, I replied to an email from another account then I checked the response that email

Answered / Forwarded only applies to your account. They are set on your mails when you reply / forward.

chibenwa avatar Apr 10 '23 05:04 chibenwa

$ curl -XPOST https://jmap.linagora.com/jmap -H "Accept: application/json;jmapVersion=rfc-8621" -H "Authorization: Basic zzzzzzz" -d '{"using": ["urn:ietf:params:jmap:core", "urn:ietf:params:jmap:mail"],"methodCalls": [  [  "Email/get",  { "accountId": "50fb9073ba109901291988b0d78e8a602a6fcd96fbde033eb46ca308779f8fac", "ids": ["bc37ec80-d75f-11ed-be1d-93359ff9f82c"], "properties": ["keywords"]},"c0" ] ]}   ' | jq .
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   643  100   367  100   276    393    295 --:--:-- --:--:-- --:--:--   689
{
  "sessionState": "2c9f1b12-b35a-43e6-9af2-0106fb53a943",
  "methodResponses": [
    [
      "Email/get",
      {
        "accountId": "50fb9073ba109901291988b0d78e8a602a6fcd96fbde033eb46ca308779f8fac",
        "notFound": [],
        "state": "6e4066a0-d760-11ed-be1d-93359ff9f82c",
        "list": [
          {
            "id": "bc37ec80-d75f-11ed-be1d-93359ff9f82c",
            "keywords": {
              "nonjunk": true,
              "$forwarded": true,
              "$seen": true,
              "$answered": true
            }
          }
        ]
      },
      "c0"
    ]
  ]
}

chibenwa avatar Apr 10 '23 05:04 chibenwa