Commit graph

118 commits

Author SHA1 Message Date
Bruno Windels
060f4aa297 change extension in preparation for TS conversion 2021-09-16 14:02:36 +02:00
Bruno Windels
65f69a121b copy Daniel's conversion of BaseUpdateView to TypeScript from microui 2021-09-16 14:01:33 +02:00
Bruno Windels
69672dd99c copy Daniel's conversion of html.js to TypeScript from microui 2021-09-16 10:45:06 +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
c78a83d398 restore most bottom tile in VP on any list change
and tell view model visible range so it can load more or fill gaps, ...
2021-09-07 15:17:27 +02:00
Bruno Windels
ad4ec5f04c convert TimelineView to typescript 2021-09-06 17:51:32 +02:00
Bruno Windels
632d29795a convert ListView to typescript 2021-09-06 17:12:14 +02:00
Bruno Windels
e105bc4237 fix lint warnings 2021-08-24 15:31:18 +02:00
Danila Fedorin
f239199b1b Add rendering for horizontal rules 2021-08-06 15:50:03 -07:00
RMidhunSuresh
281dc8bdb4 Add missing license headers
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-23 18:05:48 +05:30
Danila Fedorin
c835dc324e Merge branch 'master' of github.com:vector-im/hydrogen-web into formatted-messages 2021-07-16 14:05:43 -07:00
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
1f67aa34d3 Move LoadingView.js
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
d1f465e6cc Replace slice with iterator
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
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
Danila Fedorin
d69b78469c Add table viewing code. 2021-07-15 13:19:54 -07:00
Danila Fedorin
78d7d556e4 Add blockquote and del elements. 2021-07-14 12:38:55 -07:00
Danila Fedorin
cc506756a1 Add code tag to HTML 2021-07-01 13:55:01 -07:00
Bruno Windels
09aba78803
Merge branch 'master' into room-info 2021-06-24 15:06:37 +00:00
Bruno Windels
4312610e7d support menu options with custom DOM 2021-06-17 16:45:53 +02:00
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
4c962943b2 Modify setters in MenuOption to support chaining
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
040c744b6a Style links and buttons similarly in menu
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
Bruno Windels
4ef5afc011 this is actually not used, so remove it 2021-06-04 10:07:52 +02:00
Bruno Windels
dde26da5a6 add mountView utility to handle error handling on mount
and use it where errorToDOM is used currently for catching mount errors
2021-06-04 10:07:12 +02:00
Bruno Windels
ff370d03db catch errors thrown by childview mount method on add in ListView 2021-06-04 09:37:36 +02:00
Bruno Windels
d91282a767 render reactions in div instead of ul 2021-06-03 21:01:47 +02:00
Bruno Windels
2e34668b91 show errors while mounting list view children 2021-05-31 12:28:42 +02:00
Bruno Windels
447b98ce6c don't use subviews for showing/hiding avatar & sender on continuation 2021-05-31 11:57:17 +02:00
Bruno Windels
6a5d856093 add destructive flag to delete menu option 2021-05-28 16:25:23 +02:00
Bruno Windels
7f41993648 prevent buttons with negative margin to displace message menu 2021-05-28 15:28:04 +02:00
Bruno Windels
2b0fa22c8a open menu when clicking ... button on message with delete/cancel option 2021-05-28 13:14:55 +02:00
Bruno Windels
2d2ec25f86 add comment clarifying popup arrangement options 2021-05-12 14:02:15 +02:00
Bruno Windels
33f1ba686c add warning when rendering outside of render fn for templates 2021-04-15 15:14:02 +02:00
Bruno Windels
c85b2ca3c9 allow manually updating subviews in templates w/ parentProvidesUpdates 2021-04-15 15:11:05 +02:00
Bruno Windels
357ce21678 extract base class from Template view to select update mechanism 2021-04-15 15:09:45 +02:00
Bruno Windels
141cf95eac some minor TODOs for template view improvements 2021-04-07 14:38:48 +02:00
Bruno Windels
010b782a96 allow t.map render fn to not return a dom node 2021-04-01 14:59:18 +02:00
Bruno Windels
eba4d8a28b improve ergonomics for sub-templates in TemplateView
- renames if to ifView
 - adds map and if that immediately take a sub template render function
   rather than having to call createTemplate
2021-03-18 19:44:59 +01:00
Bruno Windels
ee6f3e5457 render video messages 2021-03-09 19:35:10 +01:00
Bruno Windels
9ab81eea02 add setting for image compression level 2020-11-20 15:51:16 +01:00
Bruno Windels
18407e17a8 toggle popup menu 2020-11-18 20:18:09 +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
9bb521986b first draft of generic popup and menu views 2020-11-13 15:58:40 +01:00
Newbyte
3ab70861cc Add form to element list
Signed-off-by: Newbyte <newbie13xd@gmail.com>
2020-11-05 11:21:04 +01:00
Bruno Windels
581dc95c53 allow adding custom event handlers to a template view
so you don't have to remove them yourself
2020-10-30 22:48:56 +01:00
Bruno Windels
d55f38a9e9 don't reimplement removing an item from the list 2020-10-27 16:26:45 +01:00
Bruno Windels
c9efee77f2 if shape is update and item should be different view, recreate the tile 2020-10-27 16:20:04 +01:00
Bruno Windels
06e4dea590 move ui and dom under platform/web 2020-10-26 10:28:11 +01:00