Commit graph

916 commits

Author SHA1 Message Date
RMidhunSuresh d31f127982 Add explaining comment 2022-06-07 13:28:56 +05:30
RMidhunSuresh ba647d012d Fix type in observeNavigation 2022-05-29 20:38:14 +05:30
RMidhunSuresh fc873757d8 WIP 2022-05-27 22:42:21 +05:30
RMidhunSuresh ec1cc89cf9 Make URLRouter in options conditional on generic
URLRouter can be passed in option to vm only if the SegmentType used
contains session.
ViewModel.urlCreator returns undefined when used with a SegmentType that
lacks session.
2022-05-27 22:42:21 +05:30
RMidhunSuresh a336623f3a Generic parameter should extend object 2022-05-27 22:42:21 +05:30
RMidhunSuresh 9300347e9b Give defaultt type 2022-05-27 22:42:21 +05:30
RMidhunSuresh f49d580d49 WIP 2022-05-27 22:42:21 +05:30
RMidhunSuresh 263948faa3 Remove unwanted export 2022-05-27 22:42:21 +05:30
RMidhunSuresh 52f0690c70 Add return type 2022-05-27 22:42:21 +05:30
RMidhunSuresh 7a24059337 Remove empty line 2022-05-27 22:42:21 +05:30
RMidhunSuresh 4fd1918202 Remove comment 2022-05-27 22:42:21 +05:30
RMidhunSuresh 4ae3a5bf7a Use undefined instead of null 2022-05-27 22:42:21 +05:30
RMidhunSuresh 5be00f051f Use subtype instead of whole SegmentType 2022-05-27 22:42:21 +05:30
RMidhunSuresh e7f4ce6175 Mark methods as private 2022-05-27 22:42:21 +05:30
RMidhunSuresh 09bc0f1b60 Extract complex type as type alias 2022-05-27 22:42:21 +05:30
RMidhunSuresh 76d04ee277 Make defaultSessionId optional 2022-05-27 22:42:21 +05:30
RMidhunSuresh f28dfc6964 Type createRouter function 2022-05-27 22:42:21 +05:30
RMidhunSuresh c14e4f3eed Use segment type 2022-05-27 22:42:21 +05:30
RMidhunSuresh 5d42f372f6 Pass as separate arguments to constructor 2022-05-27 22:42:21 +05:30
RMidhunSuresh 4c3e0a6ff0 Convert URLRouter.js to typescript 2022-05-27 22:42:21 +05:30
RMidhunSuresh d9bfca10e1 Type function 2022-05-27 22:42:21 +05:30
RMidhunSuresh bf2fb52691 Fix formatting 2022-05-27 22:42:21 +05:30
RMidhunSuresh 646cbe0fff Make all keys string 2022-05-27 22:42:21 +05:30
RMidhunSuresh 92e8fc8ad3 Remove deprecated method 2022-05-27 22:42:21 +05:30
RMidhunSuresh 92c79c853d Convert index.js to typescript 2022-05-27 22:42:21 +05:30
RMidhunSuresh 55229252d7 Type allowsChild 2022-05-27 22:42:21 +05:30
RMidhunSuresh 3efc426fed Complete converting Navigation.js to ts 2022-05-27 22:42:21 +05:30
RMidhunSuresh 04d5b9bfda WIP - 2 2022-05-27 22:42:21 +05:30
RMidhunSuresh 66f6c4aba1 WIP 2022-05-27 22:42:18 +05:30
RMidhunSuresh 2761789f45 Move theme code to separate file 2022-05-11 14:58:14 +05:30
RMidhunSuresh c39f0d2efb Don't show theme chooser on dev 2022-05-10 14:12:36 +05:30
RMidhunSuresh c611d3f85c Select current theme in dropdown 2022-05-10 14:12:36 +05:30
RMidhunSuresh ecb83bb277 Store and load theme from setting 2022-05-10 14:12:36 +05:30
RMidhunSuresh daae7442bb Create theme chooser 2022-05-10 14:12:36 +05:30
Bruno Windels e903d3a6a4 mark options as readonly 2022-05-09 14:12:31 +02:00
Bruno Windels 3888291758 updateOptions is unused,not the best idea since options is/can be shared 2022-05-09 14:10:50 +02:00
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
RMidhunSuresh 139a87de99 Pass a copy of the options to the tiles 2022-05-08 19:14:51 +05:30
Bruno Windels 57f50cc416 fix lint warnings 2022-04-08 15:01:27 +02:00
Bruno Windels a913671f0c make tileClassForEntry optional, as otherwise it is a breaking change 2022-04-08 14:19:34 +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
Bruno Windels 88482292e1
Merge pull request #700 from vector-im/ajbura-patch-2
Add observeNavigation in ViewModel
2022-04-07 14:08:40 +02:00
Bruno Windels ca211f929b
Merge pull request #702 from vector-im/bwindels/observablemapts
convert (Base)ObservableMap to typescript
2022-03-09 11:53:59 +01:00
Bruno Windels 6d7c983e8e convert (Base)ObservableMap to typescript 2022-03-09 11:33:49 +01:00
Ajay Bura e07abfa02a
Add missing type 2022-03-07 11:33:51 +05:30
Ajay Bura 61ce2f9e3d
Add observeNavigation in ViewModel 2022-03-03 15:36:25 +05:30
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
Tushar 17acda7741 typescriptify domain/LogoutViewModel.js 2022-02-25 16:45:07 +05:30
Tushar 7055f02f16 typescriptify domain/avatar.js 2022-02-25 15:52:54 +05:30
Bruno Windels 7f1fed6f8c always pass options to ViewModel constructor 2022-02-17 09:24:18 +01:00