Commit Graph

45 Commits (b08bdf7e0d4580dc62f51afa9de1e32082963fe7)

Author SHA1 Message Date
Rashmit Pankhania b08bdf7e0d
Fix "Export chat" not respecting configured time format in plain text mode (#10696)
* #23838 Fix "Export chat" time format in plain text mode

* #23838 Fix import of matrix-js-sdk

* Remove hardcoded locale

Co-authored-by: Michael Weimann <mail@michael-weimann.eu>

* Fix test for readability

Signed-off-by: Rashmit Pankhania <raspankh@publicisgroupe.net>

* Fix test

Signed-off-by: Rashmit Pankhania <raspankh@publicisgroupe.net>

* Fix test

Signed-off-by: Rashmit Pankhania <raspankh@publicisgroupe.net>

* Fix test

Signed-off-by: Rashmit Pankhania <rashmitpankhania@gmail.com>
Signed-off-by: Rashmit Pankhania <raspankh@publicisgroupe.net>

* Use dateUtils formatFullDate function

Signed-off-by: Rashmit Pankhania <raspankh@publicisgroupe.net>

---------

Signed-off-by: Rashmit Pankhania <raspankh@publicisgroupe.net>
Signed-off-by: Rashmit Pankhania <rashmitpankhania@gmail.com>
Co-authored-by: Rashmit Pankhania <raspankh@publicisgroupe.net>
Co-authored-by: Michael Weimann <mail@michael-weimann.eu>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-08-07 13:58:45 +00:00
Michael Telatynski 24703eea8f
Switch to importing models/event from main js-sdk export (#11363) 2023-08-07 08:24:58 +00:00
Michael Telatynski e67ca33c4a
Switch to importing models/Room from main js-sdk export (#11361)
* Switch to importing TypedEventEmitter from main js-sdk export

* Switch to importing js-sdk/matrix in cypress

* Remove duplicated imports

* Fix lint:js-fix to run prettier last otherwise ESLint --fix may cause a mess

* Add lint rule

* Switch to importing models/Room from main js-sdk export

* Fix cypress-axe import

* Fix more imports

* Fix cypress-axe import

* Fix duplicated lint rule
2023-08-04 07:36:16 +00:00
Michael Telatynski 9b5b053148
Use MatrixClientPeg::safeGet for strict typing (#10989) 2023-06-21 17:29:44 +01:00
Michael Telatynski 6b46d6e4f8
Add MatrixClientPeg::safeGet and use it in tests (#10985) 2023-06-05 18:12:23 +01:00
Suguru Hirahara ea4000cf1e
Fix 'Failed check: Ellipsis' on Weblate (#10144)
* Fix 'Failed check: Ellipsis' on Weblate

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Fix tests

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Remove white space characters before the horizontal ellipsis from RoomPreviewBar

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* yarn run i18n

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Additional change

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-02-14 09:05:01 +00:00
Michael Telatynski 030b7e90bf
Enable `@typescript-eslint/explicit-function-return-type` in /src (#9788)
* Enable `@typescript-eslint/explicit-member-accessibility` on /src

* Prettier

* Enable `@typescript-eslint/explicit-function-return-type` in /src

* Fix types

* tsc strict fixes

* Delint

* Fix test

* Fix bad merge
2023-01-12 13:25:14 +00:00
Michael Telatynski f1e8e7f140
Enable `@typescript-eslint/explicit-member-accessibility` on /src (#9785)
* Enable `@typescript-eslint/explicit-member-accessibility` on /src

* Prettier
2022-12-16 12:29:59 +00:00
Michael Weimann 526645c791
Apply prettier formatting 2022-12-12 12:24:14 +01:00
Travis Ralston 10a429c68d
Include a file-safe room name and ISO date in chat exports (#9440)
* conversation export named after room

* sanitization added for exported file name

* sanitization added for exported file name

* sanitization added for exported file name

* sanitization added for exported file name=>lint error fixed

* sanitization added for exported file name=>lint error fixed

* sanitization added for exported file name=>redundancy removed

* sanitization added for exported file name=>redundancy removed

* reverted to previous commit

* sanitization added for exported file name=>redundancy removed

* exported chat date iso formatted

* conversation export named after room

* conversation export named after room

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>

* code refacto filename date format

* Add docs to fn

* Bring in a util library for sanitizing

* Extract file naming function and make consistent for all 3 types

Also use the library we dragged in

* Write tests & associated fixes

* Apply linters locally

* Include new date util in index

Co-authored-by: Sinharitik589 <sinharitik18112835@gmail.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: yaya-usman <yayaazeez222@gmail.com>
Co-authored-by: Sinharitik589 <67551927+Sinharitik589@users.noreply.github.com>
2022-10-17 19:54:10 -06:00
Travis Ralston b5e18064ab
Import React to appease IDE linter (#8817)
Apparently we shouldn't be using global references to React, so import it.
2022-06-11 21:17:55 +00:00
Robin 7335b35fbb
Avoid looking up settings during timeline rendering (#8313)
* Avoid showHiddenEventsInTimeline lookups

* Avoid MSC3531 feature lookups

* Test that showHiddenEventsInTimeline doesn't get looked up while
rendering

* Fix code review nits

Co-authored-by: Travis Ralston <travisr@matrix.org>
2022-04-14 23:23:22 +00:00
Travis Ralston 9350c50f87 Step 6: Refactor event rendering to stop using `getComponent`
We move all of the event tile rendering into a factory manager for a couple reasons:
1. `EventTile` is uncomfortably large for a file
2. A simple map isn't possible anymore (can't convert the existing maps like `eventTileTypes` to `Record<string, typeof React.Component>` because the types are actually incompatible)

So, by having a factory manager place we can more easily render components without having to use `getComponent()` all over the place, and without lying to ourselves about how simple the event rendering path is.

This change also moves quite a bit of the rendering path into the new `EventTileFactory` file so it can be easily seen by future developers.
2022-03-28 14:02:31 -06:00
Michael Telatynski 3229b06b01
Add internationalisation to progress strings in room export dialog (#7385) 2021-12-15 16:21:51 +00:00
Aaron Raimist bdc56be863
Auto fix
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2021-10-22 17:23:37 -05:00
Dariusz Niemczyk 2c66403b3c Replace console.info with logger.info
Related https://github.com/vector-im/element-web/issues/18425
2021-10-18 14:08:23 +02:00
Dariusz Niemczyk 9c594a8a96 Replace console.logs to logger.log
Related https://github.com/vector-im/element-web/issues/18425
2021-10-18 14:08:23 +02:00
Jaiwanth 3efa699b88 Delint 2021-08-14 00:14:57 +05:30
Jaiwanth 31c9e5962c Move export dialog to async-components 2021-08-14 00:03:02 +05:30
Jaiwanth edfc8af6cf Apply PR Suggestions 2021-08-13 08:30:50 +05:30
Jaiwanth 900accd823 Add test for renderToString 2021-08-09 13:25:32 +05:30
Jaiwanth 850b5452a0 Add tests for reply regex 2021-08-09 12:36:06 +05:30
Jaiwanth e29d9db2e7 Fetch exportCSS during export 2021-08-04 12:37:13 +05:30
Jaiwanth 04edf4103f Remove unnecessary awaits 2021-07-30 11:46:55 +05:30
Jaiwanth 9771f4d6c4 PascalCasing for enums 2021-07-27 00:00:52 +05:30
Jaiwanth b91309be82 Apply suggestions from review 2021-07-26 23:40:27 +05:30
Jaiwanth 6dd3631a17 Delint 2021-07-21 11:48:37 +05:30
Jaiwanth f07402d234 Fix types and precompute blob sizes to avoid overflows 2021-07-19 13:17:19 +05:30
Jaiwanth 87c624d085 Use ref for progress updates 2021-07-02 16:52:33 +05:30
Jaiwanth 6ca664636e Display progress 2021-07-02 10:23:34 +05:30
Jaiwanth 08d886e9d1 Delint 2021-06-30 14:08:22 +05:30
Jaiwanth efd8bf3a0f Delint 2021-06-28 11:00:34 +05:30
Jaiwanth d46fe678b0 Handle export cancellation 2021-06-27 20:55:54 +05:30
Jaiwanth 566e7bc8d6 format 2021-06-25 15:52:01 +05:30
Jaiwanth 4af8ec4d40 Explicitly declare file extensions for stickers and log event fetching progress 2021-06-25 15:40:28 +05:30
Jaiwanth 593f14beae Append media text to text for event 2021-06-25 15:01:14 +05:30
Jaiwanth c885cd719f i18n 2021-06-25 14:58:59 +05:30
Jaiwanth abbe047bfd try catch for plain text 2021-06-25 14:49:01 +05:30
Jaiwanth 3718826e94 refactor to share downloading code across all formats 2021-06-25 11:16:59 +05:30
Jaiwanth 112dfa2b96 Finish JSON export implementation 2021-06-24 18:19:12 +05:30
Jaiwanth 438b9d4730 Get rid of jszip and replace it with a custom library 2021-06-23 11:58:50 +05:30
Jaiwanth db875508d8 Add text for room avatar events and skip empty text events 2021-06-22 12:50:15 +05:30
Jaiwanth 8a1cd77ef4 Handle no match cases and modify textForEvent to handle redacted messages 2021-06-22 12:12:37 +05:30
Jaiwanth bf189204f2 Implement IRC bridge style reply formatting 2021-06-22 10:49:14 +05:30
Jaiwanth 9e6b8ff9f5 Start implementation of plain text export 2021-06-17 10:46:08 +05:30