Граф коммитов

3174 Коммитов

Автор SHA1 Сообщение Дата
M-ZubairAhmed
cd58a5baaf [MM-55339] Improve types for Markdown component (#25350) 2023-11-09 14:17:22 +05:30
Ben Cooke
ee6457c3df [MM-55009] Remove pre-fetch preference and set new pre fetch limits (#25251)
* remove pre-fetch preference and set new pre fetch limits

* i18n

* adding unit test

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-08 17:23:32 -05:00
Claudio Costa
e96fb9c32c Register WebVTT format to be previewable as text (#25289) 2023-11-08 16:21:26 -06:00
Harrison Healey
be34a5d2df Run component tests with a real store and use renderWithContext everywhere (#25217)
* Change renderWithFullContext to not mock Redux store

* Remove renderWithIntl and renderWithIntlAndStore

* Rename renderWithFullContext to renderWithContext

* Use renderWithContext for WS context
2023-11-08 17:02:40 -05:00
Santosh
ab349946db Fixes #25120 - Horizontal scrollbar appearing on slash command autocomplete (#25154) 2023-11-08 15:42:42 -06:00
Nhan Nguyen - Edward
808c6ec6dc MM-53360 : Scroll to the bottom of channel banner (#24682)
* feat(channel-chat): MM-53360 Scroll to the bottom of channel chat

This commit adds new toast to the channel chat, which allows users to
scroll to the bottom quickly.

As it is needed to be along side with the `Search hint toast`, I needed
to adjust the code inside `hint_toast, toast_wrapper` more than
expected.

- [x] Updated tests/snapshots

* refactor(scroll-to-bottom): MM-53360 Replace if block => separated func

* style: MM-53360 Fix order of imports

* refactor(scroll-to-bottom): MM-53360 Simplify hideScrollToBottonToast

* test(scroll-to-bottom): MM-53360 Migrate test from enzyme to react test

This commit migrates unit tests from `enzyme` to `react-testing-library`.

Besides, it adds new test ids for testing purposes.

* fixup! test(scroll-to-bottom): MM-53360 Migrate test from enzyme to react test

* style: MM-53360 Fix eslint error

* style(hint_toast): MM-53360 Update style to match the design

Decrease the size, and increase the font-weight of the shortcut key.
See more at: https://www.figma.com/file/gbnx8ydTX0bTFIbJ8NWGfR/MM-53360-Scroll-to-bottom-of-chat?type=design&node-id=1101-21615&mode=dev

* feat(scroll-to-bottom): MM-53360 Change condition to show toast

- Hide the toast after clicking "Jump to recents".
- Do not show the toast if the user dismissed it before.

* fixup! feat(scroll-to-bottom): MM-53360 Change condition to show toast

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-08 12:13:52 -05:00
Asaad Mahmood
2c82ff85a5 MM-55050 - Updating Terms of Service page (#25163)
* MM-55050 - Updating Terms of Service page

* Updating button group

* Updating button style

* Updating bsstyle

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-08 20:35:20 +05:00
Antonis Stamatiou
cfa48dd4c4 fix: Show proper version on about modal (#25370) 2023-11-08 17:24:23 +02:00
Asaad Mahmood
682ce17bc7 MM-50246 - Updating custom styles for login page (#25347)
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-08 12:30:50 +05:00
Akbar Abdrakhmanov
f29fbddef1 [MM-55107] Replace usage of LocalizedIcon in 'update_user_group_modal.tsx' with i/span tags (#25299) 2023-11-08 06:46:30 +05:30
Atharva Joshi
f8f50ca882 [MM-54804] Convert ./components/post_emoji/post_emoji.tsx from Class Component to Function Component (#25080)
* ISSUE-#24767 | Convert post_emoji.tsx from Class Component to Function Component

* lint fix

* resolve changes

* lint fix

* lint fix

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-07 10:51:53 +01:00
Muzakir Shah
7f457ffed3 loading_spinner.tsx converted to functional component. (#25115)
* loading_spinner.tsx converted to functional component.

* merging changes revised

* fixing CI failures

* fixing linting errors

* snapshot updation

* Update snapshot

* Update snapshot

* update snapshot

* Update snapshot

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-07 10:51:21 +01:00
M-ZubairAhmed
f733dc58fa [MM-55294] Migrate jest v26 to v29 to speed up "web app CI PR / test" (#25192) 2023-11-07 11:41:26 +05:30
Nick Misasi
92d9826a3c Fix preparing workspace redirecting to invalid channel (#25247) 2023-11-06 10:56:43 -05:00
Sudhanshu Pandey
b3c183cdf2 [MM-54820] Convert ./components/channel_header_mobile/unmute_channel_button/unmute_channel_button.tsx from Class Component to Function Component (#24974)
* chore: migrated UnmuteChannelButton to fun. comp.

* fix: resolves type errors

* feat: introduces memo to unmute_channel_button

* chore: minor syntax improvement

* chore: address code review suggestions

* chore: address code review suggestions
2023-11-06 13:24:18 +01:00
Umar Abid
caa87ec7f6 [GH-24745] Convert ./components/admin_console/setting.tsx from Class Component to Function Component (#24861)
* fix: convert admin_console/setting.tsx to FC

* fix: update failing snapshots
2023-11-06 13:22:16 +01:00
Daniel Espino García
83e06a65a6 Fix error when updating a GM/DM (#25186) 2023-11-06 13:19:58 +01:00
Rohit Chaudhari
2f86b1ffd7 [MM-54816] Convert ./components/admin_console/color_setting.tsx from Class Component to Function Component (#24963)
* Convert class component to function component

* Apply changes from suggestions

* Lint check

* Update schema_admin_settings.test.jsx.snap

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-06 12:42:55 +01:00
Deepakumar V U
366d1613b7 [MM-55106] Replace usage of LocalizedIcon in 'system_notice.tsx' with i/span tags (#25268) 2023-11-06 15:49:38 +05:30
Harrison Healey
ec4dc6b122 Fix typo in emoji code (#25290) 2023-11-03 16:57:05 -04:00
Emil-Carlsson
19eeccceb5 Wont show password if only LDAP/AD enabled (#23860) (#24735)
Automatic Merge
2023-11-03 12:22:22 +01:00
Harrison Healey
ce3b54d23e Remove unused images and fonts from web app (#25047)
* Remove unused images from web app

* Remove unused fonts from web app
2023-11-02 16:19:37 -04:00
Harrison Healey
1fffb3c528 Update documentation on JS API client (#25266)
* Update documentation on JS API client

* Update link to monorepo and web app repo
2023-11-02 16:17:42 -04:00
Pablo Andrés Vélez Vidal
614a1f4a48 MM-55146_fix activate/deactivate ux when ldap users (#25167)
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-02 16:31:45 +01:00
Umar Abid
f777765a3e [MM-55112] Replace usage of LocalizedIcon in 'user_settings_notifications.tsx' with i/span tags (#25264) 2023-11-02 18:02:53 +05:30
Vishal
dfb561a641 [MM-54357] Recent Mentions is showing posts for other similar named users. (#25010)
* Handle double quotes in Postgres
* quote the username when performing the search
2023-11-02 11:05:44 +05:30
Sudheer Tripathi
e0dd8e3d3e [MM-54758] Thread/posts jump when switching to and from preview mode (#25085)
* chore: add scss

* chore: add display-none alternation between components

* chore: remove unwanted change

* feat: use :not css not selector to switch between preview mode and edit mode

* chore: fix test snaps

---------

Co-authored-by: Sudheer Tripathi <sudheer@clearglass.com>
2023-11-01 15:47:29 -04:00
Tejas Gavankar
c91f85124c [MM-55091] Replace usage of LocalizedIcon in 'add_users_to_group_modal.tsx' with i/span tags (#25202) 2023-11-01 16:41:53 +05:30
Jesús Espino
da43d75e78 Admin console definition to typescript (#25232)
* Migrating admin_definition from jsx to tsx

* Fixing types and errors

* Fixing all the types errors

* Fixing linter errors

* Removing no longer needed yup dependency

* Moving admin_definition types to its own file

* Removing a couple of anys

* Fixing linter errors

* Fixing tests snapshots

* Fixing bug

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-01 09:57:23 +01:00
Noha M
3812de0dec #24744 Converted ./components/spinner_button.tsx from Class Component to Function Component (#24804)
* Converted [./components/spinner_button.tsx] to functional component

* Converted [./components/spinner_button.tsx] to functional component

* [./components/spinner_button.tsx]: wrapped the component with react.memo + removed default props + use multi-lines in args

* [./components/spinner_button.tsx]:
- fix lint errors in spinner button
- fix error in missing prop on spinnerButton component

* [./components/spinner_button.tsx]:
- convert class component to functional component - fix lint errors in spinner button

* fix:[spinner_button]: fix lint errors

* - fix: [add_emoji.tsx]: add an id selector to the SpinnerButton to fix issue in unit test for this file.
- fix: [add_emoji.test.tsx]: find the saveButton with id selector instead of using element directly (was causing test fai)
- update test snapshots

* fix[add_emoji]: replaced id with data-testid to be used in unit test

---------

Co-authored-by: Noha M <33437197+NohaaAa@users.noreply.github.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-10-31 10:35:01 +01:00
Sudhanva-Nadiger
6dda6e3540 [MM-54878] Replace usage of LocalizedIcon in 'plain_log_list.tsx' with i/span tags (#25135) 2023-10-31 13:44:07 +05:30
Suraj lal
bcc60ed692 [MM-55105] Replace usage of LocalizedIcon in 'search_results_header.tsx' with i/span tags (#25209) 2023-10-31 11:04:43 +05:30
Suraj lal
3c9bb83e25 [MM-55111] Replace usage of LocalizedIcon in 'user_settings_general.tsx' with i/span tags (#25208) 2023-10-31 11:03:34 +05:30
Suraj lal
dda3bf1dec [MM-55115] Replace usage of LocalizedIcon in 'view_user_group_header_sub_menu.tsx' with i/span tags (#25207) 2023-10-31 11:02:27 +05:30
Gaurav Padam
aae7e401e4 [MM-52976] Increase width of announcement banner tooltip (#24964) 2023-10-31 10:40:07 +05:30
Sudhanva-Nadiger
6a26e40ee6 [MM-53474] Migrate 'components/suggestion/switch_channel_provider.test.jsx' to TypeScript 2023-10-31 08:53:57 +05:30
Akbar Abdrakhmanov
c6a6ad9b4b [MM-50821] Notify about successful login only once via screen reader (#24979)
* [MM-50821] Notify about successful login only once via screen reader

* clear timeout via useEffect instead of inside setTimeout in AdvanceTextEditor

* declare timeout as ref in AdvancedTextEditor

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-10-30 17:48:29 -04:00
Harrison Healey
bfd6f5aa01 Use bulk emoji API for loading recent emojis (#25043) 2023-10-30 16:03:43 -04:00
ludvigbolin
4547d9ab0e [GH24626] Remove ExperimentalTimezone as this is always true (#24657)
* Remove all occurrences of ExperimentalTimezone in /server

This removes all uses of ExperimentalTimezone and makes all conditions using this setting being either removed (== false) or always used (== true)

* Remove timezone parameter for getChannelMemberByGroup

As timezone is always enabled this function no longer has a second parameter. The endpoint will always be called with includeTimezones set to true

* Remove all uses of ExperimentalTimezone in webapp

All conditions dependent of this are adjusted to always be true if experimentalTimezone should be true and vice versa

* Change all tests checking for correct usage of ExperimentalTimezone

As this parameter is no longer used, the tests which check for correct behaviour of this is no longer needed

* Fix type errors

Tests regarding types does now pass

'npm run check-types' will run successfully

* fix lint issues

Fix all current lint errors and now lint test goes through

* Fix test regarding profile popover

enableTimezone now is gone and all profile_popover.test.tsx can run successfully.

Added state.entities.users.profiles[] as it before threw an error without it.

* Fix tests where "April 1 2019" was changed to "April 01 2019"

Now it will show "April 1 2019" and "timeZone" will only show if its other than empty ("").

* Fix test where date was set to NaN

Now date will show correctly and will not be NaN

* fix minor test case that failed before

* fix linting in server

* Delete tests that are not valid with timeZoneEnabled removed

tests in advanced_create_comment and advanced_create_post had timeZoneEnabled
set to false as default. The tests that use this are now changed to once which are meant to have timeZoneEnabled set to true.

Adjust jest function in advanced_create_post to get correct stacktrace

* Parameter deleted

isTimeZoneEnabled is always true and therefore the parameter can be deleted

* adjust to prettier standard

* Remove all occurrences of ExperimentalTimezone in /server

This removes all uses of ExperimentalTimezone and makes all conditions using this setting being either removed (== false) or always used (== true)

* Remove timezone parameter for getChannelMemberByGroup

As timezone is always enabled this function no longer has a second parameter. The endpoint will always be called with includeTimezones set to true

* Remove all uses of ExperimentalTimezone in webapp

All conditions dependent of this are adjusted to always be true if experimentalTimezone should be true and vice versa

* Change all tests checking for correct usage of ExperimentalTimezone

As this parameter is no longer used, the tests which check for correct behaviour of this is no longer needed

* Fix type errors

Tests regarding types does now pass

'npm run check-types' will run successfully

* fix lint issues

Fix all current lint errors and now lint test goes through

* Fix test regarding profile popover

enableTimezone now is gone and all profile_popover.test.tsx can run successfully.

Added state.entities.users.profiles[] as it before threw an error without it.

* Fix tests where "April 1 2019" was changed to "April 01 2019"

Now it will show "April 1 2019" and "timeZone" will only show if its other than empty ("").

* Fix test where date was set to NaN

Now date will show correctly and will not be NaN

* fix minor test case that failed before

* fix linting in server

* Delete tests that are not valid with timeZoneEnabled removed

tests in advanced_create_comment and advanced_create_post had timeZoneEnabled
set to false as default. The tests that use this are now changed to once which are meant to have timeZoneEnabled set to true.

Adjust jest function in advanced_create_post to get correct stacktrace

* Parameter deleted

isTimeZoneEnabled is always true and therefore the parameter can be deleted

* adjust to prettier standard

---------

Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-10-30 15:31:05 -04:00
Gibson Han
af8c9ae0ca [MM-54819] Convert ./components/external_image/external_image.tsx from Class Component to Function Component (#24941) 2023-10-30 22:13:06 +05:30
Atharva Joshi
7480fcfdf7 [MM-54800] Convert "close_channel.tsx" from Class Component to Function Component (#25079)
* ISSUE#24764 | Convert close_channel/close_channel.tsx from Class Component to Function Component

* add type to tests

* remove unecasarry type assertion

* Convert localizeMessage to intl

* remove unnecassary function

* revert back from interface to type

* lint fix

* lint fix

* lint fix

* Fix failing tests
2023-10-30 16:47:31 +01:00
Harrison Healey
36a15fd22b Fix Webpack warnings (#25147)
* Remove invalid SCSS

* Silence module federation warning by not exposing prop-types
2023-10-30 09:54:33 -04:00
Harrison Healey
2d707017df Fix typos caused by applyTheme migration (#25193) 2023-10-30 09:54:15 -04:00
Kritik Jiyaviya
7ea88ff4c6 [MM-54803] Convert ./components/channel_header_dropdown/mobile_channel_header_dropdown_animation.tsx from Class to Functional component (#24949)
* Convert ./components/channel_header_dropdown/mobile_channel_header_dropdown_animation.tsx from Class to Functional component

* enhancement

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-10-30 12:18:57 +01:00
Sudhanshu Pandey
ea23423e2a [MM-54817] Convert ./components/admin_console/user_grid/user_grid_remove.tsx from Class Component to Function Component (#24912)
* chore: migrate user_grid_remove to fun. component

* Update webapp/channels/src/components/admin_console/user_grid/user_grid_remove.tsx

Co-authored-by: Daniel Espino García <larkox@gmail.com>

* chore: minor linting fix

---------

Co-authored-by: Daniel Espino García <larkox@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-10-30 12:18:18 +01:00
Erin Akarice
7ff635cfb1 [MM-54818] Convert system_permission_gate.tsx from Class Component to Function Component (#24939)
* Convert class to function for SystemPermissionGate

* refactor into arrow func and destructure props param;

* add newline to file

* indent params, remove space before colon, add semicolon

* Wrap return in empty tags; run fix-style; consolidate multiple IFs into XOR-like condition

* Update with invert=false default param for SystemPermissionGate component

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-10-30 10:41:42 +01:00
sjcode99
fb6118c107 [MM-55116] Replace usage of LocalizedIcon in 'view_user_group_list_item.tsx' with i/span tags (#25144) 2023-10-30 14:21:46 +05:30
Dipan Dhali
1b706e0202 [MM-54799] Convert ./components/widgets/menu/menu_header.tsx from Class Component to Function Component (#24847)
* Converted Menu Header to function Component

* Converted MenuHeader to Function Component an d fixed test file

* Added deprecated line

* added jsdoc above the component

* Added Suggested Changes

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-10-30 09:26:53 +01:00
Balaji K
dd1e5bc9d0 [MM-55123] Replace the usage of LocalizedIcon in 'loading_spinner.tsx' with i/span tags (#25139) 2023-10-30 10:14:01 +05:30
Syed Fazil
bce807d751 [MM-55109] Replace usage of LocalizedIcon in 'group_member_list.tsx' with i/span tags (#25178) 2023-10-29 00:34:42 +05:30