Display a warning when an unverified user's identity changes#28211
Conversation
ada3de0 to
6fa98f8
Compare
There was a problem hiding this comment.
In a first time, we should move UserIdentifyWarning into a functional component and break down its behaviour into multiple hooks. Let me know if you need help to do it
There are differences with the figma design too.
|
I think that I've addressed all of @florianduros 's concerns. The test failure looks like possible flakiness, since it's testing components that I haven't touched. |
florianduros
left a comment
There was a problem hiding this comment.
It's looking better! Now we can move theses hooks and their logic into separate custom hooks in order to encapsulate their behaviour and make the component easier to maintain.
In test:
- use
jest.spyOnin test to handle the mocking of the client or the crypto api. - use https://testing-library.com/docs/queries/about/ to get the dom element. We want to favour the
rolequery in order to make it sure that we are also accessible - In case of async behaviour when we need to wait for a rerender,
waitForis doing for us the retry/waiting.
| [cli, room, updateCurrentPrompt], | ||
| ); | ||
|
|
||
| // Check if the user's identity needs approval, and if so, add them to the |
There was a problem hiding this comment.
| // Check if the user's identity needs approval, and if so, add them to the | |
| // For each user in the list, check if their identity needs approval, and if so, add them to the |
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
|
Strange. One of the tests is now failing in CI, even though I only made a comment change. And I can't reproduce the failure locally. Will need to investigate. |
Fixes element-hq/element-meta#2513
Checklist
public/exportedsymbols have accurate TSDoc documentation.