* reduce usage of Utils.localizeMessage
As we begin to transition to react-intl's `formatjs` for extraction, our custom wrappers like `Utils.localizeMessage` prevent an adoption roadblock.
This is the first in a series of PRs to begin to migrate away in favour of:
* `useIntl` when inside React functional component
* use `injectIntl` and use access the `intl` prop from class components
* use the new `getIntl`, leveraging a memoized `createIntl` and the store outside of React components
I'm pausing in this effort to get a feel from peers on both the substance of these changes and best practices in supporting them.
* prefer shallowWithIntl, renderWithContext, and local injectIntl wrapping
* revert unintentional whitespaces
* clarify getIntl, add minor unit test
* avoid triggering mmjstool
* update e2e tests
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* feat: Migrate MM-53377 regression test from Cypress to Playwright
* fix: Update mm_53377 regression test to use admin client for setup
* fix: Correct admin client usage in mm_53377 regression test
* refactor: Standardize mm_53377 Playwright test with consistent naming and imports
* fix: Mark MM-T53377 test as fixme for investigation
* Migrating mm_53377_regression_test_spec.js cypress test to playwright
* Fixing linter errors
* Addressing PR review comment
* Fixing broken test
* 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>
* Add dummy MMReduxAction type and use it in its ActionFunc types
* Use MMReduxAction in mattermost-redux reducers
I updated most reducers except for the following:
- I couldn't figure out how to type the request reducers because of
handleRequest, and it wasn't worth spending time on because it's
stable and we don't really use those.
- The typing reducers are weird because they use WS event names as
constants. They should be given their own action types separate from
the event names, and they probably shouldn't be in mattermost-redux.
There's also a few places that still use AnyAction, but those are for
helpers for individual reducers. In the future, we should probably pass
the data from the action directly into those.
* Add dummy MMAction type and use it in the web app ActionFunc types
* Use MMAction in web app reducers
* 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
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.
This removes the search input text lowercasing from the
`EmojiPickerSearch` component, where it is used as the text displayed to
the user.
Instead, filter lowercasing is done in the `getFilteredEmojis` function
to make emoji search case-insensitive.
Signed-off-by: Kuruyia <github@kuruyia.net>
* Fix scrollbar not clickable due to being covered by toaster
* Apply suggestions from code review
---------
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
Page load is one of the metrics that we track and present
to MLT. However, in its current form, it is not very
actionable because it also contains the network latency.
We split the whole metric into these parts:
startTime
|
responseStart = TTFB
|
responseEnd = TTLB
|
domInteractive = Start of processing phase
|
loadEventEnd = Load complete
This gives us better visibility into exactly
which phase in the load process is slow.
I have experimented with other metrics like
- domContentLoadedEventStart
- domContentLoadedEventEnd
- domComplete
and observed that they do not have sufficient
gaps in the timespan to have any relevance.
Additionally, I have moved TTFB from being a
web vitals metric to being tracked from the performance
metrics to remain consistent with the other navigation
metrics measured.
Lastly, I took this chance to improve some of the
validation errors that we threw to include more
context into the input that was passed and why
does it fail.
This also meant that I had to change the tests
to check for error strings rather than direct
errors which is a bad thing, but I don't think
it's worth the effort trying to have named error
variables for all of them.
https://mattermost.atlassian.net/browse/MM-61886
```release-note
NONE
```
* Fix MM-61710
* Fix test
* Make more secure the secureGetFromRecord
* Revert changes related to redux posts
* Move segureGetFromRecord
* Fix test
* Use hasOwn
* Address feedback
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Give product branding button role
The product branding only handled click events to open the switcher menu.These changes make it possible to click on the product branding using SPACE and ENTER to open/close the switcher menu.
* Use dynamic index to select timezone utc
Some timezones have similar arrays, so hard-coding the first item lead to duplicate items being selected.
* Remove 'handleManualTimezone' method
This is method is declared but not used anywhere in the code base.
* Fix lint errors
* Add 'key' prop to input array items
Missing 'key' props led to a console error when you click the timezone option to change timezones. This change fixes it.
* Revert "Give product branding button role"
This reverts commit e781d708dbedaf8af8ba3790edd8c28d8605d6b9.
* Add comment providing more context to changes
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* poc - wip
* add search files across teams
* eslint
* fix existing tests
* fix webapp style
* fix test
* add api doc
* change initial state in test
* add tests on API
* add tests on file info layer
* fix file search tags
* add rhs reducer test
* reset team selected when the RHS is suppressed
* change css to reflect UI
* fix style
* fix doc wording
* make getSearchTeam return currentTeamId when value is not set
* await is unnecessary
* revert boolean check and add test
* add comment to getSearchTeam to let dev knows it defaults to currentTeam
* remove redundant team check
* simplfy test
* fix style check
---------
Co-authored-by: Caleb Roseland <caleb@calebroseland.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
* ensure user has invite team permission in order to change setting
* add tests and handle UI
* lint fixes
* revert changes to invite section input
* update tests
* revert bad merge
---------
Co-authored-by: Mattermost Build <build@mattermost.com>