Commit graph

2395 commits

Author SHA1 Message Date
Danila Fedorin 28ee87cd2f Migrate error.js to TypeScript 2021-08-17 16:30:05 -07:00
Danila Fedorin aa9839ee40 Seemingly fix a bug in utils.ts 2021-08-17 16:30:05 -07:00
Danila Fedorin cd9fe360a4 Start migrating utils.js to TypeScript 2021-08-17 16:30:05 -07:00
Danila Fedorin 5579c018d1 Migrate common.js to TypeScript
Add initial stab at annotating common

Add missing return types and semicolons
2021-08-17 16:30:05 -07:00
Danila Fedorin 8ec8de67b8 Merge branch 'snowpack-mvp' into snowpack-ts-storage-1 2021-08-17 16:29:47 -07:00
Danila Fedorin e8dff6d16b Move web-specific files to platform/web 2021-08-17 14:13:27 -07:00
Bruno Windels dbb9e5363c guard against part types that have not been impl in the view 2021-08-07 09:00:41 +02:00
Danila Fedorin f239199b1b Add rendering for horizontal rules 2021-08-06 15:50:03 -07:00
Bruno Windels 2c8e259339 focus composer when replying 2021-08-06 23:43:10 +02:00
Bruno Windels c3177b06bf
Merge pull request #418 from vector-im/replies
Sending replies
2021-08-06 21:28:42 +00:00
Bruno Windels 9f0c3b9cea await sending a message before clearing composer (this was missing all along) 2021-08-06 23:06:58 +02:00
Danila Fedorin 3c5b186e31 Switch BaseEntry to TypeScript 2021-08-06 12:54:06 -07:00
Danila Fedorin 31c6aa647b Switch to using snowpack-provided dompurify 2021-08-06 12:39:00 -07:00
Danila Fedorin 053c94b60e Stop passing room to tiles in tests 2021-08-06 11:02:41 -07:00
Danila Fedorin f8dae8e20c Merge branch 'replies' of github.com:vector-im/hydrogen-web into replies 2021-08-06 10:54:33 -07:00
Danila Fedorin a8fcf63cf9 Make the close button have a pointer cursor 2021-08-06 10:46:38 -07:00
Danila Fedorin 065b1789be Remove interactive condition on continuation 2021-08-06 10:44:35 -07:00
Danila Fedorin bf1f288a92 Make RoomViewModel's room public and stop feeding it to tileCreator 2021-08-06 10:40:25 -07:00
Danila Fedorin 4c1aeb342a Add two new tests for replies 2021-08-06 10:35:45 -07:00
Danila Fedorin 8dc80e68a7 Remove out-of-date comment 2021-08-06 10:31:01 -07:00
Danila Fedorin ac044cb5c2 Rename pending event fields 2021-08-06 10:27:17 -07:00
Danila Fedorin 1207203b00 Prefer relations from encrypted content 2021-08-06 10:22:43 -07:00
Danila Fedorin 5a0bc55e54 Rename reply function in reply.js 2021-08-06 10:16:20 -07:00
Bruno Windels 2a92363317 use disposeTracked 2021-08-06 17:56:02 +02:00
Bruno Windels 3feaf38252 use internalId to compare so we don't have to cache the entry id separately 2021-08-06 17:53:58 +02:00
Bruno Windels 5426908444 add copyright header 2021-08-06 17:49:39 +02:00
RMidhunSuresh 1ce111c317 Css fix
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-06 21:07:30 +05:30
RMidhunSuresh b97b9da14a Link to member-panel from avatar
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-06 20:51:39 +05:30
RMidhunSuresh be57352f71 Move PowerLevels.js into /room
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-06 19:49:48 +05:30
RMidhunSuresh 1a062f69fd Check state_key is zero-length string
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-06 19:02:50 +05:30
RMidhunSuresh d85cf982cc Check if state_key is present
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-06 17:34:21 +05:30
RMidhunSuresh 187cf5cd28 Use optional chaining
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-06 17:23:01 +05:30
RMidhunSuresh 2cae7c41d3 Check timeline before state
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-06 17:15:40 +05:30
RMidhunSuresh 4ddc7c0683 Update powerlevels in afterSync
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-06 17:15:40 +05:30
RMidhunSuresh 40128c7ff6 Set pl from room response
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-06 17:15:40 +05:30
RMidhunSuresh b75760c437 Add event type string
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-06 17:15:40 +05:30
Bruno Windels 1862e31396
Merge pull request #417 from MidhunSureshR/member-details
Member Panel - PR 2 - UI
2021-08-06 11:18:52 +00:00
RMidhunSuresh 7e8d76a95e Refactor map into switch-case
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-06 16:21:31 +05:30
RMidhunSuresh bc8e6237d6 Merge suggestion from Github 2021-08-06 16:05:08 +05:30
R Midhun Suresh 3ff55204f3
No need for lambda here
Co-authored-by: Bruno Windels <bruno@windels.cloud>
2021-08-06 16:04:51 +05:30
RMidhunSuresh dbd205701c Remove unused prop
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-06 16:03:19 +05:30
RMidhunSuresh 86ddfc1e9e Only need to emit
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-06 13:06:38 +05:30
R Midhun Suresh 974d9bf199
Don't cache powerlevel value
Co-authored-by: Bruno Windels <bruno@windels.cloud>
2021-08-06 13:02:58 +05:30
Danila Fedorin 21b067eaff Create new tiles instead of keeping old ones 2021-08-05 10:05:50 -07:00
Danila Fedorin 434882069e Lift tiles creator to RoomViewModel 2021-08-05 09:39:59 -07:00
Bruno Windels 73884cff0d
Merge pull request #412 from MidhunSureshR/member
Member panel - PR 1 - Add method to fetch member
2021-08-05 11:13:52 +00:00
RMidhunSuresh 49be4e64ca Remove object
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh fea4143af9 Use texttransform
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh d3ea26a38a Use i8n in role
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh 862e8569a9 Describe what changed in emitChange()
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh a16c3aacab Create getter
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh 28a0a0830f Copy over all segments after right-panel
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh 0ff0850979 Remove dm user option
- I don't know why but I thought .../open-room/<user_id> would open an
  invite view to a room with the specified user.
- Does not work like that, so removed.

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh d056a9f961 Keep memberlist until rightpanel is closed
- This should make switching between memberlist and
  member-details panel smoother for large rooms

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh 16887c3c33 Better formatting
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh 448bf3cb3f Style tile
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh 4784bcc590 Make the tiles link to details
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh 65b1a1958a Add link to open member details
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh 7dacbdb700 Show back button
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh 7530b28130 Improve segment adding logic
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh ef17808fbd Fallback to memberlist if member not available
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh f9b1068bae Add links
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh fe6551ff3c Use powerlevel
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh c9224c13a7 Improve code and css
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh c2b9c3f726 Add isEncrypted to vm
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh 7ef7c419e3 Add basic UI and styling
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh acdba8fc02 Add license headers
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh e4bb20575b Create navigation and add to right panel
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh fdd4caa0b7 Create vm and view
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:30 +05:30
RMidhunSuresh 7e481080b5 Return null
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-05 16:32:06 +05:30
Danila Fedorin a9731f5a1d Clean up code for inserting emotes 2021-08-04 16:02:37 -07:00
Danila Fedorin b4a0c31e1c Update test code with new function signature 2021-08-04 15:54:11 -07:00
Danila Fedorin 508214a46b Insert emote text after quotes 2021-08-04 15:50:42 -07:00
Danila Fedorin b5f16468ce Add a flag to strip replies 2021-08-04 15:31:25 -07:00
Danila Fedorin 06961ff693 Add isReply flag to entries 2021-08-04 15:30:35 -07:00
Danila Fedorin 960e3ec469 Fix unsubscribing from observed events containing null 2021-08-04 11:08:35 -07:00
Danila Fedorin 2375bf061c Strip relates_to from encrypted events' original contents. 2021-08-04 10:26:03 -07:00
Danila Fedorin fa985f8f16 Blurb isn't really the right word. 2021-08-04 09:30:02 -07:00
Danila Fedorin 611c6e9717 Move replying code into reply.js and add license 2021-08-04 09:26:26 -07:00
Bruno Windels 0dc5041f47 WIP 2021-08-04 15:23:03 +02:00
Danila Fedorin 1a0e305212 Extract ComposerViewModel to its own file 2021-08-03 14:02:11 -07:00
Danila Fedorin f0b6384ad7 Rename 'disabled' to 'interactive' in BaseMessageView 2021-08-03 13:27:33 -07:00
Danila Fedorin 8956f6ecf4 Fuse methods and properties related to replies 2021-08-03 13:10:36 -07:00
RMidhunSuresh c9a4c393ed Return null
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-02 23:51:19 +05:30
RMidhunSuresh e363d32921 Return null on error
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-02 23:42:55 +05:30
RMidhunSuresh bb68b4d367 Fetch member data from from state event if needed
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-02 23:01:44 +05:30
Bruno Windels a9308f69b8
Merge pull request #420 from MidhunSureshR/add-license
Add missing license headers
2021-08-02 15:10:18 +00:00
Bruno Windels 89d9cd3782
Merge pull request #421 from MidhunSureshR/fix-avatar-lint
Fix lint warning
2021-08-02 15:09:31 +00:00
RMidhunSuresh 6cfb4cfbe0 Support state events
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-02 17:50:09 +05:30
Danila Fedorin 9bd7d1397c Preserve the m.relates_to field for message. 2021-07-30 14:37:34 -07:00
Danila Fedorin 99a630fb84 Add a note on TilesCollection and diposing of tiles 2021-07-29 10:46:17 -07:00
Danila Fedorin 28248722a3 Fix incorrect conditions for showing avatar 2021-07-28 16:17:25 -07:00
Danila Fedorin e2ad589aa3 Go through and clean up affected files. 2021-07-27 16:51:34 -07:00
Danila Fedorin fb54ab68a3 Tweak reply style 2021-07-27 15:12:03 -07:00
Danila Fedorin 3d911f2a22 Add escaping to replies 2021-07-26 14:49:06 -07:00
Danila Fedorin 753bb8392b Add mx-reply to dompurify's list so we can ignore it ourselves. 2021-07-26 12:21:20 -07:00
Danila Fedorin 305fab467e Send a formatted body from quotes 2021-07-23 16:45:22 -07:00
Danila Fedorin 0db6870edb Flesh out the fallback formatting a bit. 2021-07-23 16:37:23 -07:00
Danila Fedorin c0d39a5983 Add very rudimentary fallback reply formatting code 2021-07-23 15:34:04 -07:00
Danila Fedorin 242a9c209b Handle replies in EventEntry 2021-07-23 14:34:11 -07:00
RMidhunSuresh 34f1ecc0dc Remove unused import
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-23 18:10:17 +05:30
RMidhunSuresh 281dc8bdb4 Add missing license headers
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-23 18:05:48 +05:30
Danila Fedorin 711732200e Make the reply box more distinct 2021-07-22 14:44:57 -07:00
Danila Fedorin b0c5b2f2ce Use the proper tile view to display reply preview 2021-07-22 14:15:18 -07:00
Danila Fedorin 650389538d Add some basic styling 2021-07-22 14:07:13 -07:00
Danila Fedorin 83f7391af3 Adjust CSS to match new class structure 2021-07-22 13:39:40 -07:00
Danila Fedorin 1dcfdfc1d8 Split composer into preview and input 2021-07-22 13:37:35 -07:00
Danila Fedorin 013f187dc2 Avoid inserting li tags outside a list 2021-07-22 12:51:24 -07:00
Danila Fedorin 66f686210f Add a very basic, unstyled view of the message to the composer. 2021-07-22 12:28:24 -07:00
Danila Fedorin 94ae5faa3c Add a disabled flag to message view. 2021-07-22 11:16:34 -07:00
Danila Fedorin 7adb0e5ddc Get rid of intermediate view model 2021-07-22 10:56:30 -07:00
RMidhunSuresh 3aeb0c4d98 Indicate if no member found
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-21 18:34:55 +05:30
Danila Fedorin d33d55376a Put reply into its own view model.
Otherwise, we re-render the reply message on
every keystroke.
2021-07-20 16:51:36 -07:00
Danila Fedorin f486bc0e04 Reset reply state after successfully sending a reply 2021-07-20 13:01:04 -07:00
Danila Fedorin 46215b3c51 Add the ability to reply 2021-07-20 12:53:31 -07:00
Danila Fedorin 800b4785d1 Accomodate in_reply_to relation shape 2021-07-20 12:17:44 -07:00
Danila Fedorin fdcafaf6d3 Add _replyTo field to ComposerViewModel that can be set from a message 2021-07-19 16:10:35 -07:00
RMidhunSuresh 05f05bb577 Add method to get member from storage
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-19 19:36:09 +05:30
Danila Fedorin c9e937c41c Add redundancy to prevent stored nulls from causing errors. 2021-07-17 13:29:20 -07:00
Danila Fedorin ad453555b9 Avoid storing null for invite avatars. 2021-07-17 13:23:13 -07:00
Bruno Windels b036e48b66 too many .. 2021-07-16 23:54:19 +02:00
Bruno Windels 9044f4eebe also for inline code 2021-07-16 23:32:38 +02:00
Bruno Windels bc69e1cdae make font on code snippets slightly smaller 2021-07-16 23:29:41 +02:00
Danila Fedorin 0c0633fdd4 Fix body.string in BaseMessageTile 2021-07-16 14:28:18 -07:00
Danila Fedorin fb29913ef0 Add lint fixes 2021-07-16 14:21:39 -07:00
Danila Fedorin c835dc324e Merge branch 'master' of github.com:vector-im/hydrogen-web into formatted-messages 2021-07-16 14:05:43 -07:00
Danila Fedorin 3e4314e7f3 Update comment based on 'small object' version of code. 2021-07-16 13:53:14 -07:00
Danila Fedorin c620e9c930 Move away from Object.assign for image rendering. 2021-07-16 13:51:34 -07:00
Danila Fedorin da48ddec83 Fix == typo 2021-07-16 13:49:33 -07:00
Danila Fedorin 7cfdd4f663 Rename TextTileFormat to BodyFormat 2021-07-16 13:46:25 -07:00
Danila Fedorin 031ce42831 Properly cache message format. 2021-07-16 13:43:40 -07:00
Danila Fedorin 9e1f57a2b1 Switch tiles to using enums and checking format. 2021-07-16 13:36:26 -07:00
Danila Fedorin 1e2945ca54 Add license headers to new files. 2021-07-16 13:12:26 -07:00
Danila Fedorin 996d0cfea8 Remove unneded attribute objects 2021-07-16 13:08:21 -07:00
Danila Fedorin 900ebfe289 Properly pass children to list block 2021-07-16 13:05:47 -07:00
Danila Fedorin cdf85edad9 Move pill parsing into deserialize and avoid intermediate objects. 2021-07-16 13:01:33 -07:00
Danila Fedorin eacc033929 Make code blocks accept non-code tags. 2021-07-16 11:38:41 -07:00
Danila Fedorin 2197d68279 Add fix to prevent pre overflow. 2021-07-16 11:00:54 -07:00
Bruno Windels 9aedc1d526 don't put body parts in span 2021-07-16 19:30:02 +02:00
Bruno Windels 629d58b041 limit code block height 2021-07-16 19:16:15 +02:00
Bruno Windels 2ce6cea4ff not used anymore 2021-07-16 19:16:06 +02:00
Bruno Windels b5b19abb24 only allow links for the schemas mentioned in the spec 2021-07-16 18:32:40 +02:00
Bruno Windels fe3bdda05a all of these should be scoped to messageBody 2021-07-16 17:27:24 +02:00
Bruno Windels 1f82aef4ad some header styling in messages 2021-07-16 16:53:33 +02:00
Bruno Windels 47c1737371 make <code> styling like element 2021-07-16 16:28:03 +02:00
Bruno Windels 2159b67ba4 make link styling like element, blue an no underline 2021-07-16 16:27:43 +02:00
Bruno Windels f012c64fc5 fix pill styling a bit, and open in new tab/noopener 2021-07-16 16:27:22 +02:00
RMidhunSuresh 1a721fe7e8 Import from AvatarView.js
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:13:18 +05:30
RMidhunSuresh 7c9755d1a6 Fix width for smaller screens
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 86bb56ab6f Fix layout of details panel in mobile
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 436e87578e Initialize prop in constructor
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh ec4a783759 Fix disambiguator
- Do not disambiguate name on room rejoin

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 66d5f4d1a3 Make code clearer
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 9fdfebf00d Replace get with iterator and remove lambda
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh f366479c16 Fix move bug
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 0bd1d2b291 Improve code
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 829830c0fa Fix lazylist
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 0e0976c7f5 Inline method
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 611524cdda Log instead of throwing error
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh ec8b6f9dd2 Inline method
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh c410aed672 Use flex instead of setting height
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 4946683b23 Use ifView instead of mapView
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 694b627309 Inline method
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 1f67aa34d3 Move LoadingView.js
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh da733f9f8a Move files to members directory
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 0ac3d3727b Remove TemplateView
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 9a3d7e416a Remove top padding of room details view
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 4bac98d39a More css fixes
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh c4c0e0206f Clear margin on ul
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh fe18b61688 Css fixes
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 5c0c59044f Move spinner before the text
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 60793798c7 Subscribe to powerLevels
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 960f2c283e Remove comment
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh e406aa6e45 Add jsdoc for powerlevels
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 5873ab63ba Release memberlist after panel is closed
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 5a54be2e2e Style loading view
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh be46d870aa Center names
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh c7e12c98b5 Make addPanelIfNeeded more generic
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh b126ba1370 Fix lazy list css
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh f98a8847e3 Implement UX
- Add chevron to member count in room details
- Make some rows in panel buttons
- Add user chrome to right panel
- Style UI

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 21f47f21aa Add chevron to button
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 8e55967db3 Create UI to open memberlist from details panel
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 72f79e8bef Reduce padding
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 8ee9cb10c2 Move css to layout.css
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh fe4f6d2308 Remove listHasChangedSize
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh c073d4c0d0 Unmount child views correctly
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 2502c4024a Fix broken tests
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 8e39aed4b6 Ensure that power levels are loaded only once
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 14c00f50fc Make loadPowerLevels private
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 22fab3761a Remove timeline reader and only use roomState
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 8a976ef24b Make powerLevels observable
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh d1f465e6cc Replace slice with iterator
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh c539c38699 Account for padding in itemHeight
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh f506cf615b div --> li
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh ea0851eb94 Keep memberlist panel open on room/grid change
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh d3a8e95962 Find height of container from DOM
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
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