* Fix forwardRef propTypes console error
The console error that was fixed by this is:
"Warning: forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"
* Fix function component ref console error
This fixes the following error:
Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React. forwardRef ()?
* Convert EmojiPickerOverlay to functional component
* Convert EmojiPickerTabs to functional component
* Extract AddReactionButton from ReactionList
This is so that I can make part of it functional without rewriting
the whole thing.
* Convert PostReaction to functional component
* Add general version of useEmojiPicker and use for AddReactionButton
* Rename returned showEmojiPicker to emojiPickerOpen
* Add test for AddReactionButton
* Move showEmojiPicker state out of useEmojiPicker
I hoped to avoid this by just having the hook return the
show state, but unfortunately, too many of the existing places
rely on controlling the state themselves
* Change PostReaction to use useEmojiPicker
I ran into some trouble with this getting the hover state to properly
disappear from the PostComponent when clicking out of the picker. That
seems to be a downside of the browser's mouseenter/mouseleave not
handling cases where the component is covered up. It doesn't work 100%,
but it works at least as well as master by disabling pointer-events to
the FloatingOverlay (which I also think we could probably remove since
it's supposed to just be for darkening the backdrop behind the picker,
but it ended up being helpful for setting the z-index on mobile).
* Change AdvancedTextEditor to use new useEmojiPicker
I renamed its version of useEmojiPicker to useEditorEmojiPicker since it
still contains information about how to position the emoji or gifs in
the post text.
* Convert EditPost to use useEmojiPicker
* Convert CreateModalNameInput to use useEmoijPicker
* Convert CustomStatusModal to use useEmojiPicker
* Remove EmojiPickerOverlay and cleanup related code
* Remove unneeded translation string
* asdf Attempting to fix E2E test
* Improve how useEmojiPicker positions itself to stay on screen more
* Add offset between Emoji Picker and reference
* Add horizontallyWithin middleware and use it to right-align the emoji picker in the post textbox
We add a new config setting to allow the admin to set a fixed
list of userIDs to track for all client side webapp metrics.
This gives the admin to get a deeper look at how the application
is behaving for a single user.
A new section in the system console is also added for the user
to edit this setting from the UI.
https://mattermost.atlassian.net/browse/MM-61888
```release-note
A new config setting MetricsSettings.ClientSideUserIds is added
where you can set the user ids you want to track for client side webapp
metrics.
```
* fix lint errors
```release-note
NONE
```
* fixing tests
```release-note
NONE
```
* feat: Add initial store configuration for webapp channels
* refactor: Convert store/index.js to TypeScript with type definitions
* test: Add initial test file for store index
* refactor: Convert index.test.js to TypeScript with type annotations
* Removing old files
* Applying linter fixes
* Fixing some of the types errors
* fix: Type mock implementation of getState in global_actions.test.ts
* test: Add missing GlobalState import in global_actions.test.ts
* fix: Resolve TypeScript mock implementation error in global_actions.test.ts
* Some fixes
* Address CI problems
* Installing zen-observable types
* Addressing PR review comment
* Addressing PR review comment
* Addressing PR review comment
* Addressing PR review comment
* Addressing PR review comment
* Simpliying things
* Fixing CI
* Fixing types
* Updates to cloud specific imagery in system console
* Revert something from images
* Fix linter
* Updates from PR feedback
* Fix lint
* Add svg
* Lint fixes, update another SVG
* change to pre-existing already-themed version of svg
* change the folder of the file
* add file
* Adjust styling
* Replace key-mirror with mattermost-redux/utils/key_mirror
At some point, we made our own version for mattermost-redux with proper type definitions
but we seem to have forgotten to use that everywhere in the web app.
* Remove Rudder reference from mattermost-redux
* Remove Giphy API from mattermost-redux
* Remove mattermost-webapp refernces from Client and Types packages
* Create platform/mattermost-redux without moving its source files
* Don't build mattermost-redux automatically
* Copy changes to package.json from platform/mattermost-redux to other packages
The changes to the typesVersions and exports fields are to make it
easier for tooling to know to make it so that importing a folder imports
the index file inside that folder since that's not standard to all
CommonJS packages.
The added type field is just a good pracice.
* Explicitly type re-exported selectors
For some reason, the types generated by the previous version of this didn't work
when mattermost-redux was built as a standalone package. Explicitly typing these
is a bit more verbose, but it fixes things.
* Fix import loop in selectors introduced by last commit
* Update package versions to 10.6.0
* Add explicit dependencies to mattermost-redux package
* Remove check and run scripts from mattermost-redux package
* Revert changes to NOTICE.txt
* [MM-62113] Force reload of team unreads when following/unfollowing a thread
* E2E test
* add test key
---------
Co-authored-by: yasserfaraazkhan <attitude3cena.yf@gmail.com>
* Prompt Team Admin before joining private channel
* fix and implement prompt when team admin joins via channel link
* update premission check and unit tests
* remove comment
* clean up some code
* update check to fix E2E tests
* [MM-62107] Remove the need to have the currently selected thread in the Unreads pane
* Remove selected thread from Followed Threads as well if it's not followed
---------
Co-authored-by: Caleb Roseland <caleb@calebroseland.com>
* Update Client4.createPost type
Creating a post does not need all fields of `Post` populated, adding
jsut the `channel_id` and `message` or `props` works fine.
* Use PartialExcept
* Adapt create types to api/v4/source/*.yml types
* MM-61641: Update post options to use semantic list elements
* MM-61641: Fix lint
* Apply suggestions from code review
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
* feat: Add profile loading for group channels in search autocomplete
* refactor: Use getChannelNameForSearchShortcut for channel name formatting
* refactor: Improve channel search term generation logic
* refactor: Simplify search channel provider logic and improve code readability
* fix: Improve channel search shortcut name handling with fallback
* refactor: Avoid overriding channels parameter in search channel provider
* refactor: Revert variable names to original style in search channel provider
* feat: Add getChannelNameForSearchShortcut selector for channel name retrieval
* refactor: Extract common channel name search logic into helper function
* fix text overflowing from search bar
* test: Add tests for completeDirectGroupInfo function
* test: Add type assertion for UsersState in channel_utils test
* test: add test case for completeDirectGroupInfo with omitCurrentUser false
* improve name composition for channels in search
* eslint
* lint
---------
Co-authored-by: Mattermost Build <build@mattermost.com>