* [MM-55331] Convert `./components/channel_header_dropdown/menu_items/view_pinned_posts/view_pinned_posts.tsx` from Class Component to Function Component
* refactor: Implement useCallback to avoid unwanted renders
* refactor: import mouse event type from react
* refactor: deprecate localizeMessage with intl
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* migrated session_length_settings, settings_group to typescript
* migrated cluster_table_container to typescript
* resolved linter and non null assertions
* fixed settings_group import
* fixed cluster_table_container import
* fixed CI CD errors
* fixed names and added in built type for license
* fixed consitency and mouse event
* fixed type annotations and imports
* added search by @
* handle case by replacing
* fixed implementation and added tests
* new implementation to search with @
* fix space
* fixed comments
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Initial comit for ip filtering service implementation
* Add audit logs for IP Filters
* start of webapp work
* Stashing
* Updates based on Agniva's feedback around service vs einterface
* Updates completed
* Commit before refactoring, everything's working
* First pass of cleanup complete, front-end tests added
* actually add files
* Updates to some translation strings, running i18n-extract
* Lock everything behind a feature flag
* Fix tests, try to fix some linter stuff
* Fixed linter for JS, on to scss
* Fixed linter for scss
* Fix linter
* More fixes for pipeline
* Support for IPV6
* Remove tsx file that was removed in masteR
* Revert package.json and package-lock.json to master, add cidr-regex dep into channels/package.json
* Another commit to force fix Github
* Fixes around IPV6. Some suggestions from Matt re: UX review. Fixing pipelines for tests and types on new cidr-regex package
* Changes to address Matt's feedback
* A few more changes for clean up
* Add support for permissions
* Fix vet for OpenAPI spec
* Actually add the yaml file for openapi
* Add permission migration to allow support for IP Filtering
* Fix tests
* Final fixes from Matt
* Remove cancel button from page, update link outs to documentation
* Update test to account for removed cancel button
* Adjustments based on feedback from Harrison
* More fixes from PR feedback
* Add a t to fix translations that doesn't seem to be breaking anyone else?
* More fix
* updates for PR feedback
* Fix linter
* Fix types
* Now fix the linter again
* Add back tests because Harrison was able to get them running
* Adjustments for PR feedback
* Remove admin_definition.jsx
* Fix linter
* [CLD-6453] IP Filtering notification email for sysadmins (#25224)
* Initial commit for IP filtering alert email
* Updates to style for email, addition of ip_filtering email:
* Fix pipelines
* Adjustments from Matt's feedback
* Padding changes
* template diff (#25249)
Co-authored-by: Gabe Jackson <3694686+gabrieljackson@users.noreply.github.com>
* Fix hardcoded true, remove bool return value
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Gabe Jackson <3694686+gabrieljackson@users.noreply.github.com>
* Lock feature behind enterprise license. Drop cidr-regex in favour of ipaddr.js dependency. Refactor isIpAddressWithinRanges to use ipaddr.js
* Add a couple server tests
* fix linter
* Fix types from merge conflicts
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Gabe Jackson <3694686+gabrieljackson@users.noreply.github.com>
* [MM-55334] Migrate `./components/admin_console/blockable_link/blockable_link.tsx` from Class Component to Function Component
* refactor: use prop destructuring
* fix: Implement useCallback to avoid unwanted renders
* refactor: import mouse event type from react
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* [MM-55332] Convert `./components/permissions_gates/channel_permission_gate/channel_permission_gate.tsx` from Class Component to Function Component
* refactor: unify the if conditions
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Move notification preferences modal to new UI
* fix lint issue
* fix i18n
* fix unit test
* fix type issue and lint errors
* fix test case
* move common components to widget modals dir
* fix css issue
* feedback changes
* fix lint and i18n issues
* more feedback changes
* fix issue with mobile notification ui
* fix test
* clean up
* remove name
* fix test
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
Load tests show that channelstore.GetMember and
channelstore.GetMembersForUser are among the chief
queries that take up CPU in the DB.
In this PR, we attempt some strategic optimizations to
reduce/optimize calls to channelstore.GetMember
1. Optimize `(a *App) HasPermissionToChannel`
We replace GetChannelMember with GetAllChannelMembersForUser
because it's cache backed. So although it gets more data,
it does not hit the DB and saves some latency.
2. Optimize getPostsForChannelAroundLastUnread
We repace getChannelMember with getChannelMemberOnly
which is a lite version of the store call which queries
just the ChannelMembers table. This is because
in the app layer, we just use the LastViewedAt attribute.
Therefore, there is no reason to join with 5 tables when
a single table can do the job.
3. Optimize publishWebsocketEventForPermalinkPost
We use GetAllChannelMembersById instead of GetChannelMembersPage
which again joins with a lot of other tables.
4. Optimize countMentionsFromPost
Again, we replace GetChannelMember which is a costly call joining
multiple tables, with GetAllChannelMembersNotifyPropsForChannel
which is cache-backed and gives us just what we need in the app
layer - notify props.
```release-note
Make small optimizations in several DB calls:
- App.HasPermissionToChannel
- getPostsForChannelAroundLastUnread
- publishWebsocketEventForPermalinkPost
- countMentionsFromPost
```
https://mattermost.atlassian.net/browse/MM-55295
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
- 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
* Convert status_icon_new.tsx to functional component
* run the command run npm run fix and npm run test -- -u
* type check error fixed
* revised the changes
* Unintended changes revised.
* Revised changes
* map moved outside of component
---------
Co-authored-by: Mattermost Build <build@mattermost.com>