* 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>
* update session roles from user roles.
* update so user is not retrieved again
* return error, rather than log warning
* Update session.go
Fix bad merge
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* feat: add log warn when app is run as root user
* Modify warning message
* Move warning message condition to L415
* move check to cmd/mattermost/main.go
* Update server/channels/app/server.go
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
* Moved checkForRootUser to root.go
* format root.go
* remove unnecessary space
---------
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
Marshalling a json.RawMessage is not zero overhead. Instead,
it compacts the raw message which starts to have an overhead
at scale.
https://github.com/golang/go/issues/33422
Since we have full control over the message constructed, we
can simply write the byte slice into the network stream.
This gives considerable performance boost.
```
goos: linux
goarch: amd64
pkg: github.com/mattermost/mattermost/server/public/model
cpu: Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz
│ old.txt │ new_2.txt │
│ sec/op │ sec/op vs base │
EncodeJSON-8 1640.5n ± 2% 289.6n ± 1% -82.35% (p=0.000 n=10)
│ old.txt │ new_2.txt │
│ B/op │ B/op vs base │
EncodeJSON-8 528.0 ± 0% 503.0 ± 0% -4.73% (p=0.000 n=10)
│ old.txt │ new_2.txt │
│ allocs/op │ allocs/op vs base │
EncodeJSON-8 5.000 ± 0% 4.000 ± 0% -20.00% (p=0.000 n=10)
```
P.S. No concerns over changing the model API because we are
still using 0.x
https://mattermost.atlassian.net/browse/MM-54998
```release-note
Improve websocket event marshalling performance
```
* Rework some of PR24647
* Store MM_LICENSE to .env.server file
* Remove legacy network setup
* Fixes, generate docker-compose and env files in one place
* Simplify templating mechanism for server.yml
* Fix race condition for dashboard start
* Fix websockets for local debugging
* Fix: make webhook-interaction work again
* Simplify and fix dashboard&cloud configuration, formatting fix
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Make use of GenericStoreResult in channels/app/channel.go
* Make use of GenericStoreResult in channels/app/channel.go
* Make use of GenericStoreResult in channels/app/channel.go
* Make use of GenericStoreResult in channels/app/channel.go
* Make use of GenericStoreResult in channels/app/channel.go
* Make use of GenericStoreResult in channels/app/channel.go
* Make use of GenericStoreResult in channels/app/channel.go
---------
Co-authored-by: fazil-syed <fazil@Gojo>
Co-authored-by: Mattermost Build <build@mattermost.com>