Commit Graph
100 Commits
Author SHA1 Message Date
David Baker c2fb745188 Appease type checker 2021-10-18 19:44:05 +01:00
David Baker e9f5fa7858 Update usage here too 2021-10-18 19:39:43 +01:00
David Baker 2b7ea16c2d Upgrade highlight.js
Major version bump for highlight.js. Update usage of deprecated function & some cleanups.
2021-10-18 19:32:20 +01:00
David Baker c2ed27a1b2 Typo 2021-10-13 15:42:57 +01:00
David Baker 0332bc99cb Fix bug where room list would get stuck showing no rooms
If you had an unsent message in a room that was in a sublist with
the 'Show rooms with unread messages first' option enabled, the
room list would show no rooms next time you restarted element and
get stuck that way.

This was because there was a different notification category for
rooms with unsent messages but the algorithm is hard-coded to add
only a fixed set of categories to its list, and it missed 'unsent',
so it NPEed when it encountered a room with an unsent message.

This just adds the category (assuming that we want to show rooms
with unsent messages first). It doesn't make it less hard-coded, or
fix the fact that an exception in the room list code causes everything
to break.

Fixes https://github.com/vector-im/element-web/issues/19373
2021-10-13 14:39:09 +01:00
David Baker 9f26cca256 Fix the User View
Extreme confusion between users and members, and presumably we were
passing one as the other and they were similar enough that it
worked.

UserView still makes fake member objects but this at least fixes
the user view in the right panel.

Fixes https://github.com/vector-im/element-web/issues/19158
2021-09-24 14:35:00 +01:00
David BakerandWeblate 2c8c845d74 Translated using Weblate (Albanian)
Currently translated at 99.7% (3157 of 3165 strings)

Translation: Element Web/matrix-react-sdk
Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/sq/
2021-09-21 07:59:31 +00:00
David Baker 22500a2e29 yarn upgrade
And also pin @types/react harder because yarn wanted to give
@types/flux a newer version meaning they conflicted.
2021-09-15 16:59:13 +01:00
David Baker 16065e0a8b Pin react too... 2021-09-15 16:14:58 +01:00
David Baker 4e694df6b0 Pin typescript/types version
type: task

Because we have a collection of usages of things and conflicts
that break with the new version: https://github.com/vector-im/element-web/issues?q=is%3Aissue+is%3Aopen+preventing+TypeScript+upgrade
2021-09-15 16:04:26 +01:00
David Baker 4f53e6cddd Merge remote-tracking branch 'origin/develop' into dbkr/fix_roomlist_prompt 2021-09-15 15:13:52 +01:00
David Baker 0f98c9127d Fix checks to show prompt to start new chats
We compared the length of the list rooms but not historical or favourite.

Caught by new version of typescript when I tried to upgrade.
2021-09-15 15:08:23 +01:00
David Baker f6b0b12c60 fix lockfile 2021-09-14 18:47:01 +01:00
David Baker eba815afda Debounce read marker update on scroll
Reverts https://github.com/matrix-org/matrix-react-sdk/pull/6751 in
favour of debouncing the updates to read markers, because it seems
allowing the scroll to be 1px away from the bottom was important for
some browsers and meant they never got to the bottom.

We can fix the problem instead by debouncing the update to read
markers, because the scroll state gets reset back to the bottom when
componentDidUpdate() runs which happens after the read marker code
does a setState(). This should probably be debounced anyway since
it doesn't need to be run that frequently.

Fixes https://github.com/vector-im/element-web/issues/18961
Type: bugfix
2021-09-09 18:18:47 +01:00
David Baker a4aa6dfcd7 Debounce read marker update on scroll
Reverts https://github.com/matrix-org/matrix-react-sdk/pull/6751 in
favour of debouncing the updates to read markers, because it seems
allowing the scroll to be 1px away from the bottom was important for
some browsers and meant they never got to the bottom.

We can fix the problem instead by debouncing the update to read
markers, because the scroll state gets reset back to the bottom when
componentDidUpdate() runs which happens after the read marker code
does a setState(). This should probably be debounced anyway since
it doesn't need to be run that frequently.

Fixes https://github.com/vector-im/element-web/issues/18961
Type: bugfix
2021-09-09 15:58:19 +01:00
David Baker b67883b4f1 Remove unnecessary pushd
type: task
2021-09-09 09:41:11 +01:00
David Baker 8f221a4849 Rename type checking script
'cos it's type chekcing, not linting
2021-09-08 18:37:13 +01:00
David Baker 47fd11050f Switch type check to GitHub Actions
and add (working) type check for release mode js-sdk types
2021-09-08 11:43:46 +01:00
David Baker 97e107ebac Fix types in release mode again 2021-09-07 18:59:52 +01:00
David Baker 9533f7c04c Fix types in release mode again 2021-09-07 18:49:31 +01:00
David Baker e1fdf7c69d Update changelog generator 2021-09-07 18:01:13 +01:00
David BakerandWeblate f25be9770e Translated using Weblate (Albanian)
Currently translated at 99.7% (3142 of 3151 strings)

Translation: Element Web/matrix-react-sdk
Translate-URL: https://translate.element.io/projects/element-web/matrix-react-sdk/sq/
2021-09-07 09:28:16 +00:00
David Baker 6468ce68a2 Fix scroll being stuck at bottom
The check for whether we're at the bottom or not allowed for a
difference of 1 to account for fractional scroll values, but
allowed the difference of exactly 1 too, meaning we'd consider
the timeline to be at the bottom if you were scrolled up by exactly
a single pixel. If your scrolling was set up to be precise enough and
the event handlers fired fast enough that they'd evaluate each time
you scrolled up by a single pixel, it would reset you back to the bottom
each time and you'd never be able to scroll up.

Fixes https://github.com/vector-im/element-web/issues/18903
2021-09-06 18:59:47 +01:00
David Baker 90824d32c9 Add logging to debug stuck toast bug
For https://github.com/vector-im/element-web/issues/18603
2021-09-03 15:14:44 +01:00
David Baker 1a0365f528 i18n 2021-09-02 19:00:30 +01:00
David Baker f2758f9ce5 Fix glare 2021-09-02 18:41:26 +01:00
David Baker cd8e7e3076 Move error dialog to the new check
So we just check for an existing call in one place where it doesn't race
2021-09-02 15:51:44 +01:00
David Baker edf6d13818 Prevent multiple calls for the same room 2021-09-02 14:41:10 +01:00
David Baker 855c3819c1 Reset matrix-js-sdk back to develop branch 2021-09-01 09:52:32 +01:00
David Baker 59833d1306 Update changelog generator 2021-08-25 17:21:48 +01:00
David Baker 586810d288 Not @types/react because it breaks stuff 2021-08-25 11:23:41 +01:00
David Baker b53e0eee67 yarn upgrade 2021-08-25 10:57:03 +01:00
David Baker b5f377d543 Fix import breaking types in release mode 2021-08-24 17:51:39 +01:00
David Baker c3e173248d Fix import breaking types in release mode 2021-08-24 17:43:23 +01:00
David Baker 08b37eb7c5 Fix cross sisgning setup from settings screen
We previously called bootstrap without the cache callbacks set up
which meant it prompted you for you password once for each of the
three keys it fished out of SSSS. Instead, display the same dialog
we display from the verify toast.

Also, in the case where you hadn't verified yet, the button didn't
do anything at all, so make it trigger a verification & change the
caption appropriately.

Add a state to reflect when cross signing is set up but SSSS isn't
(ie. user hasn't yet set up backup / set a passphrase).
2021-08-18 19:22:42 +01:00
David Baker e3930638dc Fix dates 2021-08-16 13:25:59 +01:00
David Baker d0e82ee603 Update changelog generator 2021-08-16 13:18:10 +01:00
David Baker c28d449f3f Fix import
thanks vscode
2021-08-13 18:21:59 +01:00
David Baker 7c8637f5db Add MatrixEvent type 2021-08-13 18:18:48 +01:00
David Baker c79b6a412d Merge remote-tracking branch 'origin/develop' into dbkr/crosssigningpanel_ts 2021-08-13 18:11:54 +01:00
David Baker e78640572d Convert CrossSigningPanel to TS
Type: task
2021-08-13 18:07:58 +01:00
David Baker 3528d87f30 Remove old version 2021-08-12 18:39:11 +01:00
David Baker 657dcaf989 Fix video call persisting when widget removed
Fixes https://github.com/vector-im/element-web/issues/15703
Type: defect
2021-08-12 18:36:57 +01:00
David Baker 34249caa9e Use changelog generator from npm 2021-08-11 21:50:25 +01:00
David Baker 002c7328f3 Merge remote-tracking branch 'origin/develop' into dbkr/edit_pr_desc 2021-08-11 21:39:07 +01:00
David Baker 8016b340b0 Just upload the PR object itself
We don't know what secret info might end up in the context
2021-08-11 21:20:28 +01:00
David Baker 1fe5ace8ed Edit PR Description instead of commenting
We could include the magic comments in the PR template so the various
automated comments were always in the same order, if we wanted.
2021-08-11 21:10:22 +01:00
David Baker bbdee0d83b publish the right directory 2021-08-11 19:41:37 +01:00
David Baker cf8ee19e23 Fix Netflify builds from fork PRs
Some absolutely horrenous hacks to upload the context as an artifact
then download it, unzip it and set the PR number as a variable we can
use, because GitHub Actions just doesn't offer any other way of doing
this.

Maybe we'd be better off going back to Netlify...
2021-08-11 19:25:17 +01:00
David Baker a330b3c596 Changelog 2021-08-11 15:50:45 +01:00
David Baker 50aa3d6c46 Upscale thumbnails to the container size
Force thumbnails to be the size of the container, even if that means
upscaling them. As per comment, this will mean that the thumbnails
will sometimes be larger and a bit blurry rather than small. It looks
like this was probably a source of scroll jumps before.

As per comment, a better fix would be to be be able to know what
size thumbnails the HS will give us so we can size the containers
appropriately.

Type: defect
Regressed by: https://github.com/matrix-org/matrix-react-sdk/pull/6514
Fixes https://github.com/vector-im/element-web/issues/18307
2021-08-10 15:14:04 +01:00
David Baker 87690f0739 Fix netflify preview build comment 2021-08-10 11:49:25 +01:00
David Baker 32ad5dc19c Do the PR comment a different way
Because the built in netlify action's way doesn't work in workflow_run
2021-08-09 20:16:54 +01:00
David Baker d2e8e13afb No event.number in the workflow_run action 2021-08-09 19:27:13 +01:00
David Baker dd36dde8c9 rename artifact 2021-08-09 19:16:08 +01:00
David Baker 28eb45b928 Hopefully working Netlify upload
as per comment
2021-08-09 18:35:36 +01:00
David Baker 81b72fe70e disable netlify uplaod while I debug it 2021-08-09 18:03:15 +01:00
David Baker bcc7c9cd20 Use a GitHub action to build the Netlify preview build
So we don't need netflify to sit there building the develop branch
for no reason. Also it will comment with the URL rather than having
to dig it out of the checks.

Upload part not tested yet.
2021-08-06 23:54:19 +01:00
David Baker 26170deb3b Add changelog preview action 2021-08-06 23:05:05 +01:00
David Baker d0b295f1a7 Add CODEOWNERS 2021-08-04 13:28:31 +01:00
David Baker 6350cecb5e emoty commit to try & wake netlify up 2021-08-04 12:02:14 +01:00
David Baker c31f9335dc Declare node 14 requirement
Mostly for netlify (we need node 14 now because element-web's
webpack config uses the `??` operator).
2021-08-04 11:51:55 +01:00
David Baker 82c6445648 Add release_config for changelogging 2021-08-03 18:08:25 +01:00
David Baker 612384a6a3 Switch to new changelog generator
allchange is typescript so has a 'prepare' script to tsc it into
javascript so it can be a binscript - hopefully this won't cause
it to make too much of a pain of itself causing tsc to run on every
yarn add/install
2021-08-03 18:03:46 +01:00
David Baker 28f5dc483b Update eslint plugin & fix silly indenting
As per https://github.com/matrix-org/eslint-plugin-matrix-org/pull/15
this caused a bunch of silly indenting to creep in, so this fixes it
back to the previous style.
2021-08-03 17:07:37 +01:00
David Baker 83674aad66 Changelog for v3.27.0 2021-08-02 12:55:33 +01:00
David Baker f20da6d3de Fix infinite pagination loop when offline
I'm not really sure how this is meant to work - and I'm not sure
how it was working before, but this is causing fairly bad infinite
loops if I start element with no homeserver connection. This is
a fairly crude fix, only thing I can think that would be better is
some awareness of when network requests were failing and intentionally
backing off.

Fixes https://github.com/vector-im/element-web/issues/18242
2021-07-26 22:05:35 +01:00
David Baker d38f2cf5b5 Fix display of image messages that lack thumbnails
Fixes https://github.com/vector-im/element-web/issues/18175
2021-07-22 22:49:30 +01:00
David Baker a6c432d66f fix types
in varyingly hacky ways
2021-07-21 16:39:41 +01:00
David Baker 35e74db25e yarn upgrade 2021-07-21 15:41:16 +01:00
David Baker 99edfc24e5 Update eslint-plugin-matrix-org 2021-07-19 15:26:40 +01:00
David Baker 45fb0e927f Mention nested labels in comments 2021-07-16 22:35:53 +01:00
David Baker f9b45677d6 Fix bug where 'other homeserver' would unfocus
It turns out the answer to this was not all that complex: we had
two nested <label>s: one for the radio button and one for the Field,
which presumably causes both of them to generate click events and
focus something and what ends up focused is some kind of race condition
depending on, apparently, how fast you click.

Notes: Fix bug where the 'other homeserver' field in the server selection dialog would become briefly focus and then unfocus when clicked.
2021-07-16 22:27:31 +01:00
David Baker a2f581a7ef Add CI script to switch the js-sdk into 'release mode'
So we can check the types still work against a released js-sdk
2021-07-15 13:53:41 +01:00
David Baker f42382edbd Update PR template for new changelog stuff 2021-07-14 23:29:54 +01:00
David Baker 21a6a2d01e Update links 2021-07-14 22:39:03 +01:00
David Baker f4c767ab3e Convert CONTRIBUTING to markdown
Where by 'convert', I mean 'rename'
2021-07-14 22:37:47 +01:00
David Baker 5399929da5 Comment why end to end tests are only on the develop branch 2021-07-14 17:13:40 +01:00
David Baker 4d16cfc951 Fix 'User' type import 2021-07-14 16:51:45 +01:00
David Baker 6c72955731 Fix 'User' type import 2021-07-14 16:41:01 +01:00
David Baker 197b6aeefe Make DeviceListener also update on megolm key in SSSS
The device listener checks for a megolm key stored in SSSS but didn't
update when one was added, so the encryption upgrade toast would not
disappear after the key was fixed by https://github.com/matrix-org/matrix-js-sdk/pull/1776
2021-07-08 21:16:19 +01:00
David Baker 086a8cbbb3 Update import location for types
Apparently all the types themselves are fine, even though some of
the function signatures have been updated to return Promises... we
were alreaady await-ing on them.
2021-07-07 20:19:52 +01:00
David Baker 984dc40f9c Clarify the keys we use when submitting rageshakes
'pk' is a bit opaque in a context with both private keys and public keys
2021-07-07 10:54:21 +01:00
David Baker 0cee0db9df Fix icon size in passphrase prompt 2021-07-02 20:38:07 +01:00
David Baker 1fe0c2ab88 Bump eslint plugin version 2021-07-01 23:45:08 +01:00
David Baker 80f5232217 Comply with new member-delimiter-style rule
Just `eslint --fix` with rule from
https://github.com/matrix-org/eslint-plugin-matrix-org/pull/9 in place
2021-07-01 23:23:03 +01:00
David Baker 6aa0a4428e Merge remote-tracking branch 'origin/develop' into dbkr/tests_lint 2021-07-01 23:11:43 +01:00
David Baker 08176beb58 Kill mock-clock
We already import sinon's one in UserActivitytest, so use that here too.
2021-07-01 21:52:15 +01:00
David Baker 536e3aadd7 Merge remote-tracking branch 'origin/develop' into dbkr/tests_lint 2021-07-01 21:39:17 +01:00
David Baker c1310bcd9f Better types 2021-07-01 21:31:17 +01:00
David Baker eb1a22ab19 Add types 2021-07-01 21:00:54 +01:00
David Baker 543fe6382d Fix linting in tests
Or in the case of one test, disbale just the one rule it breaks
2021-07-01 20:54:04 +01:00
David Baker ee9be5438e eslint --fix 2021-07-01 20:43:05 +01:00
David Baker e6b754f8dd Convert Markdown to TypeScript 2021-07-01 20:33:25 +01:00
David Baker e121e5bf8a nice try, vscode 2021-07-01 19:58:25 +01:00
David Baker 8bbb768825 Convert RoomHeader to TS
Also add a type of OOBData... possibly this should be in the js-sdk,
but threepid invites themselves have a type in react-sdk so it can
live alongside it I guess (also I'm not entirely sure we actually
use it anymore...)
2021-07-01 19:54:05 +01:00
David Baker 9ea4ca39c6 Be more like other arrow functions 2021-07-01 18:54:51 +01:00
David Baker ae16efcf5b Remove rateLimitedFunc 2021-07-01 18:35:38 +01:00
David Baker 5e3c8fae5c put this just on the buttons 2021-07-01 15:22:44 +01:00
David Baker 404aa96f48 i18n 2021-07-01 15:13:24 +01:00