Commit graph

38 commits

Author SHA1 Message Date
Bruno Windels 6beff7e552 override emitChange so no need to clone option object for all tiles
instead, we don't store the emitChange in the options but rather on
the tile itself.
2022-05-09 14:09:45 +02:00
Bruno Windels 5445db2a42 allow injecting the tilesCreator from the Root/Session/RoomViewModel
this changes the API slightly to be more future-proof,
as we'll expose it in the SDK now.

The function now returns a SimpleTile constructor, rather than an
instance. This allows us to test if an entry would render in the
timeline without creating a tile, which is something we might want in
the matrix layer later on.

The function is now called tileClassForEntry, analogue to what we
do in TimelineView.
2022-04-08 12:52:30 +02:00
Eric Eastwood c09964dc30
Add data-event-id="$xxx" attributes to timeline items for easy selecting in end-to-end tests (#690)
Split out from https://github.com/vector-im/hydrogen-web/pull/653

Example test assertions: db6d3797d7/test/e2e-tests.js (L248-L252)

```js
// Make sure the $abc event on the page has "foobarbaz" text in it
assert.match(
  dom.document.querySelector(`[data-event-id="$abc"]`).outerHTML,
  new RegExp(`.*foobarbaz.*`)
);
```
2022-03-01 18:36:14 -06:00
Bruno Windels 7179758c50 also here 2022-02-15 08:22:09 +01:00
Bruno Windels d0f122a2be WIP-ish, batch visible range requests, allow setting empty ranges and...
don't try to notify when the tile becomes invisible again,
we don't need it currently
2021-09-09 17:14:16 +02:00
Bruno Windels 7578bfa3d9 let tiles know when they become visible & load more tiles close to top 2021-09-08 12:05:19 +02:00
Bruno Windels b3cd2a0e03 express the visible range with EventKeys rather than list indices
This is less ambiguous in case the DOM and the ObservableList would be
out of sync.
2021-09-07 17:48:49 +02:00
Bruno Windels e105bc4237 fix lint warnings 2021-08-24 15:31:18 +02: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 fdcafaf6d3 Add _replyTo field to ComposerViewModel that can be set from a message 2021-07-19 16:10:35 -07:00
Bruno Windels 206d18f498 WIP2 2021-06-08 16:56:17 +02:00
Bruno Windels 2ebadb36c3 WIP 2021-06-08 13:20:55 +02:00
Bruno Windels 15f6ab8b7e only show cancel option if not already sending 2021-06-02 11:56:15 +02:00
Bruno Windels 8196a02f9d don't even need isOwn member anymore 2021-05-31 15:25:01 +02:00
Bruno Windels 23459aad52 check if you are allowed to redact a message 2021-05-31 13:52:03 +02:00
Bruno Windels 56495c9d13 fix gap failing to fill 2nd time + unit regression test 2021-05-27 09:10:10 +02:00
Bruno Windels cb622be653 rerender tile when becoming or stopped being redacted 2021-05-25 12:58:20 +02:00
Bruno Windels 8a8c5569dc provide redact method on tile and room
also add some logging
2021-05-20 14:53:17 +02:00
Bruno Windels 780ad44032 render redacted messages 2021-05-20 13:15:35 +02:00
Bruno Windels ce976226f9 rename MessageTile to BaseMessageTile
since MessageTile doesn't have a shape property anymore
2021-05-17 12:15:13 +02:00
Bruno Windels 2d4003379e Fix #97 2021-03-08 22:25:18 +01:00
Bruno Windels 856001160b show message already as black when sent but no remote echo yet 2021-02-26 10:40:08 +01:00
Bruno Windels 47147f2d46 progress bar for upload, add cancel button, no lightbox while uploading 2020-11-18 20:06:34 +01:00
Bruno Windels ee1e62207c apply platform changes to decrypting images 2020-10-26 17:18:17 +01:00
Bruno Windels b2e6e8687e dispose tiles
also add more defence against emitting event when disposed
2020-09-14 17:44:37 +02:00
Bruno Windels 4875095ea3 fix event tiles not updating when event is decrypted when room keys come 2020-09-11 17:47:35 +02:00
Bruno Windels cf0af775e3 make SimpleTile inherit from ViewModel
to use same update mechanism and have viewmodel infra available for tile
2020-08-17 15:11:39 +02:00
Bruno Windels 00a85697ab add license header in all source files 2020-08-05 18:38:55 +02:00
Bruno Windels 001dbefbcf stop using default exports
because it becomes hard to remember where you used them and where not
2020-04-20 21:26:39 +02:00
Bruno Windels f729108226 pass emit update fn through setter so we control when tile can update 2020-03-21 14:28:09 +01:00
Bruno Windels a3714f49cc group public methods for a tile together 2020-03-21 14:26:56 +01:00
Bruno Windels 8665bcb897 concat synced events in timeline with pending events for local echo 2019-07-29 19:53:58 +02:00
Bruno Windels d34a26f0da store new gap entry on update so we can paginate again 2019-06-16 16:47:56 +02:00
Bruno Windels 64f126ba68 support updates originating from tile, and removing tile on update 2019-06-12 21:57:13 +02:00
Bruno Windels e3b4f898d0 show eventkey in ui for debugging purposes 2019-06-02 18:15:24 +02:00
Bruno Windels 039bbe038c adjust tiles(collection) to entry changes 2019-06-01 18:29:02 +02:00
Bruno Windels 153d54a285 work on tile view models 2019-03-09 00:40:03 +01:00
Bruno Windels 1f5d488105 draft of timeline tiles support 2019-03-08 20:04:56 +01:00