* add shard and log heap usage in jest
* separate each type of tests
* fix code coverage and indicate heap usage to all tests
* exercise each 10 times, change channels shard to 4
* revert to single run, fix npm cache and merge/report code coverage with nyc
* Unify version of Jest in subpackages
* Upgrade @types/jest
* Update jest and jest-watch-typeahead
* Add nock and node-fetch to client package
* Update snapshots for new version of Jest
* Replace renamed test assertions
* Update more snapshots
* Update type definitions to fix dependency install issues
* Re-add --coverage to CI tests
* Revert "Re-add --coverage to CI tests"
This reverts commit b59a66eb09.
* Update snapshots in components package
* Remove nock.disableNetConnect from Client4 tests
* Standardize how we mock fetch in different test environments
* Add --forceExit and --verbose to test-ci
* Try --no-watchAll?
* MM-65787 - notify admin of risk when modifying rules
* apply feedback from ux; adjust modal style and block ack btn by default
* remove unnecessary savePreferences logic and fix linters
* remove api and handle in client side due to logic simplification
* remove unused import and console.error from generic modal
* show the activity warning when auto-add is disabled and rules are removed
* clean up leftover activity api usage
* adjust styling for the activity warning modal checkbox
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Dependencies: Remove unused dependency on @mattermost/dynamic-virtualized-list
* Update Components package to React 18 and new version of RTL
* Upgrade React, React Redux, RTL, and associated libraries
I had to upgrade React Redux for the new version of React, and that
brought with it new versions of associated packges (Redux, Reselect,
Redux Thunk). A few other libraries needed to be updated or have their
explicit dependencies overridden for the new version of Redux as well.
To note for future dependency upgrades, redux-mock-store is deprecated,
and redux-batched-actions and redux-persist are inactive.
For RTL:
1. `@testing-library/react-hooks` has been rolled into
`@testing-library/react`, and its interface has changed.
2. I had to make some changes to get TS to use the types for the new
methods added to `expect`.
* Dependencies: Fix dom-accessibility-api patch from #33553
* Tests: Fix tests that use jest.spyOn with react-redux
* Functional: Remove usage of defaultProps on function components
* Tests: Remove usage of react-dom/test-utils
* Functional: Rename conflicting context prop on Apps components
* Tests: Always await on userEvent calls
* Functional: Patch react-overlays to fix pressing escape in unit tests
I did something similar in React Bootstrap a few weeks ago.
See https://github.com/mattermost/react-bootstrap/pull/5
* Tests: Prevent tests from fetching from real URLs
* Tests: Update snapshots changed by upgrading react-redux and styled-components
* Functional: Stop passing deprecated pure parameter to connect
* Tests: Change how we intercept console errors in tests to preserve stack traces
* Tests: Fix incorrect usage of act in Enzyme tests
These tests are a mix of:
1. Not calling act when performing something that will update the DOM (like clicking on a button or invoking a method) which either caused warnings or failed snapshots as changes weren't visible.
2. Calling act in weird ways (such as wrapping mount in an async act) which caused Enzyme to not function
Some of these changes just silence warnings, but most of them are required to make the test even run
* Tests: Fix incorrect usage of act in RTL tests
* Tests: Fix a few minor issues in tests
* Functional: Add note for why we're not using ReactDOM.createRoot
* Functional: Fix focus trap infinite recursion in test
* Types: Replace removed React.SFC
* Types: Fix type of functions in FormattedMessage values prop
* Functional: Fix DropdownInputHybrid placeholder
* Types: Patch type definitions of react-batched-actions
* Types: Fix mattermost-redux build failing due to type check in Redux Dev Tools
* Dependencies: Add type definitions for react-is
* Types: Update types around ReactNode and ReactElement
React's gotten more strict with these, so we need to be more careful with what
we return from a render method. In some of these places, we also misused some
types, so hopefully I've sorted those out.
* Types: Explicitly added types to all instances of useCallback
* Types/Tests: Update typing of Redux actions and hooks
useDispatch is sort of stricter now, but it doesn't seem to rely on the global type of `Dispatch` any more, so I ended up having to add an extra overload to make that work.
* Tests: Update new tests in useChannelSystemPolicies for new version of RTL
These were added on master after I updated RTL on the branch
* Tests: Update action used to test initial store state
* Functional: Remove remnants of code for hot reloading Redux store
* Types/Tests: Update typing around React Router
* Types/Functional: Update typing involving the FormattedMessage values prop
There's a couple functional changes to ensure that the value passed is either a valid string or Date
* Types: Misc fixes
* Functional: Don't pass unused props to ChannelHeader
* Functional: Ensure plugin setting text is rendered before passing to Setting component
The previous version might've allowed MessageDescriptors to be passed unformatted
into the Setting component (which would then be rendered in the DOM). As best as
I can tell, we never actually did that, so this shouldn't change anything in practice.
* Tests: Make tests for identifyElementRegion more reliable
* Tests: Update recent tests for new version of RTL
* E2E: Make editLastPostWithNewMessage more reliable
* Downgrade React to 18.2.0 and manually dedupe React versions
18.2.0 and 18.3.0 are nearly identical to one another, except 18.3.x includes
warnings when using any API that will be removed in React 19. I don't want to
flood the console and test logs with warnings for things we're not addressing
for the time being.
Also, they didn't export act from React itself until 18.3.1 for some reason
(despite the old import path printing a warning), so I needed to revert the
changes to its import path.
To get this all to work, for some reason, I had to manually delete all the
entries for `react` and `react-dom` from the lockfile to get NPM to use a
single version of React and ReactDOM everywhere. I did discover `npm dedupe`
in the process, but that didn't solve this problem where I was trying to
consistently downgrade everything.
* Revert changes to notice file build tool to speed up CI
* Add explicit version of types/scheduler
The version of `@types/react` that we use says it works with any version of
`@types/scheduler` which causes NPM to install a newer version of it which
is missing a file of types that it needs.
* Update new test to await on userEvent
* Fix Playwright test that relied on autogenerated class name
* Tests: Disable test for identifyElementRegion
* Functional: Change DynamicVirtualizedList ListItem to use useLayoutEffect
In a previous commit, I changed the RHS to use the monorepo
DynamicVirtualizedList instead of the old version that lived in its own repo.
That caused the RHS to no longer scroll to the bottom on initial mount or be
able to render additional pages (even though the posts are loaded). This seems
like it has to do with the improved size calculation that Zubair made because
that's the main difference in the monorepo version of that component.
For some reason I don't entirely understand, changing to useLayoutEffect seems
to fix that. I think that's because the old measurement code is written as a
class component, and useLayoutEffect fires at the same time as
componentDidMount/componentDidUpdate.
* Types: Revert some type changes to reduce test log output
* Functional: Fix places where useSelector returned new results when called with the same arguments
I wasn't planning on fixing this now, but I think the increased length of the warning logs in the tests are causing
the GitHub action for the unit tests to abort as it reaches around 10000 lines long.
* Tests: Fix place where mocked selector returned new results when called with the same arguments
Same reason as before, but this one only occurred because of a test's mocked selector. I replaced it with
a real one to get around that.
* Tests: Fail tests when selector returns new results when called with the same arguments
* Attempt to fix web app unit tests failing in CI
* Change CI tests to set workerIdleMemoryLimit instead of reducing maxWorkers
* Increase workerIdleMemoryLimit in CI
* Revert changes to test-ci command and revert changes to how unit test logs are collected
* Unrevert changes to test logging, re-add workerIdleMemoryLimit, and try disabling test coverage
* Actually disable coverage
* Fix flaky test
* Update a couple new tests to fit PR and remove an unnecessary act
* Replace bad mock in new unit test
* Fix types of new code
* Remove mock from new unit test
* MM-65677 - prevent modals to close via save changes panel
* add proper testing
* implement pr feedback and give warning before modal close
* address tests pr feedback
* fix e2e tests and prevent race condition in team settings modal
* increase the timeout to avoid flaky test
* remove unnecessary space
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-65618 - filter based on admin values
* add open api documentation
* adjust api description and adjust UX to match design
* reorganize function and add unit tests
* more UX adjustments; always show the self-exclusion warning modal
* use SubjectID parameter for more performant user lookup instead of fetching all matching users
* fix unit tests and remove wrong condition for job run
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* stacked modals backdrop fix
* migrate activity log and access history modals to ng stack and fix stacked backdrop
* update e2e test to stacked modals; added support for modal header id for accesibility
* apply pr feedback to improve performance
* fix overflow issue with generic modals
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* [MM-61582] Ensure textbox changes size when the window is too small
* [MM-61605] Fix clipping on menu modal in mobile view
* [MM-61622] Make mobile view RHS scrollable
* [MM-63029] Fix mobile view Browse Channels modal arrangement
* [MM-63026] Make new channel body scrollable if needed, flex to full screen on mobile view
* [MM-63059] Make Settings Modal properly responsive with flexbox for mobile view
* Fix lint
* [MM-64033] Fix mobile view for User Groups, another fix for Browse Channels
* Fix notification modal
* PR feedback
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* [MM-62989] Replace channel purpose input with Input component
* [MM-63039] Fix styles so that a11y--focused box shadow is applied to the private/public channel buttons
* [MM-63033] Add aria-describedby and role=alert to the URL input on create channel modal
* Fix lint
* [MM-63035] Change legend to label, fieldset to div in the Input component
* Fix i18n
* [MM-64174] Stop propagation of enter event while editing the new channel
* [MM-63037] Add role=img and an aria label to the error img icon
* Fix snap
* Revert "[MM-63035] Change legend to label, fieldset to div in the Input component"
This reverts commit e8516f3e6a.
* [MM-63040] Remove tabindex=0 from GenericModal wrapper, fix issue with URLInput that I caused D:
* Fix snap
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* remove redundant button styles and use proper button classes
* remove import for contact_us css
* fix view plans button to be xs
* tweak to disabled state on save button in floating bar
* change contact us to tertiary button like before
* updated btn-full on free edition right panel
* update contact button to be primary when shown in the trial card
* fix issue with hover state on save changes panel error state
* fix style lint issues
* update snapshots
* fixed a few license page buttons
* fix lint issue
* Update index.test.tsx.snap
* add empty end lines
* fixed scope of css so it doesn't affect product switcher
* upate button font size for xs, update bg color for button in announce bar
* fix lint error
* update missed cancel buttons to use proper classes
* fixed text spec to find the right button
* updated snapshots
* fix issue with test on cancel button
* update snapshots
* Convert user groups main modal to GenericModal, convert menu to Menu component, fixes
* Added useFocusTrap on other modals, fix DOM ordering
* [MM-64018] Add proper aria-labels to the menu button
* [MM-64025] Convert user group button to an actual button
* [MM-64017] Fixed aria-label on 3-dot menu in view user group modal
* [MM-64030] Show aria-live region when search results are rendered
* Fix tests
* PR feedback
* PR feedback
* [MM-62973] Fix order of Close button and other buttons in the header
* [MM-63028] Add aria-live status area when searching for channels
* [MM-63027] Add announcement that channel is joined
* [MM-63034] Add role=checkbox and reformat HTML to have correct custom checkbox code
* Update snapshots from generic_modal change
* PR feedback
* PR feedback
* PR feedback
* MM-61590 - trap focus in modals
* Adjust focus trap for dynamic loading elements and multi modal support
* add tests and improve code in generic modal
* fix snapshot
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-62312 - modal focus management; revamp quick switch channel modal!
* get quick switch test working
* configure the generic modal to accept refs to focus within and onhide to the origin element
* apply pr feedback, get modal element get autofocus, use id instead of ref
* update more direct channels modal to use generic modal
* fix unit tests and snapshots
* fix unit tests
* fix modal margin top to fit in smaller screens
* fix e2e test
* remove unnecesary onexited extra call
* fix e2e tests
* set correct label
* fix snapshots
* create helper function for sending custom focus event
* migrate quick switch modal to use new approach to focus
* migrate more direct channels modal to new approach
* fix snapshots
* fix types
* fix modal closing behavior
* fix snapshots
* fix cypress tests
* remove only
* MM-62677 - migrate modals, invite modal work
* user settings modal
* fix snapshots
* finish user settings migration
* migrate confirm modal to use generic modal
* notification preferences migration
* implement focus back to trigger to channel notifications modal
* fix test snapshots
* initial self code review
* fix CI errors, translation and some types
* add modal location param and adjust test
* fix cypress test text
* fix cypress test text
* fix e2e test for invitation modal
* fix e2e test selector
* adjust modal height
* temp
* fix e2e tests
* fix snapshot
* fix e2e tests
* fix snapshots
* fix snapshots
* fix snapshots
* fix e2e tests
* update snapshots
* fix snapshots
* fix linter
* Implement PR feedback
* fix e2e tests
* adjust styling for channel notifications modal
* more fixes to e2e tests
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-62312 - modal focus management; revamp quick switch channel modal!
* get quick switch test working
* configure the generic modal to accept refs to focus within and onhide to the origin element
* apply pr feedback, get modal element get autofocus, use id instead of ref
* update more direct channels modal to use generic modal
* fix unit tests and snapshots
* fix unit tests
* fix modal margin top to fit in smaller screens
* fix e2e test
* remove unnecesary onexited extra call
* fix e2e tests
* set correct label
* fix snapshots
* create helper function for sending custom focus event
* migrate quick switch modal to use new approach to focus
* migrate more direct channels modal to new approach
* fix snapshots
* fix types
* fix modal closing behavior
* fix snapshots
* fix cypress tests
* remove only
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Update sass-loader@16.0.2
* Update sass part 1 (actually update it)
* Update scss files to remove at-charset and use at-use instead of at-import
at-charset hasn't been needed since we switched to dart-sass, and
at-import is now deprecated. Most of this was done using sass-migrator.
We still use at-import for files imported from node_modules, but sass
doesn't seem to complain about that
* Inline at-extend rule that was causing an error
* Remove or inline at-use rules in components package
* Create scheduled post api (#27920)
* Added migration files for Postgres
* Added migrations for MySQL
* Added store method
* Added API and store tests
* Renamed migration after syncing with master
* Added app layer tests
* API is ready
* API is ready
* API is ready
* Renamed migration after syncing with master
* Updated migration list
* Fixed retry layer tests
* Allowed posts with empty messages
* Review fixes
* Reverted an incorrect change
* Renamed migration and fixed ID assignment
* CI
* Send post button changes (#28019)
* added Split button
* WIP
* Added core menu options
* WIP
* WIP
* WIP
* Handled displaying error in creating scheduled post
* lint fixes
* webapp i18n fix
* Review fixes
* Fixed a webapp test
* A few more fixes
* Removed a duplicate comment
* Scheduled post job (#28088)
* Added the job function
* Added query for fetching scheduled posts for pricessing
* WIP
* WIP
* WIP
* WIP
* WIP
* WIP
* Reafactoring of scheduled post job
* Lint fixes
* Updated i18n files
* FInishing touches
* Added tests for GetScheduledPosts
* Added tests for PermanentlyDeleteScheduledPosts
* Updated all layer
* Some changes as discussed with team
* Added tests for UpdatedScheduledPost
* Code review refactoring
* Added job test
* MM-60120 - Custom time selection (#28120)
* Added a common date time picker modal and used it for post reminder
* Added a common date time picker modal and used it for post reminderggp
* Added modal for custom schedule time and fixed TZ issue
* WIP
* Removed event from useSubmit hook
* Removed event from useSubmit hook
* Added timezone handling
* fixed type error
* Updated i18n strings
* Minor cleanup
* updated snapshots
* review fixes
* Handled event
* Supported for having a DM thread open in RHS while in a regular channel
* Review fixes
* MM-60136 - Scheduled messages tab (#28133)
* WIP
* WIP
* Created Tabs and Tab wrapper with added styling
* Added API to get scheduled posts
* WIP
* Displated scheduled post count
* i18n fix
* Added tests
* Handled asetting active tab absed on URL:
* Reverted unintended change
* Added API to client ad OpenAPI specs
* Renamed file
* Adding fileinfo to schedule posts
* Partial review fixes
* Made get scheduled post API return posts by teamID
* review fixes
* Moved scheduled post redux code to MM-redux package
* Usedd selector factory
* WIP:
* WIP:
* Lint fix
* Fixed an incorrect openapi spec file
* Removed redundent permission check
* Clreaed scheduled post data on logout
* Removed unused i18n string:
* lint fix
* Render scheduled posts (#28208)
* WIP
* WIP
* Created Tabs and Tab wrapper with added styling
* Added API to get scheduled posts
* WIP
* Displated scheduled post count
* i18n fix
* Added tests
* Handled asetting active tab absed on URL:
* Reverted unintended change
* Added API to client ad OpenAPI specs
* Renamed file
* Created common component for draft list item
* WIP
* WIP
* Adding fileinfo to schedule posts
* Basic rendering
* Added count badge to tabs
* WIP
* Made the Drafts LHS iteam appear if no drafts exist but scheduled posts do
* Fixed icon size
* Partial review fixes
* Made get scheduled post API return posts by teamID
* Handled initial vs team switch load
* Displayed scheduled date in panel header
* Added error message and error indiocator
* WIP
* review fixes
* WIP Adding error reason tag
* Added error codes
* Moved scheduled post redux code to MM-redux package
* Usedd selector factory
* WIP:
* WIP:
* Lint fix
* Fixed an incorrect openapi spec file
* Removed redundent permission check
* Clreaed scheduled post data on logout
* Removed unused i18n string:
* lint fix
* Opened rescheduling modal
* Updated graphic for empty state of schduled post list
* Added delete scheduled post option and modal
* Badge and timezone fix
* WIP:
* Added send now confirmation modal
* lint
* Webapp i18n fix
* Fixed webapp test
* Fixed a bug where DM/GM scheduled posts weren't immideatly showing up in UI
* Minor fixes
* WIP
* Review fixes
* Review fixes
* Optimisations
* Fixed reducer name
* Moment optimizatin
* Updated route check
* MM-60144 - added API to update a scheduled post (#28248)
* WIP
* Added api and ap layer for update scheduled post ̛̦̄
* Added API to OpenAI specs, Go client and TS client
* removed permissio check
* Added tests
* Fixed tests
* Added PreUpdate method on scheduled post model
* MM-60131 - Reschedule post integration (#28281)
* Handled rescheduling post in webapp
* Added error handling
* MM-60146 - Delete scheduled post api (#28265)
* WIP
* Added api and ap layer for update scheduled post ̛̦̄
* Added API to OpenAI specs, Go client and TS client
* removed permissio check
* Added tests
* Fixed tests
* Added PreUpdate method on scheduled post model
* Added delete scheduled post API
* Added API to Go client and OpenAPI specs
* Added API to TS client
* Added tests
* CI
* Rmeoved two incorrect code comments
* MM-60653 - Integrated delete scheduled post API (#28296)
* Integrated delete scheduled apost API
* Lint fix
* Review fixes
* Excluded draft checks from scheduled posts (#28370)
* Excluded draft checks from scheduled posts
* Added a removed todo
* MM-60125 - Scheduled post channel indicator (#28320)
* Integrated delete scheduled apost API
* Lint fix
* Added state for storing scheduled posts by channel ID
* Refactored redux store to store scheudled posts by ID, thens tore IDs everywhere
* Refactored redux store to store scheudled posts by ID, thens tore IDs everywhere
* WIP
* Added scheduled post indiocator
* Handled single and multiple scheudled posts
* Review fixes
* Fixed styling and handled center channel, RHS and threads view
* Lint fix
* i18n fix
* Fixed a cycling dependency
* Lint fix
* Added some more comments
* Updated styling
* Review fixes
* Added common component for remote user time and scheduled post indicator
* Updated scheduled post count
* Minor change
* Moved CSS code around
* Fixed a bug where files in scheduled post didn't show up until refresh (#28359)
---------
Co-authored-by: Daniel Espino García <larkox@gmail.com>
* Scheduled post config (#28485)
* Added config
* Added config on server and webapp side
* Added config check in server and webapp
* Added license check
* Added license check
* Added placeholder help text
* Added license check to job
* Fixed job test
* Review fixes
* Updated English text
* Review fixes
* MM-60118 - Added index on ScheduledPosts table (#28579)
* Added index
* Updated indexes
* Scheduled posts misc fixes (#28625)
* Added detailed logging for scheduled post job
* Limited scheduled posts processing to 24 hours
* Marked old scheduled posts as unable to send
* Added t5ests
* converted some logs to trace level
* Fixed a bug causing error message to show up on deleting a scheduled post in a deleted thread (#28630)
* Fixed scheduled posts link in RHS (#28659)
* Fixed scheduled posts link in RHS
* Review fixes
* Fix permission name in scheduled posts by team (#28580)
* Fix permission name
* fix wording
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* FIxed width of generic modal header to fix browser channel modal (#28639)
* Only consider error-free scheduled posts for indicator in channel and RHS (#28683)
* Show only errro free scheudled posts in post box indicator
* Fixed a bug to handle no scheduled posts
* Fixed draft and scheudled post UI in mobile view (#28680)
* MM-60873 and MM-60872 - Fixed a bug with updating scheduled posts (#28656)
* Fixed a bug with updating scheduled posts
* Better selectors
* MOved shceuled post message length validation to app layer
* MM-60732 - Scheduled posts channel link now takes you to the first scheduled post in channel/thread in list (#28768)
* Ordered scheudle dposts by schgeudled at nad create at
* Ordered in client
* Added scroll to target
* Removed classname prop
* Fixed tests
* Added doc
* Import fix
* MM-60961 - Fixed a bug where API used incoming create at date for scheduled post (#28703)
* Fixed a bug where API used incoming create at date for scheduled post
* Stopped sending created at value for scheduled post
* MM-60785 - Fixed a bug where scheduled posts of channel we are no longer member of didn't show up (#28637)
* Fixed a bug where scheduled posts of channel we are no longer member of didn't show up
* Added a comment
* CI
* Used data loader to optimise laoding missing channels
* Minor refactoring
* MM-60963 - Added common checks for post and scheduled posts (#28713)
* Added commen checks for post and scheuled posts
* Sanitised scheduled posts
* Fixed tests
* Splitted post checks into app and context functions
* Added checks on scheduiled posts job as well:
* i18n fix
* Fixed a test
* Renamed a func
* removed duplicate check
* Scheduled posts UI fixes (#28828)
* Fixed send button and time picker borders
* Fixed center alignment of time picker
* Removed on for today and tomorrow
* Lint fix
* Date time modal hover state fix
* Badge fix
* Fixed a mnerge issue
* Scheduled Post send now and add schedule on draft (#28851)
* Added send now option on scheduled posts
* Minor refactoring
* WIP
* WIP
* WIP
* Lint fix
* i18n fix
* Snapshot update
* Review fixes
* Scheduled post inline editing (#28893)
* Added send now option on scheduled posts
* Minor refactoring
* WIP
* WIP
* WIP
* Lint fix
* i18n fix
* Snapshot update
* Displayed editing component in scheduled post
* Added handling for updating scheduled post
* Handle events
* Fixed escape key issue in scheudled post editing
* Fixes
* Displayed error message for editing error
* Don't show mention warning
* Handled dev mode (#28918)
* MInor fixes
* client fix
* Fixes
* CI
* Removed dev mode behaviour temperorily (#29008)
---------
Co-authored-by: Daniel Espino García <larkox@gmail.com>
Co-authored-by: Eva Sarafianou <eva.sarafianou@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
* updated styles to include rounded corners and updated backgrounds/containers
* updated snapshots
* removed background from app bar top
* removed top padding from lhs
* updated name of container to better match the grid name in css
* fixed lint issue with css
* update snapshot
* adjusted padding/margin
* use radius variables
* remove margin and border radius from plabooks for now
* fixed tasklist
* minor tweaks to menus
* add global border variables and use in key places
* fixed grid issues with login page and backstage
* use border variable
* adjust padding in global header
* fixed type issues
* tweaks to spacing
* fixed margin issue on backstage
* fixed padding on global header
* minor tweaks to header and apps bar
* removed background from apps bar
* updates to header and app bar and team icon
* updated more borders and radii to use variables
* fixed style lint issue
* adjust letter spacing on category labels
* fix lint issue
* fixed position of popover
* address UX feedback
* Update ESLint and plugins
* Move most channels-specific ESLint configuration into ESLint plugin
* Add ESLint to types and client packages
* Add ESLint to components package
* Update Stylelint and related packages
* Autofix CSS files
* Fix scss/no-global-function-names
* Fix scss/operator-no-unspaced
* Fix scss/comment-no-empty
* Disable scss/at-extend-no-missing-placeholder
* Update libraries for loading sass
* Fix Rollup not emitting the CSS for the components package to the right place
* Add plugin to re-add stylistic Stylelint rules
* Actually import Stylelint plugin
* MM-51676 - korean chars create duplicate categories
* use isProcessing as a property instead of state; move validation of isComposing to generic modal
* update more_channels for ui and show all channels
* update searchable channel list
* fix style
* fix tests
* fix style for delete icon
* fix failing tests
* fix style
* remove dot
* remove header button
* put back header button
* Fix duplicate keys in CombinedSystemMessage component (#23507)
* MM-52873 : Switch to npm's 'reselect' for Playbooks (#23396)
* Enable golangci-lint (attempt 2) (#23517)
This time we are just using the Makefile command
to see if that makes a difference
```release-note
NONE
```
* MM-52888 Always load users mentioned in message attachments (#23460)
Co-authored-by: Mattermost Build <build@mattermost.com>
* Prepare: run E2E smoketests with GitHub actions (#23301)
- Port E2E testing scripts from cypress-ui-automation
- Move server to docker-compose, move E2E images to ecrpublic
* Integrate General channel renaming, fixes
- Add local automation-dashboard
- Add readme
- Add E2E smoketests
- Bump postgres to 12
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Saturnino Abril <saturnino.abril@gmail.com>
Co-authored-by: Antonis Stamatiou <stamatiou.antonis@gmail.com>
* MM-47064/MM-34345/MM-47072 Remove inheritance from Suggestion components and migrate to TS (#23455)
* MM-47064 Remove inheritance from Suggestion components
* Address feedback
* Fix users without DM channels not appearing in the channel switcher
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-52544 Fix missing reply bar mention highlight (#23534)
* MM-52513: fixes deleting a reply (#23177)
* MM-52513: fixes deleting a reply
Currently when we receive a WS event for a reply being deleted we might
accidentally push it to a wrong team's store. This might happen if the
thread is already loaded in store and we are viewing another team.
In that case we were fetching the thread from the API using the team id
of the current team. The API returns the thread, even though the team id
is not the one which the thread belongs to.
This commit is fixing the above issue by getting the team id in which
the thread belongs to, or current team id in the case of DM/GM messages,
and using that to fetch the thread from the API.
PS: the fetching is needed since we don't send a thread_update WS event
upon deleting a reply, and we need to get the new participants list.
* Fixes team id on another occasion
* Refactors a bit
* Reverts returning empty string as team id
* Refactor a bit to pass the post as argument
---------
Co-authored-by: Kyriakos Ziakoulis <koox00@Kyriakoss-MacBook-Pro.local>
Co-authored-by: Kyriakos Ziakoulis <koox00@192.168.2.3>
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
* Avoid calling the user count query in future if we get a count > 0 (#23545)
* Avoid calling the user count query in future if we get a count > 0
* re-adding mock session to avoid adding the old mitigation in future
* adjustments based on feedback
* MM-52365 - fix JS error banner (#23501)
* MM-52365 - fix js error banner
* add null type to bindings as an optional type
* Make used of typed atomic.Pointer (#23550)
* Make save_post_spec less affected by other E2E tests (#23541)
* Revert "Prepare: run E2E smoketests with GitHub actions (#23301)" (#23553)
This reverts commit 68be3a6bcd.
* adding debug log when executing query (#23559)
* server/docker-compose.yml: updates to run HA in local after monorepo (#23552)
* [MM-52919] Remove all uses of window.desktop.version from webapp (#23558)
Co-authored-by: Mattermost Build <build@mattermost.com>
* [MM-21096] webapp: Migrate "components/suggestion/search_channel_with_permissions_provider.jsx" to Typescript (#23323)
* migrate to ts
* linting
* fix test
* refactor
* Remove accidental comments from merge
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
* fix server ci after renaming the project (#23576)
* Temporarily let AdvancedLoggingConfig take precedence over AdvancedLoggingJSON (#23578)
* Temporarily let AdvancedLoggingConfig take precedence over AdvancedLoggingJSON
* Repo name ci fixes (#23569)
* mattermost-server -> mattermost
* mattermost-server -> mattermost
* Empty-Commit
* Empty-Commit
* Empty-Commit
---------
Co-authored-by: Antonis Stamatiou <stamatiou.antonis@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Akis Maziotis <akis.maziotis@mattermost.com>
* MM-51585 : Fix duplicated date separator in center channel when Pinned posts RHS is open (#23068)
* Fix references from 'packages/*' to 'platform/*' in READMEs (#23498)
* [MM-52541] Mark files as deleted along with thread (#23226)
* mark thread files as deleted
* add missing check
* improve query
* Stopped rendering post preview if post is deleted
* Fixed lint error
* Fixed test
* updated types
* Removed deleted post from other post's embed data
* Added tests
* Apply suggestions from code review
Co-authored-by: Daniel Espino García <larkox@gmail.com>
* lint fix
---------
Co-authored-by: Konstantinos Pittas <konstantinos.pittas@mattermost.com>
Co-authored-by: Harshil Sharma <harshilsharma63@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Harshil Sharma <18575143+harshilsharma63@users.noreply.github.com>
Co-authored-by: Daniel Espino García <larkox@gmail.com>
* MM-52476 Fix guest users access to playbooks. (#23279)
* Fix guest users access to playbooks.
* Fix guest access.
* Add guests list restriction.
* Update PULL_REQUEST_TEMPLATE.md to include Jira ticket for contributors (#23589)
* [MM-52836] : Migrate "components/admin_console/admin_definition_constants.jsx" to TypeScript (#23566)
* MM-52297 Fix reactions disappearing with search open and add testing utilities (#23510)
* MM-52297 Fix reactions disappearing when search is open
* Add unit tests and extra utilities
* Fix typing issue
* MM-53002: Fix ESR CI (#23599)
* Do not use the mattermost path
The /mattermost path is used by the image and it seems to conflict with
the container running the binary
* Use a regular machine in the esr-upgrade-diff job
* Add missing space
* [MM-52955] Fix panic for not found posts (#23561)
* [MM-52973] Avoid thundering herd problem in IsFirstUserAccount (#23549)
* [MM-45802] Clear CRT notification on deleted reply (#23568)
* reduce the counter on post deletion
* add test
* change translations
* fix collecting mentions for DMs
* add translation texts
* extract logic for getting mentions
* send WS event
* add e2e tests
* tidy mod
* WIP
* Deleting notification async
* Fixed a unit test
* Added more tests
* Updated i18n
* CI
* mattermost-server -> mattermost
* mattermost-server -> mattermost
---------
Co-authored-by: Konstantinos Pittas <konstantinos.pittas@mattermost.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
* Includes mmctl into the mono-repo (#23091)
* Includes mmctl into the mono-repo
* Update to use the new public module paths
* Adds docs check to the mmctl CI
* Fix public utils import path
* Tidy up modules
* Fix linter
* Update CI tasks to use the new file structure
* Update CI references
* [MM-30432]: Allow users to specify different desktop notification sounds per channel (#21671)
* [MM-44165]: When Help link is left blank Help Resources option should not be visible in the help menu (#23609)
* Clean up at .github due to repo rename (#23580)
* update .github after repo rename
* update
* Update PULL_REQUEST_TEMPLATE.md
---------
Co-authored-by: M-ZubairAhmed <m-zubairahmed@protonmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-52819 : "medical_symbol", "male_sign" and "female_sign" emojis are broken (#23538)
* [MM-52979]: Remove code around abandoned MUI modal migration (#23556)
* Re-export all React Testing Library functions (#23522)
* Fix panic if JSON null value is passed as channel update (#23629)
* MM-52818 - create config setting to enable/disable playbooks product (#23508)
* create config setting to enable/disable playbooks product
* fix to config name
* fix typo
* revert changes to package-lock.json
* update name of test
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* [MM-52926] Deprecating work templates (#23466)
Co-authored-by: Mattermost Build <build@mattermost.com>
* [MM-52839]: Migrate "components/admin_console/remove_file_setting.jsx" to Typescript (#23565)
* [MM-52833]: Migrate "components/admin_console/multiselect_settings.jsx" to Typescript (#23542)
* [MM-52835]: Migrate "components/admin_console/settings_group.jsx" and tests to Typescript (#23563)
* fix typo in index name for idx_teammembers_create_at (#23632)
* [MM-49989] Pass a context.Context to Client4 methods (#22922)
* Migrate all method in model/client4.go to accept a context.Context
* Fix th.*Client
* Fix remaining issues
* Empty commit to triger CI
* Fix test
* Add cancellation test
* Test that returned error is context.Canceled
* Fix bad merge
* Update mmctl code
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Service environment (#23443)
* fix fileutils.TestFindFile on MacOS
* introduce model.ExternalServiceEnvironment
* pick license public key from external service env
* pick Stripe public key from external service env
* pick Rudder key from external service env
* configure Sentry DSN from external service env
* always log external_service_environment, Unsetenv
* clear faked BuildEnv, improve logging
* strip out unset GOTAGS
* fix Sentry tests
* simplify to just ServiceEnvironment
* relocate ServiceEnvironment in client config
* initialize CWS URLs based on service environment
* unset rudder key for boards dev
* harden service environment to avoid accidental production
* fix TestSentry again
* fix DEFAULT -> ENTERPRISE
* s/dev/test when naming playbooks rudder key
* simplify boards rudder key switch
* use uniform rudderKey variable names
* retain compatibility with existing pipeline
* reduce to just production/test
* unit test with valid test license
* simplify Playbooks telemetry initialization
* restore dev service environment
* emit ServiceEnvironment when running e2e tests
* [MM 22957] webapp a11y: fix sso btns focus issue (#23326)
* make suggested changes
* added form tag and removed event handler
* fix snapshot
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Upgrade docker CI image to 23.0.1 (#23664)
Automatic Merge
* MM-52995: Fix opening DM/GM thread from thread footer (#23579)
* MM-52487: fix more playbooks tests (#23475)
* fix playbooks/channels/rhs/template_spec.js
* fix playbooks/channels/update_request_post_spec.js
* fix playbooks/runs/rdp_rhs_runinfo_spec.js
* fix playbooks/runs/rdp_rhs_statusupdates_spec.js
* remove enableexperimentalfeatures flag in e2e tests
* rdp_main_header_spec: simplify channel loaded assertion
* playbooks rhs participants: fix infinite fetch loop
* improved onboarding skipping
* simplify participants fetching
* Support json.RawMessage in configuration env overrides (#23610)
* support json.RawMessage in env overrides
* update more_channels for ui and show all channels
* remove header button
* put back header button
* [MM-52979]: Remove code around abandoned MUI modal migration (#23556)
* fix import
* update snapshot
* Update e2e-tests/cypress/tests/integration/channels/enterprise/accessibility/accessibility_modals_dialogs_spec.js
* fix e2e tests
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
Co-authored-by: M-ZubairAhmed <m-zubairahmed@protonmail.com>
Co-authored-by: Agniva De Sarker <agnivade@yahoo.co.in>
Co-authored-by: mvitale1989 <mvitale1989@hotmail.com>
Co-authored-by: Saturnino Abril <saturnino.abril@gmail.com>
Co-authored-by: Antonis Stamatiou <stamatiou.antonis@gmail.com>
Co-authored-by: Kyriakos Z <3829551+koox00@users.noreply.github.com>
Co-authored-by: Kyriakos Ziakoulis <koox00@Kyriakoss-MacBook-Pro.local>
Co-authored-by: Kyriakos Ziakoulis <koox00@192.168.2.3>
Co-authored-by: Ben Cooke <benkcooke@gmail.com>
Co-authored-by: Pablo Andrés Vélez Vidal <pablovv2012@gmail.com>
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com>
Co-authored-by: Sai Deepesh <saideepesh000@gmail.com>
Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
Co-authored-by: Harshil Sharma <18575143+harshilsharma63@users.noreply.github.com>
Co-authored-by: Akis Maziotis <akis.maziotis@mattermost.com>
Co-authored-by: Hideaki Matsunami <mahaker@users.noreply.github.com>
Co-authored-by: Konstantinos Pittas <konstantinos.pittas+github@gmail.com>
Co-authored-by: Konstantinos Pittas <konstantinos.pittas@mattermost.com>
Co-authored-by: Harshil Sharma <harshilsharma63@gmail.com>
Co-authored-by: Daniel Espino García <larkox@gmail.com>
Co-authored-by: Christopher Speller <crspeller@gmail.com>
Co-authored-by: Tejas Karelia <tejas.karelia17@gmail.com>
Co-authored-by: Alejandro García Montoro <alejandro.garciamontoro@gmail.com>
Co-authored-by: Miguel de la Cruz <miguel@mcrx.me>
Co-authored-by: KyeongSoo Kim <gaganso71@korea.ac.kr>
Co-authored-by: Matheus <20505926+MattSilvaa@users.noreply.github.com>
Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>
Co-authored-by: Julien Tant <785518+JulienTant@users.noreply.github.com>
Co-authored-by: Karan Mishra <karan.m2704@gmail.com>
Co-authored-by: Judy Hanson <106325339+Esterjudith@users.noreply.github.com>
Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
Co-authored-by: Caleb Roseland <caleb@calebroseland.com>