* Conform more of the codebase to `strictNullChecks`
* Iterate
* Iterate
* Iterate
* Iterate
* Conform more of the codebase to `strictNullChecks`
* Iterate
* Update record key
* Add missing aria-expanded attributes
* Improve autoComplete for phone numbers & email addresses
* Fix room summary card heading order
* Fix missing label on timeline search field
* Use appropriate semantic elements for dropdown listbox
* Use semantic list elements in keyboard settings tab
* Use semantic list elements in spotlight
* Fix types and i18n
* Improve types
* Update tests
* Add snapshot test
* Conform more of the codebase to `strictNullChecks`
* Conform more of the codebase to `strictNullChecks`
* Fix types
* Conform more of the codebase to `strictNullChecks`
* Conform more of the codebase to `strictNullChecks`
* Properly translate errors in AddThreepid.ts
Part of https://github.com/vector-im/element-web/issues/9597
* Use translated message
* Avoid returning undefined ever
* More usage
* Introduce UserFriendlyError
* Use UserFriendlyError
* Add more usage instead of normal error
* Use types and translatedMessage
* Fix lints
* Update i18n although it's wrong
* Use unknown for easier creation from try/catch
* Use types
* Use error types
* Use types
* Update i18n strings
* Remove generic re-label of HTTPError
See https://github.com/matrix-org/matrix-react-sdk/pull/10432#discussion_r1156468143
The HTTPError already has a good label and it isn't even translated if we re-label it here in this way generically
Probably best to just remove in favor of thinking about a translations in general from the `matrix-js-sdk`, see https://github.com/matrix-org/matrix-js-sdk/issues/1309
* Make error message extraction generic
* Update i18n strings
* Add tests for email addresses
* More consistent error logging to actually see error in logs
* Consistent error handling
* Any is okay because we have a fallback
* Check error type
* Use dedicated mockResolvedValue function
See https://github.com/matrix-org/matrix-react-sdk/pull/10432#discussion_r1163344034
* Simplify `isDeviceVerified` definitions
Currently, we have two similar but different definitions of `isDeviceVerified`,
and they both do a lot of wrangling that relies on js-sdk internals. We can
simplify it a lot by just calling `MatrixClientPeg.checkDeviceTrust`.
* fix tests
* more test fixes
* Improve typing in constructor of RoomPermalinkCreator
* Provide via servers if present when navigating to predecessor room from Advanced Room Settings
* Show an error tile when the predecessor room is not found
* Test for MatrixToPermalinkConstructor.forRoom
* Test for MatrixToPermalinkConstructor.forEvent
* Display a tile for predecessor event if it contains via servers
* Fix missing case where event id is provided as well as via servers
* Refactor RoomPredecessor tests
* Return lost filterConsole to its home
* Comments for IState in AdvancedRoomSettingsTab
* Explain why we might render a tile even without prevRoom
* Guess the old room's via servers if they are not provided
* Fix TypeScript errors
* Adjust regular expression (hopefully) to avoid potential catastrophic backtracking
* Another attempt at avoiding super-liner regex performance
* Tests for guessServerNameFromRoomId and better implementation
* Further attempt to prevent backtracking
---------
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* add /me handling
* use typeguards to avoid fighting TS
* improve clarity and use of typeguards
* add createMessageContent tests
* remove completed TODO
* improve comments
* remove duplication and renaming of argument
* pass handleCommand prop down and use it in WysiwygAutocomplete
* allow a command to generate a query from buildQuery
* port command functionality into the sendMessage util
* tidy up comments
* remove use of shouldSend and update comments
* remove console log
* make logic more explicit and amend comment
* uncomment replyToEvent block
* update util test
* remove commented out test
* use local text over import from current composer
* expand tests
* expand tests
* handle the FocusAComposer action for the wysiwyg composer
* remove TODO comment
* remove TODO
* test for action dispatch
* fix failing tests
* tidy up tests
* fix TS error and improve typing
* fix TS error
* amend return types for sendMessage, editMessage
* fix null content TS error
* fix another null content TS error
* use as to correct final TS error
* remove undefined argument
* try to fix TS errors for editMessage function usage
* tidy up
* add TODO
* improve comments
* update comment
* Show room create button in RoomSublist if "UIComponent.roomCreation" is enabled
Signed-off-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net>
* Revert "Show room create button in RoomSublist if "UIComponent.roomCreation" is enabled"
This reverts commit a332a0b02a6c3253ea7ac606211c41a09c409de5.
* Use UIComponent.ExploreRooms to display menu item "Explore public rooms" ("Explore rooms" in case of space room) in context menu of "Rooms" section of RoomList component. The context menu will be available if one of UIComponent.ExploreRooms or UIComponent.CreateRooms is enabled.
Signed-off-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net>
* "Explore rooms" of space room should not be controlled by UIComponent.ExploreRooms.
Signed-off-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net>
---------
Signed-off-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net>
Co-authored-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net>
* Use grid layout instead
- BEM naming style
- Increase block gap from 4px to 8px
- Use flexbox inside 'header' grid-area to let the buttons wrapped
- Use variables
- Remove 4px gap when one of the buttons is not rendered
- Change 'body' to 'message'
- Set 'align-self: start' to the icon and spinner
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
* Unset height of spinner
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
* Break lines at newline characters with white-space: pre-line
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
* Edit tests to check decryption failure bars on narrow timeline
- checkTimelineNarrow() looks for buttons by default
- Test indicator as well
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
* Remove a line
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
* Edit the test to have it check mx_EventTile_last only inside mx_RoomView_body
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
* Fix double underscores
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
* Fix double underscores - pcss
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
* Iterate - buttons at the bottom
- Set common spacing to buttons with variables
- Remove line breaks, yarn run i18n
- Set data-testid for headlines and buttons in case the tested strings would be displayed elsewhere simultaneously
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
* Check waiting headline as well
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
* Increase spacing between the message and the buttons
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
* lint
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
* Increase block gap between wrapped buttons for clickability
Apply 8px between wrapped buttons
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
* Revert bottom margin of buttons which are not expected to be wrapped
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
* Check visibility instead of existence
This commit removes data-testid from headlines and data-testid-button and checks whether the elements are really visible, not overflowing the viewport.
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
* Remove redundant gap between 'mx_DecryptionFailureBar_start' and the bottom edge
This commit adds '.mx_DecryptionFailureBar--withEnd' class name to have it applied to the bar only if it has button(s). This way the bar is rendered with a flexbox and the row-gap declaration is respected only if there is a 'mx_DecryptionFailureBar--withEnd' element. The element currently includes the button(s) only.
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
* lint - prettier
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
* Have Percy take a snapshot of the bar loading spinner before checkTimelineNarrow()
The loading spinner is likely to disappear while checking the bar on the narrow timeline.
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
---------
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
Co-authored-by: Kerry <kerrya@element.io>
* bumps the RTE dependency to introduce user/room mention handling
* adds autocomplete behaviour to allow users to insert user and room mentions as links
* sets up tests for the autocomplete behaviour