HomePhabricator
Diffusion Comm ebb4e63bec75

[web/native] nested quotation display limit

Tags
None
Referenced Files
F156835: image.png
Sep 13 2022, 2:11 AM
File Not Attached
F156829: image.png
Sep 13 2022, 2:11 AM
File Not Attached
F156828: image.png
Sep 13 2022, 2:11 AM
File Not Attached
Subscribers
None

Description

[web/native] nested quotation display limit

Summary:
Problem:
A lot of nested quotation cause native app crash and looks confusing on web, more details in task: ENG-1547

Reason
We process all quotation levels which results with too many recursive calls.

Solution
Limit level of recursion calls, for that we will use state object which according to simple-markdown docs is the mutable state threading object, which can be examined or modified.

Previously:

image.png (740×566 px, 22 KB)

Now:

image.png (454×409 px, 16 KB)

Also, to make that change I needed to change the same code in two places, there are mostly different rules for each platform but don't you think it worth moving those which are overlapped to one place, somewhere in /lib/shared? I'll wait for your opinion and if yes I'll create a task on linear.

Test Plan:

  1. Spam with a lot of > and check if native app do not crash anymore.
  2. Check if nested quotes are parsed properly up to 5 levels (eg. images in Summary section)
  3. Check if combine quotes are processed properly, eg.

image.png (270×264 px, 6 KB)

Reviewers: tomek, jon, atul, abosh, ashoat

Reviewed By: tomek, ashoat

Subscribers: ashoat, atul, abosh

Differential Revision: https://phab.comm.dev/D5033

Details

Provenance
kamilAuthored on Sep 7 2022, 6:04 AM
Reviewer
tomek
Differential Revision
D5033: [web/native] nested quotation display limit
Parents
rCOMM55f930b9caee: [keyserver] Modify `legacyMultimediaMessageCreationResponder` to handle new…
Branches
Unknown
Tags
Unknown