Michael Weimann
38b72c4995
Fix disappearing widget poput button ( #8754 )
...
See PSC-79
2022-06-06 12:00:18 +02:00
Michael Weimann
3174cf2606
Improve widget buttons behaviour and layout ( #8734 )
...
* Improve widet buttons behaviour and layout
Relates to vector-im/element-web#20506
See PSC-79
Signed-off-by: Michael Weimann <michaelw@matrix.org >
* Add AppTile tests
2022-06-03 12:00:16 +02:00
Kerry
14cf6275d0
Fix: AccessibleButton does not set disabled attribute (PSF-1055) ( #8682 )
...
* remove old styles for pin drop buttons
Signed-off-by: Kerry Archibald <kerrya@element.io >
* fully disable share location button until location is shared
Signed-off-by: Kerry Archibald <kerrya@element.io >
* set disabled on button
Signed-off-by: Kerry Archibald <kerrya@element.io >
* test AccessibleButton disabled
Signed-off-by: Kerry Archibald <kerrya@element.io >
* remove disbaled check in LocationPicker
Signed-off-by: Kerry Archibald <kerrya@element.io >
2022-05-27 07:13:50 +00:00
Travis Ralston
e87bda9f37
Add an option to ignore (block) a user when reporting their events ( #8471 )
...
* Add an option to ignore (block) a user when reporting their events
This is primarily useful if the content being reported really doesn't belong on your screen, and the room moderators are slow to react.
Ideally we'd use the word "block" instead of "ignore", but we call it "ignore user" everywhere else. See https://github.com/vector-im/element-web/issues/19590 for further context on the word choice.
This change includes a minor refactor to the styles of labelled toggles (for reusability).
* Appease the linter
* Use a checkbox instead of toggle in the dialog
* Update classnames handling for toggle switch
* Appease the linter
2022-05-18 16:20:55 +00:00
Šimon Brandner
fb30b67b14
Fix issues with the new topic dialog ( #8608 )
2022-05-16 14:10:00 +02:00
Germain
fdd5494402
Add dialog to navigate long room topics ( #8517 )
2022-05-13 08:55:10 +01:00
Michael Weimann
7ed3089434
Improve tooltip positioning
...
Signed-off-by: Michael Weimann <michaelw@matrix.org >
2022-05-12 14:05:55 +02:00
Kerry
2c19d286ed
Eslint - require copyright header rule ( #8514 )
...
* bump eslint plugin to 0.5.2
Signed-off-by: Kerry Archibald <kerrya@element.io >
* add rule
Signed-off-by: Kerry Archibald <kerrya@element.io >
* add missing copyright headers
Signed-off-by: Kerry Archibald <kerrya@element.io >
* fix comment order
Signed-off-by: Kerry Archibald <kerrya@element.io >
2022-05-06 09:09:28 +00:00
Kerry
ce3bc9dc07
test typescriptification - EventListSummary ( #8493 )
...
* test/components/views/elements/EventListSummary-test.js -> tsx
Signed-off-by: Kerry Archibald <kerrya@element.io >
* add user mocks util
Signed-off-by: Kerry Archibald <kerrya@element.io >
* lint
Signed-off-by: Kerry Archibald <kerrya@element.io >
2022-05-04 16:37:41 +02:00
Robin
6bfe0436e5
Fix infinite loop when pinning/unpinning persistent widgets ( #8396 )
...
Pinning or unpinning a persistent widget, such as Jitsi, could cause the
PiP view and the app drawer to fight for control over the widget, since
the PiP view never realized that it was supposed to relinquish control.
This was due to a race between the WidgetLayoutStore update and the
AppTile lifecycle tracking update.
2022-04-25 08:29:54 -04:00
Travis Ralston
5137fcf3e8
Remove unit test function which isn't needed
...
The import ordering no longer requires us to create an injector function.
2022-03-31 19:43:17 -06:00
Travis Ralston
4144d0ba57
Step 8.5: Isolate RightPanelStore from RoomViewStore
2022-03-28 14:02:31 -06:00
Travis Ralston
a987ead7d2
Step 8.1: Remove skinning setup from all tests
2022-03-28 14:02:31 -06:00
Travis Ralston
26dc2ba45e
Step 3.1: Stop using getComponent in tests
2022-03-28 14:02:31 -06:00
Kerry
abc225d3c6
Unit test tsc fixes part 15 ( #8104 )
...
* fix ts issues in MPollBody test
Signed-off-by: Kerry Archibald <kerrya@element.io >
* fix ts issues in PollCreateDialog
Signed-off-by: Kerry Archibald <kerrya@element.io >
* fix settings components
Signed-off-by: Kerry Archibald <kerrya@element.io >
* fix DateSeparator
Signed-off-by: Kerry Archibald <kerrya@element.io >
* fix loosies
Signed-off-by: Kerry Archibald <kerrya@element.io >
* update tsconfig
Signed-off-by: Kerry Archibald <kerrya@element.io >
2022-03-22 11:32:35 +01:00
Germain
2acc8fd18b
Implement is_falling_back in accordance to MSC3440 ( #8055 )
2022-03-15 13:52:37 +00:00
Robin
744eeb53fe
Don't assume that widget IDs are unique ( #8052 )
...
* Don't assume that widget IDs are unique
Signed-off-by: Robin Townsend <robin@robin.town >
* Don't remove live tiles that don't exist
Signed-off-by: Robin Townsend <robin@robin.town >
* Add unit test for AppTile's live tile tracking
Signed-off-by: Robin Townsend <robin@robin.town >
2022-03-15 12:15:26 +00:00
Eric Eastwood
3572b36648
Fix room list being laggy while scrolling 🐌 ( #7939 )
...
Fix https://github.com/vector-im/element-web/issues/21262
Optimizations:
1. Don't update the `style` (positioning) of hidden tooltips
1. Don't add DOM elements to the page for hidden tooltips
> ## Performance problems broken down
>
>
> ### Hidden tooltips rendering on `scroll`
>
> You can see that the Tooltip render is attached to the `scroll` event at [`src/components/views/elements/Tooltip.tsx#L78-L81`](https://github.com/matrix-org/matrix-react-sdk/blob/31f0a37ca2eeba6a6296787f2fcb33c4b26efebc/src/components/views/elements/Tooltip.tsx#L78-L81 )
>
> The rendering calls [`src/components/views/elements/Tooltip.tsx#L101` -> `updatePosition`](https://github.com/matrix-org/matrix-react-sdk/blob/36adba101caf58afd280e6eedad003b38165be4f/src/components/views/elements/Tooltip.tsx#L101 ) which ends up as an expensive "Recalculate Style" because it uses [`Element.getBoundingClientRect()`](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect ). This happens many many times within a single `scroll` event. Probably once for each tooltip within the room list **even though no tooltips are event visible as I scroll**. I can see that we're just updating the `style` attribute for a bunch of `.mx_Tooltip_invisible` elements at the end of the document.
>
> Each one of the purple spans below the `scroll` span ends up as a call to `updatePosition`. And a `scroll` event takes 35ms to 60ms to complete which is way over the 16.6ms 60 FPS budget (on a powerful desktop PC), granted these times are with the performance profiling running. This is without the Passbolt extension explained below.
>
> And the room list contains about 141 rooms (`document.querySelectorAll('.mx_RoomTile').length`):
>
> 
>
>
>
> ### Passbolt Chrome browser extension exacerbates the problem
>
> In order to login to Passbolt, it requires a browser extension which defaults to mucking up all pages:
>
> <img src="https://user-images.githubusercontent.com/558581/156275644-bc26b1f5-5d99-4eae-b74b-c2028f2f1baf.png " width="300">
>
>
> The extension source seems to be available: https://github.com/passbolt/passbolt_browser_extension
>
> The Passbolt Chrome extension has a `MutationObserver` listening to all attribute and element changes to the whole `<body>` of the `document` so it can `findAndSetAuthenticationFields` (find form elements and autofill).
>
>
> [`passbolt/passbolt_styleguide` -> `src/react-web-integration/lib/InForm/InFormManager.js#L143`](https://github.com/passbolt/passbolt_styleguide/blob/1c5eddc9102c7cd1029d10dc6836af4722cdba61/src/react-web-integration/lib/InForm/InFormManager.js#L143 )
> ```js
> this.mutationObserver.observe(document.body, { attributes: true, childList: true, subtree: true });
> ```
>
> This causes a bunch of `Forced reflow` because the Tooltip `updatePosition` is mutating the element `style` attribute and Passbolt `MutationObserver` callbacks are querying the whole DOM looking for form elements all in the same frame.
>
> Under the `scroll` event, all of the little spans are the `MutationObserver` -> `findAndSetAuthenticationFields`. With the Passbolt extension, scrolling is verrrrry crunchy and bad.
>
> 
>
>
> #### Workaround
>
> Instead of running Passbolt on all sites, we can enable the extension to only run on the domain for Passbolt instance itself. I'm guessing the Passbolt extension also does autofill stuff on sites but I always login manually to the Passbolt instance so this solution works for me �
>
> **Extensions** -> **Passbolt** -> **Details** -> Change **Site access** to `On specific sites` -> Enter in your Passbolt instance `https://passbolt.example.com/ `
>
> 
>
> *-- https://github.com/vector-im/element-web/issues/21262 *
2022-03-02 13:20:01 -06:00
Kerry
5e76d988ca
convert test-utils to typescript ( #7877 )
...
* move js utils into directory
Signed-off-by: Kerry Archibald <kerrya@element.io >
* typescripterize js test-utils
Signed-off-by: Kerry Archibald <kerrya@element.io >
* move test utils to directory
Signed-off-by: Kerry Archibald <kerrya@element.io >
* move remaining mock functions to directory
Signed-off-by: Kerry Archibald <kerrya@element.io >
* update imports
Signed-off-by: Kerry Archibald <kerrya@element.io >
* missed copyright
Signed-off-by: Kerry Archibald <kerrya@element.io >
* type wait for update
Signed-off-by: Kerry Archibald <kerrya@element.io >
2022-02-23 11:21:11 +00:00
Michael Telatynski
8fccef86d8
Wire up drag-drop file uploads for the thread view ( #7860 )
2022-02-22 11:14:56 +00:00
Kerry
9db59d75b9
Bump react-focus-lock ( #7858 )
...
* react-focus-lock to 2.5.1
Signed-off-by: Kerry Archibald <kerrya@element.io >
* use enzyme in ASSD test so focus lock finds active element
Signed-off-by: Kerry Archibald <kerrya@element.io >
* findById and flushPromises to test utils
Signed-off-by: Kerry Archibald <kerrya@element.io >
2022-02-21 17:09:01 +00:00
Kerry
8b9263c808
Clean up some unit test logs ( #7857 )
...
* kill some unit test logs in arrays-test
Signed-off-by: Kerry Archibald <kerrya@element.io >
* remove mock logs that are asserted against anyway
* remove more logs
Signed-off-by: Kerry Archibald <kerrya@element.io >
* fix safeCOunterpartTranslate warnings in tests
Signed-off-by: Kerry Archibald <kerrya@element.io >
* more safeCounterpartTranslate warnings
Signed-off-by: Kerry Archibald <kerrya@element.io >
* lint
Signed-off-by: Kerry Archibald <kerrya@element.io >
* remove more logs
Signed-off-by: Kerry Archibald <kerrya@element.io >
* add helper
Signed-off-by: Kerry Archibald <kerrya@element.io >
* naming
Signed-off-by: Kerry Archibald <kerrya@element.io >
2022-02-21 16:57:44 +00:00
Andy Balaam
f1e1b7be86
Support "closed" polls whose votes are not visible until they are ended ( #7842 )
2022-02-21 10:21:35 +00:00
Kerry
fc9a221371
Focus trap in poll creation dialog ( #7847 )
...
* add autofocus
Signed-off-by: Kerry Archibald <kerrya@element.io >
* test
Signed-off-by: Kerry Archibald <kerrya@element.io >
* scope ids
Signed-off-by: Kerry Archibald <kerrya@element.io >
* whitespace
Signed-off-by: Kerry Archibald <kerrya@element.io >
2022-02-18 16:35:08 +00:00
J. Ryan Stinnett
a939184e10
Tear down AppTile using lifecycle tracking ( #7833 )
2022-02-17 16:30:36 +00:00
Andy Balaam
7387f3c80a
Allow editing polls ( #7806 )
2022-02-17 09:13:05 +00:00
Michael Telatynski
714136d4f7
Consolidate RedactionGrouper and HiddenEventGrouper into MELS ( #7739 )
2022-02-09 10:51:12 +00:00
Michael Telatynski
78e78292cb
Update PollCreateDialog-test to snapshot the html and not react tree ( #7712 )
2022-02-03 11:54:03 +00:00
Germain
5973d725e0
Add new threads to the panel as they are discovered ( #7688 )
2022-02-01 15:01:00 +00:00
Eric Eastwood
a00d359422
Fix left positioned tooltips being wrong and offset by fixed value ( #7551 )
...
Previously, the `left` positioning seemed to only work with icons which are all about the same size so the arbitrary offset worked. Now we actually position off to the left of the element and we have equal `margin-left` and `margin-right` to determine the offset.
Spawned from https://github.com/matrix-org/matrix-react-sdk/pull/7339#discussion_r767154349
2022-01-18 21:08:11 -06:00
Michael Telatynski
f4a6219c88
Replace kick terminology with Remove from chat ( #7469 )
2022-01-14 13:08:34 +00:00
Andy Balaam
5ae166777c
Update test snapshots to reflect new field in Room ( #7523 )
2022-01-12 13:14:33 +00:00
Kerry
03f5a3c3e6
Associate room alias warning with public option in settings ( #7430 )
...
* add describedby to styledradiogroup description
Signed-off-by: Kerry Archibald <kerrya@element.io >
* alias warning in description
Signed-off-by: Kerry Archibald <kerrya@element.io >
* lint
Signed-off-by: Kerry Archibald <kerrya@element.io >
* update snapshot
Signed-off-by: Kerry Archibald <kerrya@element.io >
2022-01-03 09:55:09 +01:00
Travis Ralston
e4b96cff1f
Merge remote-tracking branch 'aaronraimist/sort-imports' into develop
2021-12-09 16:03:59 -07:00
Kerry
3c1ee204a0
default export for TooltipTarget ( #7319 )
...
* default export for TooltipTarget
Signed-off-by: Kerry Archibald <kerrya@element.io >
* newline
Signed-off-by: Kerry Archibald <kerrya@element.io >
2021-12-09 13:36:55 +01:00
Kerry
1216285ed2
Add descriptions to ambiguous links for screen readers ( #7310 )
...
* add title to room share link
Signed-off-by: Kerry Archibald <kerrya@element.io >
* add ExternalLink component
Signed-off-by: Kerry Archibald <kerrya@element.io >
* unit test ExternalLink
Signed-off-by: Kerry Archibald <kerrya@element.io >
* default target and rel for external link
Signed-off-by: Kerry Archibald <kerrya@element.io >
* use scss $font variables
Signed-off-by: Kerry Archibald <kerrya@element.io >
2021-12-09 13:04:06 +01:00
Kerry
0c850b2f13
Make tooltips keyboard accessible ( #7281 )
...
* show tooltips on hover in eventtile
Signed-off-by: Kerry Archibald <kerrya@element.io >
* use tooltip props pass thru
* use tooltiptarget in InfoTooltip
Signed-off-by: Kerry Archibald <kerrya@element.io >
* use target in TestWithTooltip
Signed-off-by: Kerry Archibald <kerrya@element.io >
* tsc fixes
Signed-off-by: Kerry Archibald <kerrya@element.io >
* test tooltip target
Signed-off-by: Kerry Archibald <kerrya@element.io >
* lint fix
Signed-off-by: Kerry Archibald <kerrya@element.io >
* rename tooltip handlers
Signed-off-by: Kerry Archibald <kerrya@element.io >
* update copyright to 2021
Signed-off-by: Kerry Archibald <kerrya@element.io >
2021-12-09 11:47:50 +01:00
Aaron Raimist
2e8a93834b
Auto fix
...
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2021-12-09 09:10:23 +00:00
Aaron Raimist
7b94e13a84
Merge branch 'develop' into sort-imports
...
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2021-12-09 08:34:20 +00:00
Michael Telatynski
4a6d46b76a
Replace breadcrumbs with recently viewed menu ( #7073 )
2021-12-01 10:50:06 +00:00
Andy Balaam
ea97c416f5
Test for showing a spinner after submitting a new poll ( #7194 )
2021-11-24 16:24:19 +00:00
Andy Balaam
d7f3d2791a
Basic tests for PollCreateDialog ( #7193 )
...
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com >
2021-11-24 13:48:07 +00:00
Aaron Raimist
bdc56be863
Auto fix
...
Signed-off-by: Aaron Raimist <aaron@raim.ist >
2021-10-22 17:23:37 -05:00
Germain Souquet
5a7c0d87b6
Rename ReplyThread to ReplyChain to avoid confusion with m.thread
2021-10-15 17:42:44 +01:00
Eric Eastwood
9c3439a1aa
Show updated relation reply from edited message - v2 ( #6817 )
...
Part of https://github.com/vector-im/element-web/issues/10391
When `m.relates_to` -> `m.in_reply_to` is provided in `m.new_content`
for an edited message, use the updated reply.
ex.
```json
{
"type": "m.room.message",
"content": {
"body": " * foo bar",
"msgtype": "m.text",
"m.new_content": {
"body": "foo bar",
"msgtype": "m.text",
"m.relates_to": {
"m.in_reply_to": {
"event_id": "$qkjmFBTEc0VvfVyzq1CJuh1QZi_xDIgNEFjZ4Pq34og"
}
}
},
"m.relates_to": {
"rel_type": "m.replace",
"event_id": "$lX9MRe9ZTFOOvnU8PRVbvr1wqGtYvNQ1rSot-iUTN5k"
}
}
}
```
2021-09-17 15:18:52 -05: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
J. Ryan Stinnett
ae0a8b8da4
Auto-fix lint errors
2021-06-29 13:11:58 +01:00
Šimon Brandner
232b87a3b4
Improve formatting
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com >
2021-04-29 19:57:02 +02:00
Šimon Brandner
46bfbbadf9
Enable indent rule and fix indent
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com >
2021-04-27 17:23:27 +02:00
Travis Ralston
6ab235f10c
Fix tests for new call path
...
We have to mock `fetch` for the caching of the download icon, and then mock out all the function calls used by components to feed a Media object.
2021-03-11 09:42:55 -07:00