Commit graph

2614 commits

Author SHA1 Message Date
Danila Fedorin 012ef2b215 Validate w/h and avoid use of properties object. 2021-07-12 13:42:39 -07:00
Danila Fedorin 1e9cdbafd4 Move test-specific code into the testing function. 2021-07-12 13:31:33 -07:00
Danila Fedorin fd17ffecfb Pass parameters to parseHTMLBody directly instead of via object. 2021-07-12 12:55:33 -07:00
Danila Fedorin c261b9fb23 Avoid intermediate objects while parsing TextTiles' bodies. 2021-07-12 12:47:22 -07:00
Danila Fedorin 9304ca330e Rewrite deserialize as a class to avoid passing options around. 2021-07-12 12:19:51 -07:00
Danila Fedorin abd62373e5 Remove copy of MediaRepository mxcUrl parsing. 2021-07-09 13:09:19 -07:00
Danila Fedorin 1435c2c9a2 Add HTML sanitization to domain layer. 2021-07-09 13:06:24 -07:00
Danila Fedorin 695bdec9fe Match the thumbnail width and height in in-message images. 2021-07-08 14:41:05 -07:00
Danila Fedorin b3dabc2054 Limit image size 2021-07-08 00:20:35 -07:00
Danila Fedorin d38c52d311 Display images in messages 2021-07-08 00:16:58 -07:00
Danila Fedorin c582b723bd Start working on images. 2021-07-07 23:40:16 -07:00
Danila Fedorin 1a14719483 Wrap DOM iterables in array. 2021-07-07 14:12:24 -07:00
Danila Fedorin 92e82a76c7 Add basic styling to code block 2021-07-07 13:05:24 -07:00
Danila Fedorin e02163b0ff Properly display ul in message bodies. 2021-07-07 13:05:10 -07:00
Danila Fedorin eca5308742 Move deserialization into domain and fix tests. 2021-07-07 12:21:10 -07:00
Danila Fedorin 41d82c4cdd Add some deserialization tests. 2021-07-06 19:11:05 -07:00
Danila Fedorin e08aa7df88 Add HTML parser library for tests. 2021-07-06 19:10:36 -07:00
Danila Fedorin 49df21e465 Display lists. 2021-07-06 16:48:31 -07:00
Danila Fedorin 1da35be148 Better handle list start attribute. 2021-07-06 16:14:35 -07:00
Danila Fedorin e56b15237e Parse formatted message bodies in addition to plain ones. 2021-07-06 16:14:04 -07:00
Bruno Windels f515407491
Merge pull request #404 from MidhunSureshR/fix-402
Handle avatar image error
2021-07-05 07:48:48 +00:00
Danila Fedorin cfa686867c Make parse a function that returns a MessageBody 2021-07-02 18:20:07 -07:00
Danila Fedorin 6ba2deffef Make small tweaks to formatted representation. 2021-07-02 18:19:40 -07:00
Danila Fedorin 005580f385 Move HTML parsing into platform. 2021-07-02 15:05:50 -07:00
Danila Fedorin 8f44cc21db Correct two uses of ==. 2021-07-02 00:41:28 -07:00
Danila Fedorin 824e66a62f Add some comments. 2021-07-02 00:23:59 -07:00
Danila Fedorin 94f6c99ea6 Begin a parser implementation from HTML into an internal representation. 2021-07-02 00:18:37 -07:00
Danila Fedorin db202b23ae Add some prototype rendering implementations. 2021-07-01 13:55:01 -07:00
Danila Fedorin cc506756a1 Add code tag to HTML 2021-07-01 13:55:01 -07:00
Danila Fedorin 4ee15005f5 Inline code blocks don't contain other elements 2021-07-01 13:55:01 -07:00
Danila Fedorin fd12baae3b Add some other message parts as demo. 2021-07-01 13:55:01 -07:00
Danila Fedorin ad868818c7 Add some initial thoughts on the implementation. 2021-07-01 13:55:01 -07:00
RMidhunSuresh 191613adbe Make changes
- use textContent where possible
- make sure we have an image before adding title

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-01 19:21:54 +05:30
RMidhunSuresh b8c01272f4 remove listener on dispose
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-01 15:42:07 +05:30
RMidhunSuresh 93e77a3fcd Only add attribute if we have avatar
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-01 15:41:40 +05:30
RMidhunSuresh 03a913629f Pass color as data attribute
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-01 15:25:28 +05:30
Bruno Windels 71d0124146
Merge pull request #405 from DanilaFe/dm-color-fix
Ensure room color in DM, timeline, and left panel is the same.
2021-07-01 08:03:26 +00:00
Danila Fedorin f7d6569154 Add a small comment to Invite.avatarColorId, too. 2021-06-30 15:21:11 -07:00
Danila Fedorin b40f946b85 Add JSDoc to new Hero method 2021-06-30 15:15:08 -07:00
Danila Fedorin ee1f1500e9 Roll back to using heroes for computing DM color 2021-06-30 15:07:40 -07:00
RMidhunSuresh 9ed6cd57f3 use textContent
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-01 00:01:38 +05:30
RMidhunSuresh 168b1d6247 Move AvatarView to separate file
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-30 23:51:14 +05:30
RMidhunSuresh b469c4299f implement new approach
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-30 23:30:44 +05:30
RMidhunSuresh bcaf84e545 Revert commits
This reverts commit 5f1346568d.

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-30 23:28:13 +05:30
Danila Fedorin d0f70cbdf9 Move avatar color ID computation into SummaryData 2021-06-29 18:01:08 -07:00
Danila Fedorin dec0683145 Correctly color archived and invited rooms 2021-06-29 16:50:42 -07:00
RMidhunSuresh b42f7e1a36 remove both handlers
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-29 19:50:37 +05:30
RMidhunSuresh 8b6ff533e8 Add and remove opposing event listeners
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-29 15:51:11 +05:30
Danila Fedorin 6527a0c677 Make the room color match up on the left panel, too. 2021-06-28 11:54:49 -07:00
Danila Fedorin 97854423c4 Ensure DM rooms have the same color in timeline and left panel. 2021-06-28 11:44:27 -07:00