Review main Merged

77514[FEATURE] Add additional parameters to email links

dkd-suleman CR +2 V +2 Hard +237 −46 updated 03/24/23, 21:27

Commit message

It is now possible to define additional
fields (subject, cc, bcc, body) to links to emails
by default.

This means, that in the link picker of the
TYPO3 Backend, emails can now be filled
with additional fields, and the TYPO3
Frontend renders the mailto link properly
encoded.

The <f:link.email> Fluid ViewHelper now
also accepts the new properties:
 * subject
 * cc
 * bcc
 * body

This change also fixes some problems with
existing links with percent-encoded parameters (RFC 3986)
(see tests).

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Guido Schmechel +1
    • Andreas Kienast +1
  • Verified V +2 Done
    • Benni Mack +2
    • Guido Schmechel +1
    • Andreas Kienast +1
    • core-ci +1 CI

Issues 2

Files 13

Review log 84114

Show 6689 earlier messages
  1. dkd-suleman uploaded patch set 1 01/20/23, 10:48

  2. core-ci voted on patch set 1 V +1 01/20/23, 11:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36328

  3. Jörg Bösche voted on patch set 1 CR +1 01/23/23, 08:55

  4. Georg Ringer commented on patch set 1 CR -1 01/23/23, 08:59

    locallang_browse_links.xlf:39

    please use some better readable ids and maybe also prefix with "email."?
  5. Josef Glatz commented on patch set 1 CR -1 01/23/23, 09:09

    Feature-84594-AddURIParametersToEmailLinkHandler.rst:17

    An example fluid snippet would be also nice for simply showing the resulting attribute names
  6. dkd-suleman uploaded patch set 2 CR +1 V +1 01/23/23, 09:52

  7. core-ci voted on patch set 2 V -1 01/23/23, 10:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36455

  8. dkd-suleman uploaded patch set 3 V -1 01/23/23, 10:05

  9. core-ci voted on patch set 3 V +1 01/23/23, 10:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36456

  10. dkd-suleman commented on patch set 3 01/23/23, 10:24

    Feature-84594-AddURIParametersToEmailLinkHandler.rst:17 Reply

    I really didn't understand yout point, this feature will be active in future.
  11. dkd-suleman uploaded patch set 4 V +1 01/23/23, 10:27

  12. dkd-suleman commented on patch set 4 01/23/23, 10:28

    locallang_browse_links.xlf:39 Reply

    Fixed
  13. core-ci voted on patch set 4 V +1 01/23/23, 10:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36457

  14. dkd-suleman uploaded patch set 5 V +1 01/23/23, 10:57

  15. core-ci voted on patch set 5 V +1 01/23/23, 11:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36458

  16. Josef Glatz commented on patch set 5 01/23/23, 14:59

    Feature-84594-AddURIParametersToEmailLinkHandler.rst:17 Reply

    ahh. I thought about a ViewHelper :-D Sorry, my fault.
  17. Stefan Bürk commented on patch set 5 CR -1 01/23/23, 22:08

    MailLinkHandler.php:96

    I guess, we can simply use `null coalescing operator` fallback here - eventully with a string cast(not sure about that).

    MailLinkHandler.php:97

    This code is not safe. if corresponding array paths does not exists it emits undefined array key errors. (For example if on a content element for the link field the linkbrowser is opened and email tab is selected). The array accesses should be properly guarded and checked befor simple using it.

    Mail.html:29

    I would rethink the ordering of the fields. The most use field is the input below for the emailadress along with the set link field. That alone should make that field to be more upper. Beside that, it does not make sense to have the "required" email (main recipient) after CC and BCC .. that's quite user unfriendly. However, I'm not really a UX expert, but I wouldn't buy the current implementation.
  18. Stefan Bürk commented on patch set 5 01/23/23, 22:14

    Basicly nice feature, but still the one or other issue which needs to be addressed first.
    exceeding max commit message line length (max 72, 74 given), see: https://docs.typo3.org/m/typo3/guide-contributionworkflow/main/en-us/Appendix/CommitMessage.html#description-message-body Beside this .. can we formulate the commit message in a like more precise way ? This change only provides corresponding input fields to the email linkhandler. This is basically a enhancement, but I would like to see if we can mention what can be expected by that change. If suggestes are needed, let me know.
    superflous empty line, however nitpick
  19. dkd-suleman uploaded patch set 6 CR -1 V +1 01/24/23, 09:15

  20. dkd-suleman commented on patch set 6 01/24/23, 09:20

    Reply

    1. Fixed line length. 2. Commit message: Please share your suggestion. Thanks
  21. dkd-suleman commented on patch set 6 01/24/23, 09:20

    MailLinkHandler.php:96 Reply

    Fixed.
  22. dkd-suleman commented on patch set 6 01/24/23, 09:24

    Reply

    fixed
  23. core-ci voted on patch set 6 V +1 01/24/23, 09:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36517

  24. dkd-suleman commented on patch set 6 01/24/23, 09:24

    MailLinkHandler.php:97 Reply

    Fixed
  25. dkd-suleman uploaded patch set 7 V +1 01/24/23, 09:38

  26. dkd-suleman commented on patch set 7 01/24/23, 09:40

    Mail.html:29 Reply

    Changed the order. I am also not UX expert :)
  27. core-ci voted on patch set 7 V +1 01/24/23, 09:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36524

  28. Jan Delius commented on patch set 7 V -1 01/25/23, 15:03

    The multi-line body is packed onto one line when saving.
  29. dkd-suleman commented on patch set 7 01/25/23, 15:18

    Reply

    I have tested, it's working properly with Firefox and Chrome.
  30. dkd-suleman commented on patch set 7 01/25/23, 15:26

    Reply

    Just tested with Safari. Everything is fine. Please check again and if you still have issues then please tell me the complete details of your test. Thanks
  31. Jan Delius commented on patch set 7 01/26/23, 08:32

    Reply

    I'm using Chrome 109.0.5414.120 on Windows 11. If i put a multi lined body text into the wizard, the line endings get removed as soon as the wizard gets closed. If i reopen the wizard, both lines are just a single one.
  32. dkd-suleman commented on patch set 7 01/26/23, 08:40

    Reply

    Please add any screenshot or gif in Ticket for better understanding. Thanks.
  33. Jan Delius commented on patch set 7 01/26/23, 08:47

    Reply

    I've added screenshots now
  34. Jan Delius commented on patch set 7 01/26/23, 09:44

    Reply

    After some more research: Working in ckeditor, but not in a custom TCA type => 'link'
  35. dkd-suleman uploaded patch set 8 V +1 02/08/23, 13:30

  36. dkd-suleman commented on patch set 8 02/08/23, 13:31

    Reply

    Resolved
  37. dkd-suleman commented on patch set 8 02/08/23, 13:31

    Reply

    Done
  38. dkd-suleman uploaded patch set 9 02/08/23, 13:34

  39. dkd-suleman uploaded patch set 10 02/08/23, 13:50

  40. core-ci voted on patch set 8 V -1 02/08/23, 13:56 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37366

  41. core-ci voted on patch set 9 V -1 02/08/23, 13:57 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37368

  42. Mario Lubenka uploaded patch set 11 02/08/23, 13:59

  43. core-ci voted on patch set 10 V -1 02/08/23, 14:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37369

  44. dkd-suleman uploaded patch set 12 02/08/23, 14:06

  45. Jan Delius commented on patch set 12 02/08/23, 14:12

    MailLinkHandler.php:101

    ?? '' is useless here, as you now check exists before.
  46. dkd-suleman uploaded patch set 13 02/08/23, 14:15

  47. dkd-suleman commented on patch set 12 02/08/23, 14:15

    MailLinkHandler.php:101 Reply

    Resolved
  48. core-ci voted on patch set 11 V -1 02/08/23, 14:18 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37372

  49. core-ci voted on patch set 12 V -1 02/08/23, 14:28 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37374

  50. core-ci voted on patch set 13 V -1 02/08/23, 14:36 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37375

  51. dkd-suleman uploaded patch set 14 V -1 02/08/23, 14:52

  52. core-ci voted on patch set 14 V -1 02/08/23, 15:35 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37383

  53. dkd-suleman uploaded patch set 15 V -1 02/08/23, 15:58

  54. dkd-suleman uploaded patch set 16 02/08/23, 16:01

  55. core-ci voted on patch set 15 V -1 02/08/23, 16:05 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37385

  56. core-ci voted on patch set 16 V -1 02/08/23, 16:17 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37386

  57. dkd-suleman rebased onto patch set 17 V -1 02/09/23, 13:13

  58. dkd-suleman uploaded patch set 18 02/09/23, 13:27

  59. core-ci voted on patch set 17 V -1 02/09/23, 13:28 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37455

  60. core-ci voted on patch set 18 V +1 02/09/23, 13:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37457

  61. Jan Delius commented on patch set 18 V -1 02/09/23, 14:48

    Editor is working now, but generated link in frontend contains encoded params which goes directly into mail application. For example, all @ chars are replaced with '%40', all line breaks results in a text '%0A'.
  62. Jan Delius commented on patch set 18 02/09/23, 14:54

    Reply

    Functioning is relative here. Double encoding occurs in the link field. For example, a blank character becomes "%2520" instead of "%20". As a result, it only becomes "%20" as text in the frontend.
  63. dkd-suleman uploaded patch set 19 V +1 02/09/23, 17:31

  64. dkd-suleman commented on patch set 19 02/09/23, 17:32

    Reply

    Resolved.
  65. core-ci voted on patch set 19 V -1 02/09/23, 17:57 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37484

  66. dkd-suleman uploaded patch set 20 V -1 02/10/23, 07:48

  67. core-ci voted on patch set 20 V +1 02/10/23, 07:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37525

  68. Jan Delius voted on patch set 20 V +1 CR +1 02/10/23, 10:00

  69. Guido Schmechel commented on patch set 20 02/11/23, 12:44

    What about the blindLinkFields option? As an integrator I would like to be able to control the new fields as well :-) Regardless, the patch worked flawlessly for me.
  70. dkd-suleman commented on patch set 20 02/13/23, 09:23

    Reply

    I just check, these options (blindLinkOptions, blindLinkFields,allowedExtensions) are about to deprecate and will not available in future:)
  71. Jan Delius commented on patch set 20 02/13/23, 09:30

    Reply

    It seems like the old way of definition is deprecated, but the possibility still exists: https://docs.typo3.org/m/typo3/reference-tca/main/en-us/ColumnsConfig/Type/Link/Properties/Appearance.html#appearance -> allowedOptions
  72. dkd-suleman commented on patch set 20 02/13/23, 09:54

    Reply

    In core for example on header_link standard this option is not set. And, it take all the fields. I don't understand why to include this option?
  73. Jan Delius commented on patch set 20 02/13/23, 11:05

    Reply

    As an administrator, you should be able to hide the fields (e.g. BCC). The option should not be set by default.
  74. dkd-suleman commented on patch set 20 02/13/23, 13:20

    Reply

    As administrator or as an integrator ? I din't find any option in backend to configure those fields.
  75. Jan Delius commented on patch set 20 02/13/23, 13:30

    Reply

    More likely a integrator. As docu says, that is a tca option, not a backend field.
  76. dkd-suleman commented on patch set 20 02/13/23, 13:38

    Reply

    Ok :) I try to implement this.
  77. Jan Delius commented on patch set 20 03/20/23, 12:42

    Reply

    What is the status on this? Night week (on 28.03.) is the feature freeze of the 12. The feature in the 12 would be really desirable.
  78. Jan Delius commented on patch set 20 03/20/23, 12:43

    Reply

    *next Week
  79. Benni Mack commented on patch set 20 03/20/23, 22:29

    Care to rebase this patch?
  80. dkd-suleman commented on patch set 20 03/21/23, 07:22

    Reply

    Yes, i take care of this..

    Reply

    I hope before feature freeze will implement this.
  81. dkd-suleman uploaded patch set 21 CR +1 V +1 03/23/23, 11:12

  82. dkd-suleman commented on patch set 21 03/23/23, 11:13

    Reply

    done
  83. core-ci voted on patch set 21 V +1 03/23/23, 11:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39463

  84. Benni Mack commented on patch set 21 03/23/23, 11:55

    LinkBrowserController.php:58

    I think we can move this to the typolinkCodecService... I can give it a try.
  85. Andreas Kienast commented on patch set 21 03/23/23, 12:10

    Will take care of my comments once Benni is done in any way.

    mail-link-handler.ts:39

    `for (let elementName of possibleParams) {`

    mail-link-handler.ts:42

    Perhaps `URLSearchParams` API can be used instead.
  86. Benni Mack uploaded patch set 22 V +1 03/23/23, 13:06

  87. core-ci voted on patch set 22 V -1 03/23/23, 13:26 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39469

  88. Andreas Kienast uploaded patch set 23 V -1 03/23/23, 14:01

  89. core-ci voted on patch set 23 V -1 03/23/23, 14:34 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39476

  1. Benni Mack uploaded patch set 24 V -1 03/23/23, 21:21

  2. core-ci voted on patch set 24 V -1 03/23/23, 22:27 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39498

  3. Benni Mack uploaded patch set 25 V -1 03/23/23, 22:29

  4. core-ci voted on patch set 25 V -1 03/23/23, 22:43 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39500

  5. Andreas Kienast uploaded patch set 26 V -1 03/24/23, 14:32

  6. Andreas Kienast commented on patch set 26 03/24/23, 14:33

    mail-link-handler.ts:39 Reply

    Done

    mail-link-handler.ts:42 Reply

    Done
  7. core-ci voted on patch set 26 V -1 03/24/23, 14:47 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39560

  8. Benni Mack uploaded patch set 27 V -1 03/24/23, 16:15

  9. core-ci voted on patch set 27 V +1 03/24/23, 16:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39574

  10. Benni Mack uploaded patch set 28 V +1 03/24/23, 16:39

  11. Benni Mack commented on patch set 28 V +1 CR +1 03/24/23, 16:39

    Reply

    Added this, and also documented it. I now hope that we have enough reviews to get this feature in!

    LinkBrowserController.php:58 Reply

    Done
  12. core-ci voted on patch set 28 V +1 03/24/23, 16:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39576

  13. Guido Schmechel commented on patch set 28 V -1 03/24/23, 18:38

    The values for CC, BCC, Subject and Body are converted for me. For example, an @ becomes %40. Tested with Windows/Outlook. I can also reproduce this in the RTE: Generate link / Modal opens Set values Close modal with "Set link" Open modal again Here you can see the conversions, too
  14. Andreas Kienast commented on patch set 28 03/24/23, 19:02

    Reply

    At least for bcc and cc it's wrong, I guess. Subject and body *must* get converted.
  15. Benni Mack commented on patch set 28 V -1 CR 0 03/24/23, 19:55

    will re-check...
  16. Benni Mack uploaded patch set 29 V +1 03/24/23, 20:16

  17. Benni Mack commented on patch set 29 V +1 CR +1 03/24/23, 20:17

    now it works again
  18. core-ci voted on patch set 29 V +1 03/24/23, 20:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39596

  19. Benni Mack uploaded patch set 30 CR +1 V +1 03/24/23, 21:09

  20. Guido Schmechel commented on patch set 29 V -1 03/24/23, 21:09

    Open the modal again, now shows the correct values. Everything is fine in the backend. Unfortunately, the data is not yet coded correctly in the frontend. Tested under Windows with Mail and Thunderbird.
  21. core-ci voted on patch set 30 V +1 03/24/23, 21:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39603

  22. Guido Schmechel voted on patch set 30 V +1 CR +1 03/24/23, 21:19

  23. Andreas Kienast voted on patch set 30 V +1 CR +1 03/24/23, 21:22

  24. Benni Mack voted on patch set 30 V +2 CR +2 03/24/23, 21:27

  25. Benni Mack merged patch set 31 03/24/23, 21:27