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

61 Коммитов

Автор SHA1 Сообщение Дата
Jesús Espino
4e1e7334d8 Migrate remaining javascript files in webapp/channels/src/plugins to typescript (#29386)
* feat: Migrate actions.js to TypeScript with type annotations

* feat: Migrate actions.js to TypeScript with correct action types

* feat: Add actions plugin for webapp channels

* feat: Migrate actions.js to TypeScript with type annotations

* feat: Add interactive dialog plugin for webapp channels

* feat: Migrate interactive_dialog.js to TypeScript with type definitions

* feat: Add export plugin module for webapp channels

* feat: Migrate export.js to TypeScript with type declarations

* feat: Add initial plugin index file for webapp channels

* feat: migrate plugins/index.js to TypeScript with type definitions

* test: Add export plugin test file

* feat: Migrate export.test.js to TypeScript with type assertions

* feat: Add emoji actions file to webapp channels

* feat: Migrate emoji_actions.js to TypeScript with full type support

* Fixing some issues

* Revert "feat: Migrate emoji_actions.js to TypeScript with full type support"

This reverts commit e64aabe9fc6d36938cbaa40b7acb3356729a6686.

* fixing linter errors

* Fixing CI

* Addressing pr review comments

* Apply suggestions from code review

Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>

* Fixing linter errors

* Fixing CI

---------

Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
2024-12-12 10:03:13 +01:00
Harrison Healey
e873e5c1ef Add web app versions of ActionFunc types (#29483)
* Re-export ActionFunc types from mattermost-redux from types/store

* Start using ActionFunc types from types/store instead of mattermost-redux

These are all the places where the type checker failed when I added the
web app version of ActionFunc. I'll move all the other files in a
separate commit.

* Use ActionFunc types from types/store everywhere outside mattermost-redux

* Make types/store versions of ActionFunc use web app GlobalState

* Stop passing GlobalState into ActionFunc explicitly

* Stop casting as GlobalState where it's no longer needed

* Prevent importing mattermost-redux version of ActionFunc in the rest of the app

* Fix no-restricted-imports applying incorrectly to mattermost-redux and types/store
2024-12-09 13:37:41 -05:00
David Krauser
3224e0d3a2 MM-61991 Show server hostname in about modal (#29413)
This introduces a new entry in the `Main Menu -> About` modal with the hostname of the currently connected websocket. This will be used to aid debugging issues in clustered environments by showing which node in the cluster is servicing requests for a particular websocket.

This information is only visible in self-managed instances. It will not be visible on cloud instances.
2024-12-06 10:39:36 -05:00
Harrison Healey
8533350a91 MM-61893 Replace usage of hasOwnProperty with Object.hasOwn (#29428)
* MM-61893 Replace usage of hasOwnProperty with Object.hasOwn

* Update type guard in messageToElement

* Replace a couple more hasOwnProperty calls
2024-12-03 21:53:23 +00:00
Pablo Vélez
108117ba4d ICU Fixathon - clean up React.Fragment old syntax (#29006)
* ICU Fixathon - clean up React.Fragment old syntax

* enforce use of fragment shorthand over React.Fragment

* use short version of fragment
2024-11-11 18:05:47 +01:00
Daniel Espino García
dd519629be Migrate hooks and notification actions to typescript (#28858)
* Migrate hooks and notification actions to typescript

* Remove missing files

* Fix hook types

* Fix tests
2024-10-28 17:07:11 +01:00
Nicolas Le Cam
63c97f5a6d Change HeaderIconWrapper so that it get its icon passed as a children instead of a props (#28723)
Signed-off-by: Nicolas Le Cam <niko.lecam@gmail.com>
2024-10-15 14:59:28 -04:00
Jesús Espino
5f8bdba459 Initial version of the new search interface (#27301)
* Initial version of the new search interface

* Fixing CI

* style tweaks

* tweaks to date picker in search

* change search input to button

* Addressing a lot of small problems

* Addressing current search visualization

* Fixing problem on filter autocompletion

* Adding some more fixes

* Tiny style ajustment

* Removing unnecessary slice call

* Adding search extensibility

* Improving the extensibility

* Fixing and refactoring a bit

* On clear click, clear the current search

* splitting components for simplicity

* tweaks to file ext search

* Addressing PR review comments and adding color to the extensions search icons

* Improving a bit the extension search

* Fixing CI

* Fixing some bugs

* Keep the focus on search input whenever we change the search type

* Adding SearchHint tests

* Adding search_box_type_selector tests

* Adding tests for the SearchBox component

* Adding tests for search box suggestions

* Adding SearchBoxInput tests

* Splitting extension suggestion component and provider

* ExtensionSuggestion tests

* Removing unneeded property

* Adding SearchBoxhints tests

* Adding tests for NewSearch component

* Adding tests for the extension suggestion provider

* Fixing linter errors

* Fixing tests

* Fixing linter errors

* Fixing linter errors

* Adding license check for plugins

* Addressing PR review comments

* Addressing PR review comments

* Addressing PR review comments

* Fixing tests

* Fixing some cypress tests

* More work around cypress tests for search

* Some accessibility changes

* more work on cypress tests

* fixing more cypress tests

* Fixing linter errors

* Fixing tests

* Fixing ctrl+f6 switching

* Fixing scrolling on small windows wheneve you are searching

* Improve editing in the middle of the search text

* Addressing some PR review comments

* Addressing some PR review comments

* Addressing some PR review comments

* Addressing some PR review comments

* Fixing tests and linter errors

* Fixingls tests and linter errors

* Fix type checks

* Clearer logic to render plugin or builtin suggestion

* Addressing PR review changes

* Addressing PR review changes

* Using selectors for plugin components

* Changing uppercase to lowercase on lists of components

* Updating tests

* Updating snapshots

* minor css tweaks

* minor css tweak

* Adding the search type and the clear button

* Fixing problem with the filetype selector

* fixing linter errors

* Some fixes

* More linter fixes

* Reverting prettier auto-formating

* Fixing CI

* Fixing CI

* Fixing chrome problem

* Fixing CI

* Addressing PR review comments

---------

Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
Co-authored-by: Christopher Speller <crspeller@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2024-10-14 12:56:35 +02:00
Claudio Costa
e5842e67a8 [MM-51514] Custom user settings (#27535)
* Custom user settings

* Implement error boundary, fix validation

* Extraction tests

* Tests

* Bring back refresh option for failed pluggable

* [MM-51514] Allow plugins to open user settings modal (#27742)

* Allow plugins to open user settings modal

* [MM-51514] Improvements to custom plugin user settings (#27754)

* Allow compass icon to be used

* Pass props to custom plugin settings

* Export react-select

* Revert "Export react-select"

This reverts commit 6b026c4eb789d298b721494a70e0e860a704d428.

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-08-13 08:49:12 +02:00
Daniel Espino García
6027c850bd MM-59881 Bubble submit result and expose to plugins (#27766)
Automatic Merge
2024-08-07 22:27:50 +03:00
Brandon Shen
1a0e25e5e9 [MM-59897] Migrate tooltips of 'plugins/channel_header_plug/channel_header_plug.tsx' to WithTooltip (#27807) 2024-07-30 06:22:01 +00:00
Claudio Costa
be94c47607 [MM-57418] Implement support for defining plugin settings sections (#27654)
* Implement support for defining plugin settings sections

* Implement custom plugin configuration sections

* Tests

* Update test

* Improvements
2024-07-17 18:24:33 +02:00
M-ZubairAhmed
e2abac5486 [MM-58445] Try deferring plugins scripts loading (#27179) 2024-06-09 07:16:14 +00:00
Harrison Healey
527fe4a654 Update ChannelHeaderPlug tests to not use snapshots and ensure its more accessible (#26784)
* Update ChannelHeaderPlug tests to not use snapshots

* Change HeaderIconWrapper to always set aria-label based off tooltip

* Re-add shortcut to Recent Mentions button

* Remove unneeded div
2024-06-03 11:43:25 -04:00
Umar Abid
a1ed780a86 [MM-55327]: Convert /components/permissions_gates/team_permission_gate/team_permission_gate.tsx from Class Component to Function Component (#25395)
* fix: convert to func component

* fix: update failing test snapshots

* Handle tests better

* Standarize all gates

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Daniel Espino García <larkox@gmail.com>
2024-05-06 12:06:24 +02:00
Daniel Espino García
539daee634 Fix types so the store can return undefined channels (#26393)
* Fix types so the store can return undefined channels

* Address feedback

* Revert gm change

* Fix lint

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-05-06 12:04:36 +02:00
Devin Binnie
60c15c821f More notification metrics fixes (#26889)
* Explicitly have the client tell the server when it should expect an ACK

* Don't count missing profile errors for your own posts, added comment

* Fix test

* Make postedAck a parameter in WebSocketClient

* Snapshot fixes

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-04-25 15:07:12 -04:00
Nick Misasi
437f90e184 [CLD-7421][CLD-7420] Deprecate Self Serve: First Pass (#26668)
* Deprecate Self Serve: First Pass

* Fix ci

* Fix more ci

* Remmove outdated server tests

* Fix a missed spot opening purchase modal in Self Hosted

* Fix i18n

* Clean up some more server code, fix webapp test

* Fix alignment of button

* Fix linter

* Fix i18n server side

* Add back translation

* Remove client functions

* Put back client functions

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-04-23 14:25:37 -04:00
Harrison Healey
22d72b6df8 Remove access to global state from some files (#26752)
* admin_console/license_settings/trial_banner

* invitation_modal and associated utils

* overlay trigger

* Change TrialBanner to not use makeGetCategory

* Address feedback

* Fixing unit tests D:

* Address further feedback

* Fix one last test
2024-04-22 14:53:42 -04:00
Matthew Birtch
7429ddaf04 MM-37809 Theming tweaks (#26289)
* tweaked dark themes and quartz theme

* refinements to themes

* tweaked denim global header color

* updates to quartz and sapphire themes

* tweaked quartz theme

* tweaks to indigo theme

* minor tweaks to themes

* update snapshots

* updated hex colors to consistent casing and updated snapshots
2024-04-22 14:07:59 -04:00
Asaad Mahmood
ecb09de6c7 MM-53814 - Updating contrast for accessibility (#24381)
* Updating contrast for accessiblity

* Updating accessbility

* Updating accessiblity for icons

* Updating header icons

* Updating text opacity

* Updating icons and text

* Updating sidebar left

* Upadating icon in system console

* Updating global header

* Updating channel list

* Updating tests and fixing conflicts

* Updating filter css

* Updating css

* Updating epehemeral message contrast

* Updating icon with 64 opacity

* Updating test

* Updating confirm license removal csss

* Updating unintended files

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-02-21 15:54:18 +05:00
Christopher Speller
5758f234e5 Allow plugins to specify all props for create comment. (#26152)
* Allow plugins to specificy all props for create comment.

* Types
2024-02-14 07:46:12 -08:00
Harrison Healey
daad3efd92 Rename NewActionFunc* back to ActionFunc* (#26007) 2024-02-05 12:39:35 -05:00
Harrison Healey
8e165c7685 Improve Redux types part 5/Replace DispatchFunc (#26004)
* Remove non-functional code from Login component

* Remove remaining usage of useDispatch<DispatchFunc>

* Remove usage of DispatchFunc from actions/file_actions

* actions/global_actions

* Remove usage of DispatchFunc from actions/marketplace

* Remove DispatchFunc from actions/post_actions

* Remove DispatchFunc from actions/storage

* Remove DispatchFunc from actions/user_actions

* Remove DispatchFunc from actions/views/channel

* Remove DispatchFunc from actions/views/channel_sidebar

* Remove DispatchFunc from actions/views/create_comment

* Remove DispatchFunc from actions/views/lhs.ts

* Remove DispatchFunc from actions/views/rhs.ts

* Remove DispatchFunc from actions/views/onboarding_tasks

* Remove DispatchFunc from actions/views/root

* Remove DispatchFunc from components/logged_in

* Remove DispatchFunc from components/msg_typing

* Remove DispatchFunc from components/permalink_view

* Remove DispatchFunc from components/suggestion

* Remove DispatchFunc from mattermost-redux/actions/posts

* Remove DispatchFunc from mattermost-redux/actions/roles

* Remove DispatchFunc from mattermost-redux/actions/threads

* Remove DispatchFunc from mattermost-redux/actions/timezone

* Remove DispatchFunc from plugins/products

* Make DispatchFunc into Dispatch

* Fix how dispatch is mocked in test for toggleSideBarRightMenuAction
2024-01-24 10:28:38 -05:00
Harrison Healey
978f335925 Improve Redux types part 1 (#25872)
* Always dispatch thunk actions instead of calling them

* Properly dispatch actions in SwitchChannelProvider

* Fix tests relying on bad types

* Properly pass actions into ManageTokens

* Make other logic changes to support new types

* Do the big type migrations without any logic changes

* Revert "Properly dispatch actions in SwitchChannelProvider"

This reverts commit 28c8c7af2ef324c6814087a81baca66c60477daa.

* Revert "Revert "Properly dispatch actions in SwitchChannelProvider""

This reverts commit 47115c5217ae90547040e7b7de32979a33f0845b.
2024-01-10 09:47:05 -05:00
Christopher Speller
433a644db7 Export permalink preview component for plugins. (#25609)
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-12-14 08:43:27 -08:00
Daniel Espino García
acd413ef69 Add plugin user settings (#25517)
* Add plugin user settings

* Feedback and UI improvements

* Extract the plugin configuration instead of just validating it

* Fix lint

* Fix lint

* Divide between settings and sections

* i18n-extract

* Adjust icon location

* Add tests

* Improve documentation

* Force plugin id

* Fix test

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-12-14 11:30:31 +01:00
Rohit Chaudhari
109b074d92 [MM-55329] Convert ./plugins/test/post_type.test.jsx from Class Component to Function Component (#25487) 2023-12-06 07:36:04 +00:00
Devin Binnie
d62122b884 [MM-55153] Consolidate Desktop App API, use new contextBridge endpoints when available (#25438)
* Create Desktop API module, migrate message passing code

* Changes to use new API

* Use Desktop API to notify when mentions/unreads/expired changes

* Expose Desktop App module to plugins

* Fix lint

* PR feedback

* Fixed an issue where I forgot to check if the method exists first

* Slight API changes

* Fix package

* Convert all to class, add comments, small reworks for PR feedback
2023-12-04 14:09:46 -05:00
Umar Abid
70e3a01f2d [GH-25022]: Add Academy links to Teams training (#25150)
* feat: add link to teams dropdown menu

* fix: refactor link to separate component and update styles

* feat: add academy link to team's join page and settings modal

* fix: i18n and update test snapshots

* fix link styles & update test snapshot

* add state for unit tests

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>
2023-11-22 13:36:52 -08:00
Nicolas Le Cam
88520e6740 MM-54814: Convert ./components/widgets/menu/menu_group.tsx from Class Component to Function Component (#25183)
* MM-54814: Convert ./components/widgets/menu/menu_group.tsx from Class Component to Function Component

Signed-off-by: Nicolas Le Cam <niko.lecam@gmail.com>

* review: Don't rerender component if props are unchanged

Signed-off-by: Nicolas Le Cam <niko.lecam@gmail.com>

* Fix tests

Signed-off-by: Nicolas Le Cam <niko.lecam@gmail.com>

---------

Signed-off-by: Nicolas Le Cam <niko.lecam@gmail.com>
2023-11-21 11:25:54 +01:00
Ashish Dhama
a9a879d00d MM-40414: Add empty state icons (#25282)
Automatic Merge
2023-11-20 06:00:14 +02:00
M-ZubairAhmed
9ac389f506 [MM-53102] Add support for multi-word highlights without notifications in web (#24050)
- Adds a new section under settings/notifications for adding custom multi-word keywords that get highlighted without notification
- Adds a new classname for highlighting words although the styling is the same as mentions highlights
- Added a few components to the ReduxFromProps pattern
- Adds supported type for the hook of PluginComponent type
- Add upsell for highlight without notification
- Moved 'setting_item.tsx' to the components folder
- Improved prop names and function structure for setting_item, setting_item_max and setting_item_min
- Moved 'toggle_modal_button.tsx' to the components folder
- Removed t and utility messages from a few components
- Fixed bug where the tooltip was not getting rendered on restrictedButtons
- Improved the mobile view of the settings modal
- Adds E2E for the feature
2023-11-11 19:33:28 +05:30
Jesús Espino
f8e8eca985 Expose components needed for the ai plugin new interface (#24972)
* Export thread components

* Exporting AdvancedCreateComment

* Expose components needed for the ai plugin new interface

* Exporting the placeholder for the plugin CreatePost component, and simplify the export

* Fixing linter errors

* Fixing type errors

* Reverting typescript related changes

* Cheating typescript to keep the changes as minimal as possible

* Fix linter errors
2023-10-24 10:35:20 +02:00
Balaji K
2b2743d9cb #24774 Converted ./plugins/rhs_plugin/rhs_plugin.tsx to Function Component (#24802)
* #24774 Converted ./plugins/rhs_plugin/rhs_plugin.tsx to Function Component

* Fixed the lint errors and removed explicit FC type

* Added memo to make the functional component pure.
2023-10-17 10:42:36 +02:00
Jesús Espino
bb4aa764bc Migrating some files from javascript to typescript (#24663)
* Migrating some files to typescript

* Some other files migrated

* Migrating more javascript to typescript

* Migrating more javascript to typescript

* Fixing types

* Fixing linter errors

* Fixing some imports

* Fixing linter errors

* Renaming the snapshots

* Addressing PR review comments
2023-10-10 16:22:11 +02:00
Christopher Poile
4022d2e762 MM-54443 - Fix: registerDesktopNotificationHook is missing (#23884) (#24497)
(cherry picked from commit 46a659e06d)
2023-09-08 08:16:26 -04:00
Daniel Espino García
d13429aa92 Enable import order (#24091)
* Enable import order

* Add new order groups and add consistent-type-imports

* Remove types group, move react to top and fix issues

* Add store and reducers to the redux group and move imports from types folder to the end

* Fix tsc

* Remove react rule

* Fix test

* Fix eslint disable
2023-09-06 12:51:55 +02:00
Jesús Espino
8c8b8b7e79 Add code block actions plugin extensibility (#24348)
* Add code block actions plugin extensibility

* Fixing tests

* Fixing linter errors

* Move Plugin components left of label

---------

Co-authored-by: Christopher Speller <crspeller@gmail.com>
2023-08-29 14:51:37 -07:00
Jesús Espino
4145fd2f4e Add support for actions in the unreads bar from plugins (#24265)
* Add support for actions in the unreads bar from plugins

* Adding channelId as parameter

* Fixing linter errors

* Changing the extensibility to the new messages separator

* Making everything work with the plugin

* Fixing linter and types errors

* Fixing unit test

* Tiny improvement in the styles

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-08-24 12:20:29 +02:00
Harrison Healey
1f95a8f52b MM-50953 Post textbox cleanup (#23971)
* Remove unused code around scrollbarWidth

* MM-50953 Remove unused code for popover at mentions

* Add tests for messageHtmlToComponent wrapper
2023-08-10 15:22:48 -04:00
Jesús Espino
e1c6ae7d85 Adding PostAction plugin hook (#24102)
* Adding PostAction plugin hook

* Adding missing doc string

* WIP

* Simplifying it

* Adding support for selected text

* fixing linter errors

* Adding support for the plugin editor action in the thread view

* Fixing ci check-types

* Addressing PR review comments

* Fix linter error in CI

* Fixing tests
2023-08-08 11:36:37 -07:00
Saturnino Abril
93a2c3281a MM-53813: Fix(accessibility): on channels page (#24122)
* fix(accessibility): on channels page

* fix lint and update dynamic-virtualized-list

* fix snapshot and update per feedback

* fix e2e tests

* fix test

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-07-28 11:17:11 -04:00
Harshil Sharma
26617fcbdc Remove insights (#23952)
* removed server side

* Updated store layer

* unused import

* Updated autogenerated code template

* Updated tests

* lint fix

* unused translations

* webapp side

* Updated i18n

* lint fix:

* type fix

* Updated snapshots

* Removed insights from API specs

* updated e2e

* Updated e2e tests

* Updated e2e tests

* Removed insights tests

* Removed Insights as possible channel to load in sidebar from test

* Removed more insights tests

* More e2e fixed

* More cleanup

* Lint

* More cleanup in client4 and boards api

* More cleanup

* Fixes

* lint fix

---------

Co-authored-by: maria.nunez <maria.nunez@mattermost.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-07-25 12:34:38 +05:30
Miguel de la Cruz
150c6e7aef Remove boards product references (#23855)
Automatic Merge
2023-07-18 15:17:29 +03:00
Christopher Poile
46a659e06d MM-53340 - Create registerDesktopNotificationHook for plugins, e.g. Calls (#23884)
* calls will notify in GM/DM channels for call started posts

* fix types

* add registerDesktopNotificationHook

* remove callsWillNotify

* cleanup unused types

* use an args object to shorten params

* add CUSTOM_CALLS_RECORDING to constants
2023-07-11 22:46:59 -04:00
Pablo Andrés Vélez Vidal
887ba95cc1 MM-53088 - remove autoshow linked board (#23783)
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-06-26 14:13:14 +02:00
Christopher Poile
4e64590564 MM-52857 - Expose webapp and desktop notifications to plugins (#23779)
* prevent media keys from controlling calls ring sounds

* stop ring on pause

* expose notifyMe as sendDesktopNotificationToMe

* Revert "stop ring on pause"

This reverts commit 83d62ad02db9acc7684a1f352d798ffc74e665d8.

* Revert "prevent media keys from controlling calls ring sounds"

This reverts commit 6d4ff63936674034adda84fc258bcafe71734cab.

* move into WebappUtils

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-06-23 14:29:59 -04:00
Miguel de la Cruz
5d66883b04 Fixes CI (#23753)
* Fixes CI

* Fix client jest dependency
2023-06-15 09:45:54 +02:00
Miguel de la Cruz
44a99d1736 Move playbooks to plugin (#23732)
* Remove build references

* Remove playbooks webapp and server, and add the prepackaged plugin

* Remove translations

* Add ProductSettings to the playwright type

* Restore playbooks as a prepackaged plugin for cypress e2e tests
2023-06-14 23:33:26 +02:00