Commit graph

2199 commits

Author SHA1 Message Date
RMidhunSuresh
5338457ea0 Use normalized index in recreateItem
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
85924aba92 Fix update method
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
4cb9adc9ea Remove misleading comment
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
9a00143623 Improve comment
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
96e2bb0b1a Add explaining comment
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
f05574f579 Fix updates
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
452eee6767 Incorporate lazyrender code from element
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
ee072343f5 Switch to lazy list
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
0b9f4a5e1d Add LazyListView
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
1d5b16395f Export function
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
35f6043d06 Support slice
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
db515d48c1 Inline flatten method
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
53fc6a7af9 Check prev name is string
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
11d411c9a9 Add failing test
For empty names not un-disambiguating

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
89e256e563 Return array to prevent fetching again
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
ea06d4f88e Eliminate double lookup
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
da1e981948 name changes
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
ad6122a5b6 Add explaining comment
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
41806b5e82 Remove duplication
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
ab0a48ab31 rename rightpanel to right-panel
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
3bb82e55bf Disambiguator is not async
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
e935423814 Remove duplication in RightPanelViewModel 2021-07-16 17:08:18 +05:30
RMidhunSuresh
bcfd1bd135 Support loading view for all panels
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
d64d07aee5 Move loading view into separate file
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
3fb89a81bc Add some initial styling
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
7139711314 Add avatar to tile
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
86c1550850 Switch to collator for perf reasons
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
3d4ba20150 Put up a temporary loading view
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
ef40027502 Call disambiguate on update/map
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
bcb46fc54a Make tile vm support disambiguation
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
b8542c6754 Implement name disambiguation
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
dea0cad252 Fix bug in FilteredMap
Caused multiple updates to be triggered.

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
404129f60e Settle on MappedMap
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
f41c835e91 Support updater in MappedMap
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
0819dcb29e Use MappedList instead of MappedMap
- MappedList supports an optional updater method

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
b62473ae79 Add update method
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
4fcaac3865 Add binding in view
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
11eb9c7783 Use set instead of add in memberlist
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
2e8c4563aa Implement set method to support update from value
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
a1e3ff3ed8 Use name instead of displayName
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
a9ff6ab026 Sort memberlist using powerlevel
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
3e23392a0e Consider powerlevels in comparator and add tests
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
cb5e598e95 Getter for powerlevel from room
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
f7a6fbd901 Make getUserLevel() public
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
ddb7a16fb8 Make member private
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
7e72d57be7 Make list scrollable
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
abd2c19bf2 Remove unused param
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
a765d7fc7d Create memberlist view from rightpanel
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
f3c7ab337d Remove code from session view/vm
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
46a6cf6adf Add memberlist to navigation
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
1418645e15 Modify CSS to reflect changes
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
dfe7385611 Accommodate "rightpanel" navigation segment
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
8b01ca502e Create RightPanel from SessionViewModel
- Also remove old methods used in RoomDetails

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
7500bbeaad Modify navigation to work with rightpanel segment
- Ensure that rightpanel does not show in the URL.
- Create an action of details to insert the rightpanel segment.
- Make sure rightpanel can be a child of room.

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
b74e4452dd Move rightpanel to separate view and vm
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
7e6e4ecfab Duplicate navigation from room details
- TODO: Remove duplication

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh
69237fce85 Basic barebones of memberlist view
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
Danila Fedorin
c619eba8cf Add some styling to the tables. 2021-07-15 13:19:54 -07:00
Danila Fedorin
d69b78469c Add table viewing code. 2021-07-15 13:19:54 -07:00
Danila Fedorin
f6f29adacc Add a comment about avatar.js 2021-07-15 13:16:42 -07:00
Danila Fedorin
c13daedcb0 Ignore non-absolute links. 2021-07-15 13:15:56 -07:00
Bruno Windels
fb3c090de2 confirm the leave room 2021-07-15 14:30:16 +02:00
Danila Fedorin
ba7e86ac8d Add blocquote style. 2021-07-14 18:11:09 -07:00
Danila Fedorin
025ab16668 Fix /me body rendering. 2021-07-14 18:10:59 -07:00
Danila Fedorin
038b101ed7 Render matrix.to user links as pills 2021-07-14 17:57:53 -07:00
Danila Fedorin
78d7d556e4 Add blockquote and del elements. 2021-07-14 12:38:55 -07:00
Danila Fedorin
763e1cd5de Add tentative version of linkification. 2021-07-13 16:56:46 -07:00
Danila Fedorin
0c05ff459c Add another test. 2021-07-13 15:14:03 -07:00
Danila Fedorin
5e39eb8f6c Do some additional validation, blocking block nodes inside inline nodes. 2021-07-13 14:47:10 -07:00
Danila Fedorin
4b92903ddd Add a test for auto-closing tags. 2021-07-12 15:16:04 -07:00
Danila Fedorin
4022c6121b Switch to DOMPurify in platform layer for sanitization. 2021-07-12 15:00:16 -07:00
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
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
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
RMidhunSuresh
5f1346568d Handle avatar error
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-28 23:18:07 +05:30
Bruno Windels
09aba78803
Merge branch 'master' into room-info 2021-06-24 15:06:37 +00:00
Bruno Windels
dbaef5117a
Merge pull request #384 from vector-im/bwindels/reactions
Reactions
2021-06-24 15:01:44 +00:00
Bruno Windels
eee1be1ceb safari doesn't like empty string key paths 🙄 2021-06-24 16:16:15 +02:00
Bruno Windels
bb6417dab9 fix lint 2021-06-24 15:24:53 +02:00
Bruno Windels
5984e8dd6d don't show reactions for redacted messages 2021-06-24 14:49:43 +02:00
Bruno Windels
787308375c prevent toggling in vm while already busy
otherwise the check in SendQueue to prevent duplicates might fail
2021-06-24 14:33:16 +02:00
Bruno Windels
575f3fa966 fix tests 2021-06-24 14:28:10 +02:00
Bruno Windels
299294daff prevent re(d)action in left/kicked room 2021-06-24 14:24:22 +02:00
Bruno Windels
3fa0f234bb not used 2021-06-24 14:12:55 +02:00
Bruno Windels
20ae21ead5 add some more emoji fonts that might be install by default 2021-06-24 14:12:41 +02:00
Bruno Windels
366d3761b8 remove waiting for update event (it might not come in case of dupe)
also remove duplicate logging impl for re(d)action at cost of
double haveAnnotation call
2021-06-24 13:35:59 +02:00
Bruno Windels
b148368d5b test different keys do work still 2021-06-24 13:29:13 +02:00
Bruno Windels
7557e2f437 not used 2021-06-24 13:26:14 +02:00
Bruno Windels
668c0aff36 drop duplicate reactions in send queue, as last measure of defence 2021-06-24 13:25:58 +02:00
Bruno Windels
38b465cb9d rename vm.toggleReaction to vm.toggle 2021-06-24 13:15:20 +02:00
Bruno Windels
c46c330efb prevent duplicate redactions from distorting reaction local echo 2021-06-24 13:14:54 +02:00
Bruno Windels
061f44f475 extract methods here 2021-06-24 12:56:23 +02:00
Bruno Windels
a4a7c23148 use pending re(d)action timestamp to have stable reaction sorting order
also move more logic into the matrix layer, from Reaction(s)ViewModel
to PendingAnnotation
2021-06-24 12:26:38 +02:00
RMidhunSuresh
eb35f46214 Make sure room does exist before creating vm
- This will stop the code from throwing when opening /details on
  UnknownRoomView.

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-24 14:58:02 +05:30
RMidhunSuresh
a273b25bac Remove css assumption
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-24 14:52:48 +05:30
RMidhunSuresh
e2fd90bdc2 Remove Segment import
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-24 13:48:53 +05:30
Bruno Windels
52957beb82 don't encrypt reactions 2021-06-23 17:49:27 +02:00
Bruno Windels
3c7ccc90b2 fix css for reaction view and do some renaming
also add some user-select:none
2021-06-23 17:48:21 +02:00
Bruno Windels
c585d76ce5 also clear pending reaction promise when an error is thrown 2021-06-23 17:47:47 +02:00
Bruno Windels
1a5a64864a don't double log redactReaction 2021-06-23 17:47:18 +02:00
Bruno Windels
e125599a47 prevent decryption result getting lost after reaction updates entry 2021-06-23 17:38:52 +02:00
Bruno Windels
48588687a5 share logic whether have reacted already between basemsgtile & reactvm 2021-06-23 15:38:12 +02:00
Bruno Windels
a1d24894eb this will block if we have a pending redaction & reaction
so the reaction won't be aborted
2021-06-23 11:45:24 +02:00
Bruno Windels
442d4cce03 make the react/redactReaction promise only return after update happened 2021-06-23 11:44:53 +02:00
Bruno Windels
18562d30d8 integration tests for local echo of toggling reactions 2021-06-23 11:43:14 +02:00
Bruno Windels
4d19f8d21d this should return any promise returned, otherwise breaks tests 2021-06-23 11:42:32 +02:00
Bruno Windels
8991632105 add redaction mock utility fn 2021-06-23 11:42:16 +02:00
Bruno Windels
b153613200 determine toggle state correctly with both pending redaction & reaction 2021-06-23 11:41:28 +02:00
Bruno Windels
616d701ebb add test that redaction for non-sending event aborts it 2021-06-21 19:02:42 +02:00
Bruno Windels
0e750db9ae write unit tests for (re)aggregating annotations in RelationWriter 2021-06-21 18:16:21 +02:00
Bruno Windels
d1345d0f83 write test for redaction in RelationWriter 2021-06-21 17:52:02 +02:00
Bruno Windels
81f06f565e write tests for AsyncMappedList 2021-06-21 17:26:08 +02:00
RMidhunSuresh
12305be06a Fix issue #397
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-19 16:01:02 +05:30
Bruno Windels
1fc1d2c79b fix lint 2021-06-18 15:09:34 +02:00
Bruno Windels
11fba12083 add tests for remote reaction target being added after pending event 2021-06-18 15:09:14 +02:00
Bruno Windels
0703cf8915 cleanup 2021-06-18 15:06:49 +02:00
Bruno Windels
5bea8130f2 more timeline annotation tests 2021-06-18 14:39:54 +02:00
Bruno Windels
9f99cf4b1e fix lint in tests 2021-06-18 11:52:09 +02:00
Bruno Windels
8092713faa add tests for local echo of adding and removing reaction 2021-06-18 11:51:02 +02:00
Bruno Windels
f000e98619 no point in reacting to redacted messages 2021-06-17 16:48:58 +02:00
Bruno Windels
64f1abdfed show quick reactions in message menu 2021-06-17 16:46:06 +02:00
Bruno Windels
4312610e7d support menu options with custom DOM 2021-06-17 16:45:53 +02:00
Bruno Windels
70d64f38eb spelling 2021-06-17 16:07:32 +02:00
Bruno Windels
cad884aa41 fix local redaction echo while already sending target 2021-06-17 16:07:09 +02:00
Bruno Windels
a77ef02677 cleanup 2021-06-17 10:12:45 +02:00
Bruno Windels
cbee498d41 a bit more brief 2021-06-17 10:03:32 +02:00
Bruno Windels
bf84b59e39 more accurate test name and also test >= 2021-06-17 09:59:24 +02:00
Bruno Windels
099f99a96b check power levels to see if we can react 2021-06-17 09:41:25 +02:00
Bruno Windels
fd54539e1c clarify comment 2021-06-17 09:41:10 +02:00
Bruno Windels
150f58a6b3 don't aggregate relations on redacted events 2021-06-16 18:00:50 +02:00
Bruno Windels
ce5409dc26 aggregate relations when seeing event target during back-pagination 2021-06-16 17:40:29 +02:00
Bruno Windels
9099a76f45 fix spelling in comment 2021-06-16 17:30:48 +02:00
Bruno Windels
bbcf0d2572 more local echo fixes for redacting a reaction + cleanup 2021-06-16 12:46:44 +02:00
Bruno Windels
94635a18e0 actually, 0 or -1 mean you have a local redaction 2021-06-16 12:41:42 +02:00
Bruno Windels
4f10174e48 clarify comment 2021-06-16 10:28:17 +02:00
Bruno Windels
3b629622d9 need to keep pending count around if 0 or less for redaction local echo
also need to be able to tell the difference between no pending reactions
and redactions and the sum being 0 (having both a redaction and
reaction) so we keep isPending to true
2021-06-16 10:23:22 +02:00
Bruno Windels
e5c1094153 WIP 2021-06-15 19:06:41 +02:00
RMidhunSuresh
e161f61319 Remove selector list
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-15 15:11:32 +05:30
RMidhunSuresh
5e4db2f5dc Change font size
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-15 14:52:07 +05:30
RMidhunSuresh
1772fc04f9 Remove text(..)
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-15 14:45:46 +05:30
RMidhunSuresh
4f05d9a5b7 Make navigation changes in one go
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-15 14:34:26 +05:30
RMidhunSuresh
97e484b8e6 Rename toggle --> open
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-15 14:30:27 +05:30
RMidhunSuresh
88a1e34987 Unsubscribe on dispose
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-14 21:04:44 +05:30
RMidhunSuresh
7b811aa927 Remove space after brace in two places
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-14 20:33:32 +05:30
RMidhunSuresh
e10b455b27 Rename method
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-14 20:32:05 +05:30
Bruno Windels
75ee509361 fix lint 2021-06-11 11:30:11 +02:00
Bruno Windels
6bdbbee83e undo forced offline mode 2021-06-11 11:05:34 +02:00
Bruno Windels
81a721f880 make equality stable in comparator for reaction 2021-06-11 11:04:48 +02:00
Bruno Windels
1d9709d4e3 also compare by key if the timestamps are the same 2021-06-11 11:02:31 +02:00
Bruno Windels
757e08c62c WIP 4 2021-06-10 18:29:10 +02:00
Bruno Windels
cb051ad161 WIP3 2021-06-09 16:52:30 +02:00
RMidhunSuresh
e2443a8b09 Undo spillover from earlier formatting havoc
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
b2f2d51594 Make formatting consistent with the codebase
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
dd9a19b7f0 Make formatting consistent
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
4005d70bb9 Increase height to make element more centered
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
fa67c5e248 Refactor function
- Move related parameters closer together.
- Remove unused parameter.

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
95512b5144 Remove margin from top
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
6086d157e2 Make value multiple of 4
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
2c0176f3f2 Remove unwanted width
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
f3f1436bb0 Rename room info to room details everywhere
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
f917730a21 Stick to naming convention for css/html classes
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
efd37d811f Update on changes to vm
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
008f3601ca Remove link support from Menu
- Not needed anymore since every link item has been rewritten as a
  button.

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
332fbdda84 Move variable to scope of conditional
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
7fbcf89539 Remove unncessary empty line
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
eb870cfc23 Use url instead of link
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
fcc2afba08 Do not compute link in getter
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
04065847dc Remove unused getter
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
c6f3b1fbbe Do not use private props from room summary
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
4700009c68 Add new test for parseUrlPath
Make sure that the details panel stays open during room change.

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
4c962943b2 Modify setters in MenuOption to support chaining
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
0d63ce9a3a Change SideBarActive --> right-shown
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
5b74038912 Check value of details everywhere
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
b2448e1207 Calculate path when button is clicked
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
37e052c061 details do not need to be child of rooms
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
a4bcb21a85 Move details handling to separate function
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
7f922afe79 Reduce duplication in code
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
04933acbfb Add missing checks
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
a3587a80c6 Use internationalization for user facing strings
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
986f04aac0 Move Room details menu entry to top
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
9074caf443 Change Room Details --> Room details
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
65bd74442f Make menu-items uniform
- Same font ,font-size and height.

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
98ef6f4321 Use optionWithButton
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
a3271fb916 Fix Menu: Use t instead of tag to get events
- Also move constructor up

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
8d254c91e3 Undo formatting/stylistic changes
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
3273682155 Do not show room id instead of canonical alias
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
d3d65d89ba Put sidebar rows into container
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
f1fe17fe65 Make font-size equal to that of room-header
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
040c744b6a Style links and buttons similarly in menu
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
00dbd3db06 Add menu entry to launch RoomInfoView
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
1e96b58f85 Add link support to menu
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
426d0779ee Keep RoomInfoView open across room/grid changes
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
02d79b52a4 Prefer canonical alias over room_id if available
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
2dcec6343d Info icon should open/close view alternatively
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
d782c9e0bb Justify content to flex-end instead
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
eab6ca3baf Make side-bar responsive
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
9ac415fa4f Show panel when first visit contains /details
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
b5480b018b Style open button
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
4edc58ebcf Add button in Room header to open details
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
ecd5505af9 Bring in info icon
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
37367cde65 Make close button close the view
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
20a250dfc0 Style close button
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
c65e26ec4c Position the close button to right end
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
91f083a245 Add close button to RoomInfoView
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30
RMidhunSuresh
b0535b5d7d Add styling for RoomInfoView
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-09 16:51:18 +05:30