Commit graph

93 commits

Author SHA1 Message Date
Rajat Dabade
e39b27be7e
New keyboard library Setup (#9278)
* Initial setup for new keyboard

* fix the offset calculation onMove by adding isKeyboardFullyOpened

* Done with the keyboard handling implementation

* Handled keyboard focus and blured state using context

* Added default height for input container

* Android support

* Tablet state handling

* Fix for refreshing offset in list

* Created a default context for mention post list

* Fix linter errors

* Fix tests

* Minor

* Fix the height issue for tablet view

* Review comments

* Dependency fix

* Reveiw comment

* keyboard animation only enabled with screen on top navigation

* added tests

* Added extra keyboard component for emoji picker (#9328)

* Added extra keyboard component

* handled swipe geature for extra keyboard

* scroll to bottom visible on emoji picker

* Check for stale event for keyboard geature area

* fix keyboard stale event for mid-gesture change swipe direction

* Closing emoji picker when message priority is opened

* changing to thread view closes emoji picker

* Close emoij picker and keyboard when attachment icons are clicked

* handle android emoji picker behaviour

* Remove emoji picker code

* fix tests

* Address reviev comments

* Test fixes

* usePreventDoubleTab for race condition and corrected comment on isInputAccessoryViewMode flag

* File attachments option in bottom sheet quick action (#9331)

* Added extra keyboard component

* handled swipe geature for extra keyboard

* File attachments option in bottom sheet quick action

* Updated tests

* i18n

* fix test

* Added tests

* Review comment

* fix tests

* Integrated Emoji picker to Extra keyboard component.  (#9339)

* Added extra keyboard component

* handled swipe geature for extra keyboard

* scroll to bottom visible on emoji picker

* Fix the post input container height change issue

* Added emoji picker with search functionality

* keyboard height not recorded fallback to default height, set search to false closing emoji picker

* fix search funcitonality in android

* scroll to end bottom dismissed with pressed

* Fixed the scroll issue for android

* fix the flickering post input issue

* Wired up the emoji picker

* Added keyboard and spaceback in emoji picker

* intl extract

* initial cursor position and simple calculation review comment

* separated grapheme to utils file

* Review comments

* nitpick

* Fix the bottom safe area and navigation stack restore fix

* Fix test

* disabled emoji picker in edit post screen

* change the name of the variable to name it clarier

* fix the tab gap issue in andriod

* disabled the emoji skin tone change on andriod

* fix the input container jump issue

* fix the failing test

* UX review

* added white space after the attachment icon

* When @ or / is press open keyboard on andriod also fix the scroll issue when keyboard is open

* back bottom closes emoji picker and opening keyboard jump fix

* reverted code

* fixed the flickering issue of input and scroll position fix

* Fix the gap issue in thread

* fix the warning reaminated issue when opening a channel

* Fix the extra space issue between input and emoij picker

* Minor fix for extra space between input and emoji picker

* Fix thread view bottom safe area and gap between keyboard and searched emojis

* Fix the keyboard issue in tablet

* Fix the warning issue react-native-keyboard-controller

* Fix tests

* Fix the tablet search hight issue

* Replaced the ExtraKeyboardProvider with KeyboardProvider from rnkc for permalink

* Bottom sheet jump issue resolved

* Search do not close after selecting emoji in search list

* Added the bottom inset height in search emoji for android

* fix buid issue

* Fix the cancel state to emoji picker

* use portals for autocomplete

* fix permalink extra space in post list

* Portal only for android

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Rahim Rahman <rahim.rahman@mattermost.com>
Co-authored-by: Harshil Sharma <harshilsharma63@gmail.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2026-01-13 22:38:35 +05:30
Guillermo Vayá
6dd4a01145
Playbook run attributes UI (#9279)
* migrate naming

* temp

* temp 2

* fixed button when editing

* some bugs solved

* fix bugs

* add localization

* some review requests

* review comments

* upgrade db to 16

* Refactor property fields handling to batch database operations for improved performance

* Enhance error handling in PropertyFieldsListComponent by logging fetch errors and improving type definitions for property fields

* added tests for value change

* fix missalignment

* fix indent & typing

* fix test version

* missing version
2026-01-06 11:07:10 +01:00
Elias Nahum
01673ac092
Refactor categories list (#9270)
* Refactor categories list from nested list to a flattened list

* Refactor categories list to be flatten instead of nested
2025-12-23 07:29:06 +02:00
Harshil Sharma
c42ebca8d3
BoR scheduled posts and drafts DB migrations (#9352)
* Added type column to scheduled post and draft table

* removed console log

* fixed a test

* fixes

* Restored ununtended changes

* Code uniformity
2025-12-18 11:26:24 +05:30
Guillermo Vayá
31fc648e50
Fix testing for checklists (#9332)
* Fix testing for checklists

* address review comments

* chevron tests

* improve new item test

* remove rerenders

* address comments

* missing empty line
2025-12-17 17:38:44 +01:00
Harshil Sharma
2fb2e9d899
Burn On Read Posts (#9307)
* Added scaffolding for unrevealed BoR post

* Displayed reveal UI

* Displayed expiry timer

* WIP

* Displayed own post indicator and blur text

* restored button

* Ungrouped BoR posts

* WIP

* WIP

* DIsplayed error message on revealing

* Added last run check on mobile app cleanup job

* Cleanup

* lint fix

* i18n-fix

* Added tests

* test: add test suite for revealBoRPost function

* test: add unrevealed burn on read post test file

* feat: add tests for UnrevealedBurnOnReadPost component

* test: update UnrevealedBurnOnReadPost test with PostModel type

* test: replace toBeTruthy with toBeVisible for component visibility assertions

* test: add initial test file for expiry timer component

* test: add comprehensive tests for ExpiryCountdown component

* refactor: clean up test formatting and remove redundant test case

* fix: adjust test timing for ExpiryCountdown onExpiry callback

* test: fix timer test by advancing timers in smaller increments

* Added tests

* Updated tests

* fixed accidental change

* restored package.resolved

* WIP review fixes

* Review fixes

* Review fixes

* Fixed tests

* restored package.resolved

* WIP

* test: add test for skipping BoR post cleanup within 15 minutes

* test: add comprehensive test cases for expiredBoRPostCleanup

* WIP

* WIP

* test: add bor.test.ts placeholder file

* test: add comprehensive tests for BoR utility functions

* test: add comprehensive tests for formatTime function

* WIP

* test: add comprehensive tests for getLastBoRPostCleanupRun function

* Added tests

* removed a commented code

* post list optimization

* test: add test case for updating unrevealed burn-on-read post

* fix: handle error logging in expiredBoRPostCleanup test

* test: add test case for updateLastBoRCleanupRun error handling

* review fixes

* lint fixes

* Added WS event handling (#9320)

* Added WS event handling

* test: add burn on read websocket action test

* test: add tests for handleBoRPostRevealedEvent in burn_on_read

* Added tests

* test: add comprehensive error handling test cases for burn on read

* Added tests and error handling

* BoR post - restricted actions (#9315)

* Restricted post actions for BoR post type

* Prevent opening thread fr nBoR post

* WIP

* fix: remove redundant observable wrapping in post options

* fixed a change

* removed broken

* restored package.resolved

* Added tests

* Awaiting for last run to be set

* Added tests for validating expiry timer behaviour (#9338)

* Added tests for validating expiry timer behaviour

* No need of use event setup

* Bor ux fixes (#9336)

* WIP

* UI and delete fixes

* lint fixes

* fixed tests

* Improved mocking

* Improved test
2025-12-11 09:42:16 +05:30
Elias Nahum
44eb76bed7
feat(iOS): Add Microsoft Intune MAM integration with multi-server support (#9312)
* refactor: implement custom ExpoImage wrapper for cache control

Add ExpoImage component with automatic cacheKey/cachePath management and replace all expo-image imports across the app

* refactor(ios): convert Gekidou to CocoaPods

Migrate from Swift Package Manager to CocoaPods, add Keychain write operations, refactor notification handler to remove react-native-notifications headers, and upgrade Swift to 5.0

* npm audit

* update fastlane

* feat(ci): integrate Intune MAM for enterprise builds with strict OSS protection

Add Intune submodule, CI actions, Fastlane configuration, developer scripts, pre-commit hooks, and validation workflows to enable internal MAM builds while protecting OSS repository

* fix tests by mocking @mattermost/intune

* feat: implement Intune MAM integration with comprehensive security enforcement

Add IntuneManager, refactor SecurityManager/SessionManager for MAM policies, implement native OIDC auth flow, add biometric enforcement, conditional launch blocking, and file protection controls

* fix alerts when no server database is present

* Unify cache strategy

* fix emit config changed after it was stored in the db

* Handle Mid-Session Enrollment Detection

* fix ADALLogOverrideDisabled missing in Fastfile

* fix flow for initial enrollment

* fix and add unit tests

* enable Intune configuration for PR and beta builds, CLIENT_ID should be changed before actual release

* Update intune submodule with addressed feedback

* fix validate-intune-clean workflow

* feat(intune): add comprehensive error handling and SAML+Entra support

Add production-ready error handling for native Entra authentication with
user-friendly i18n messages, comprehensive test coverage, and support for
Entra login when server requires SAML.

* update i18n

* update intune submodule

* update build-pr token

* fix race condition between server auth and intune enrollment

* fix CI workflow to build with intune

* use deploy key for intune submodule

* set the config directly in the submodule .git

* debug injection

* try setting GIT_SSH_COMMAND

* remove action debug

* fix server url input

* match pod cache with intune hash

* Fastfile and envs

* have workflows check for intune/.git

* have ci cache intune frameworks as well

* update Fastlane to set no-cache to artifacts uploaded

* fix s3 upload

* fix pblist template

* Attempt to remove the cache control for PR uploads to s3

* use hash from commit for S3 path

* Implement crash-resilient selective wipe with automatic retry and add removeInternetPassword to Gekidou Keychain

* Fix surface errors from intune login

* fix postinstall scripts

* use cacheKey for draft md images

* remove unnecessary double await during test

* Have isMinimumLicenseTier accept valid license sku tier as target

* Add missing Auth error messages

* remove the last period for intune errors in i18n

* do not call unenroll with wipe on manual logout

* Fix tests and Intune error messages

* do not filter any SSO type regardless of which is used for Intune

* fix 412 to not retry

* fix tests, app logs sharing and share_extension avatar cache

* apply setScreenCapturePolicy on license change

Co-authored-by: Eva Sarafianou <eva.sarafianou@mattermost.com>

* re-apply screen capture on enrollment

Co-authored-by: Eva Sarafianou <eva.sarafianou@mattermost.com>

* use userData from intunr login and prevent getMe

Co-authored-by: Eva Sarafianou <eva.sarafianou@mattermost.com>

* Check for Biometrics and Jailbreak as we used to

---------

Co-authored-by: Eva Sarafianou <eva.sarafianou@mattermost.com>
2025-12-10 13:07:28 +02:00
Guillermo Vayá
be5b6c196c
Checklist (#9234) 2025-11-12 20:46:59 +01:00
Daniel Espino García
47e4bbca78
[MM-66420] Add missing tests for playbooks (#9258)
* [MM-66420] Add missing tests for playbooks

* i18n-extract

* Update message keys to more accurate ones

* Update status update post to use a more standard error handling and fix linter bugs

* Add post-merge tests and address feedback

* Fix failing test

* Address feedback
2025-11-06 12:01:25 +01:00
Rahim Rahman
72b97f60f5
revert: floating banner & low connectivity (#9254)
* Revert "feat(MM-65625): low connectivity feature toggle in advance settings (#9191)"

This reverts commit c872e2e2b1.

* Revert "feat(MM-65145): Network connectivity/performance observer (#9173)"

This reverts commit 597e03d7d8.

* Revert "feat(MM-65625): floating banner (#9162)"

This reverts commit 5887c3ab46.

* Revert "feat(MM-65625): enhance navigation overlay management (#9165)"

This reverts commit f1554f0341.

* revert advanced.test.tsx changes
2025-11-04 07:15:51 -07:00
Daniel Espino García
6d136a1343
Add post update to playbooks (#9120)
* Add Floating Label Autocomplete Selector

* Add post update to playbooks

* Add intro message and template default

* Fix type issue

* Add missing texts

* Fix test

* Minor fix and refactor

* Address feedback
2025-10-13 20:31:12 +02:00
Guillermo Vayá
87395e1210
[MM-65984] DB changes to handle Playbook Run Attributes (#9172)
* db changes

* temp tests

* missing mock models

* test helpers improvement

* address naming errors

* added comments to schema

* x2

* minor corrections

* Update app/products/playbooks/database/models/playbook_run_attribute_value.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* docs

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-12 21:48:50 +02:00
Rahim Rahman
5887c3ab46
feat(MM-65625): floating banner (#9162)
* feat: implement floating banner system

- Add FloatingBanner component with gesture support and keyboard awareness
- Implement BannerManager singleton for banner lifecycle management
- Create floating banner screen with SafeAreaProvider integration
- Add comprehensive banner configuration types and positioning
- Update Banner component to use modern gesture handling
- Enhance BannerItem with improved typography and spacing (40px height)
- Add ConnectionBanner improvements with better sizing
- Remove ConnectionBanner from channel list (moved to floating system)
- Update screens constants (remove FLOATING_BANNER - handled as overlay)
- Add i18n support for limited network connection message

The system provides:
- Auto-hide functionality with customizable duration
- Position-aware rendering (top/bottom with keyboard adjustment)
- Tablet-specific offset handling
- Swipe-to-dismiss with configurable thresholds
- Custom component support alongside default banner items
- Comprehensive test coverage with device-specific scenarios

* docs: add floating banner system documentation and cleanup

- Add comprehensive floating-banner.md with architecture diagrams
- Remove incompatible connection_banner/index.ts file
- Update device.ts hooks for better keyboard handling
- Simplify screens/index.tsx floating banner registration
- Update test/setup.ts to remove deprecated keyboard mocks
- Clean up keyboard height logic and ESLint issues

The documentation covers:
- System architecture and component relationships
- API reference and usage patterns
- Performance considerations and best practices
- Integration points and troubleshooting guide
- Comprehensive testing strategy

All tests now pass with the updated setup.

* fix issue with translation file

* some self cleanup.

* renamed index.tsx => Banner.tsx

* creaete meaningful tests for Banner component and all the hooks.

* fix tests

* cleanup based on initial review by AI

* dismissible was set to true, changing to what was configured.

* making title and message optional

* addressed some comments in PR

* more fixes based on PR review.

* added future enhancement

* dismissOverlay will be awaited
* delay dismissing overlay so we don't have to show a new one all the time

* make the banner stackable

* Fix issue with last banner dismissal delayed by 2s

* update floating-banner test

* clean-up based on review by @enahum

* fix failing test

* fix failiing tests

* rename confusing var

* fixed issue with swipe not working on android

* fix issue w/ android not registering touch events behind the overlay

* fix failing test

* animate the banner moving up when bottom banner first appear.

* removed unused functions and update tests

* add useMemo and useCallback

* update jsdoc to say dismissable is default true

* fix failing test
2025-10-12 09:33:51 -06:00
Rahim Rahman
f1554f0341
feat(MM-65625): enhance navigation overlay management (#9165)
* feat: enhance navigation overlay management

- Add overlay tracking to NavigationStore with exception handling
- Implement dismissAllOverlays with individual overlay dismissal
- Add overlay management methods (add, remove, filter exceptions)
- Preserve floating-banner-overlay when dismissing other overlays
- Add comprehensive tests for overlay stack management
- Update navigation command listeners for overlay events

This improves overlay management by tracking overlays in the store
and providing fine-grained control over which overlays to dismiss,
particularly preserving floating banners during navigation cleanup.

* make tests more meaningful in navigation

* ChatGPT review fix

* revert changes to dismissAllOverlays
* create a new function dismissAllOverlaysWithExceptions
* add new function removeAllOverlaysFromStack to clear the entire overlays

* added a mock to dismissAllOverlays

* update thread to call dismissAllOverlays with exceptions instead.

* remove unneeded removeAllOverlaysWithExceptions()

* silly ai

* use set instead of array.
2025-10-10 11:31:36 -06:00
Yair Szarf
42988fddc3
Add a notification disabled notice to notification settings (#9145)
* Adding the notification disabled notice

* Change the color of the icon on the section notice to red.

* Fix Linter Issues

* Add new line due to CI failure

* Adressing pull request comments and change requests.

* i18 Strings alphabetical order

* result of `npm run i18n-extract`

* Add a couple more tests for notifications

* Remove two unneeded styles

* fix linter issue
2025-10-01 08:20:22 -04:00
JG Heithcock
2d6a5d5097
Mobile-side for MM-65084 (#9115)
* Mobile fix for MM-65084

* Changing test/setup.ts to use a deterministic fill

This avoids the ci issue about parenthesis and is more clear that this is just a fixed sequence for testing, similar to randomUUID above.

* Add setBearerToken and setCSRFToken to Client definition

* Use setClientCredentials and memoize createPkceBundle

* Restoring the preauthSecret back to the Client constructors

This came out of a response to MM-65085: Support Pre Shared Password on server connect where preauthSecret was added in the buildConfig. Claude (correctly imo) identified this as now redundant and so removed it but it is valid to keep it as well. In any case, putting it back to be consistent with ClientTracking and ClientBase.

* Rename PKCE to SAML based terminology, similar to server

* Fix lint issue with too many blank lines at eof

* Removing plain on mobile side

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-09-29 14:29:37 -07:00
Guillermo Vayá
c193dbd255
[MM-65657] Conditional results db-only (#9135)
* database and types

* transformers

* fix schema version

* fix schema tests

* add missing condition_reason

* add missing tests
2025-09-22 14:07:25 +02:00
Daniel Espino García
a5d7bf7db4
Add select user screen to select owner and task assignee (#9089)
* Add select user screen to select owner and task assignee

* Fix i18n

* Add tests

* Address feedback

* Fix test

* Address UX feedback

* Fix test

* Put the no assignee button inline with the search
2025-09-12 12:13:25 +02:00
Daniel Espino García
8aa13c4e0a
Add bottom sheet for playbooks checklist items (#9065)
* Add bottom sheet for playbooks checklist items

* i18n extract

* Remove unneeded test case

* Add tests

* Address feedback

* Remove unneeded useCallback and add needed useMemo

* Address feedback

* Add missing translation string
2025-08-25 12:37:29 +02:00
Daniel Espino García
2455ecf39f
Remove playbooks on delete channel (#8994)
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-07-17 11:54:14 +02:00
Daniel Espino García
bb7ff622af
Add Playbooks read-only support for mobile devices (#8978)
* Add the channel options to get into playbooks (#8750)

* Add the channel options to get into playbooks

* Use playbook run id instead of playbook id

* i18n

* Fix issues and move playbooks to the products folder

* Address some tests

* Fix test

* Address design issues

* Add requested comment

---------

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>

* Playbooks database (#8802)

* Add lastPlaybookFetchAt to channel table (#8916)

* Add lastPlaybookFetchAt to channel table

* Add missing commit

* Use my_channel table instead

* Fix test

* Address feedback

* First implementation of playbooks API (#8897)

* First implementation of playbooks API

* Add version check

* Address feedback

* Fix test

* Add last fetch at usage and other improvements

* Simplify test

* Add sort_order, update_at and previousReminder columns (#8927)

* Add sort_order, update_at and previousReminder columns

* Remove order from the schema

* Fix tests

* Add tests

* Add websockets for playbooks (#8947)

* Add websocket events for playbooks

* Fix typo

* Add playbook run list (#8761)

* Add the channel options to get into playbooks

* Use playbook run id instead of playbook id

* i18n

* Fix issues and move playbooks to the products folder

* Address some tests

* Fix test

* Add playbook run list

* Add missing texts

* Add back button support and item size to flash list

* Address design issues

* Add requested comment

* Standardize tag and use it in the card

* Fix merge

* Add API related functionality

---------

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>

* Add playbooks run details (#8872)

* Add the channel options to get into playbooks

* Use playbook run id instead of playbook id

* i18n

* Fix issues and move playbooks to the products folder

* Address some tests

* Fix test

* Add playbook run list

* Add missing texts

* Add back button support and item size to flash list

* Address design issues

* Add requested comment

* Standardize tag and use it in the card

* Add playbooks run details

* Fix merge

* Add API related functionality

* Add API related changes

* Order fixes

* Several fixes

* Add error state on playbook run

* i18n-extract

* Fix tests

* Fix test

* Several fixes

* Fixes and add missing UI elements

* i18n-extract

* Fix tests

* Remove files from bad merge

---------

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>

* Add missing tests for playbooks (#8976)

* Add the channel options to get into playbooks

* Use playbook run id instead of playbook id

* i18n

* Fix issues and move playbooks to the products folder

* Address some tests

* Fix test

* Add playbook run list

* Add missing texts

* Add back button support and item size to flash list

* Address design issues

* Add requested comment

* Standardize tag and use it in the card

* Add playbooks run details

* Fix merge

* Add API related functionality

* Add API related changes

* Order fixes

* Several fixes

* Add error state on playbook run

* i18n-extract

* Fix tests

* Fix test

* Several fixes

* Fixes and add missing UI elements

* i18n-extract

* Fix tests

* Remove files from bad merge

* Add tests

* Fix typo

* Add missing strings

* Fix tests and skip some

* Fix test

* Fix typo

---------

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>

* Address feedback

* Address feedback and fix tests

* Address comments and fix tests

* Address feedback

* Address plugin changes and fix bugs

---------

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2025-07-14 09:21:37 +02:00
Rajat Dabade
6bdcf2be49
Remaining test for draft and Scheduled post (#8887)
* Added test for draft_scheduled_post and header component

* Added test for drafts_button/index.ts

* Added test for send_button/index.ts

* Added test for servers/scheduled_post.ts queries

* Added test for global_scheduled_post_list/index.ts

* Added test for rescheduled draft index file and minor update

* Added test for core option and index

* Added test for scheduled post options

* Added test for send_draft index file

* updated test for draft_scheduled_post and draft_scheduled_post_header

* Updated test for drafts_button index

* Updated test for send_button index

* Updated test for server/scheduled_post

* Updated test for global_scheduled_post/index

* removed the unnecessary config and team data to populate in db for test

* Update app/components/draft_scheduled_post/draft_scheduled_post.test.tsx

Co-authored-by: Daniel Espino García <larkox@gmail.com>

* linter fixes

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Daniel Espino García <larkox@gmail.com>
2025-07-01 13:47:02 +05:30
Lucas Reis
d38bf60050
Disable Animations when Accessibility configuration is to remove it (#8743)
* feat: add support for reduced motion in BottomSheet and TabBar components

* fix: remove reduceMotion option from animation timing in login, onboarding, and server screens

* feat: integrate reduced motion support to the entire app and switch accordingly

* feat: positions the Login screen differently if animations are disabled

* fix: remove mock implementation of useReducedMotion in react-native-reanimated

* revert login screen

* fix: remove unused effect that resets translateX value in LoginOptions

* feat: add reduced motion support to ForgotPassword screen and reset translateX on LoginOptions mount

* feat: integrate reduced motion support in Onboarding and Slide components

* feat: add reduced motion support to MFA and SSO screens

* feat: update ReducedMotionConfig to use system preference in withServerDatabase

* refactor: remove ReducedMotionConfig from withServerDatabase component

* feat: remove reduced motion configuration from screens and adjust animations accordingly

* feat: integrate reduced motion handling in Server component animations

* feat: enhance BottomSheet animation with reduced motion support and update test setup for react-native-reanimated

* fix: update channel list row snapshots with collapsable and animated props

* test: update react-native-reanimated mock setup for improved testing

* fix: enhance react-native-reanimated mock to support reduced motion and prevent default call

* fix: refactor animationConfigs to use useMemo for improved performance and clarity

* feat: implement screen transition animation hook and integrate it into ForgotPassword screen

* fix: refactor LoginOptions to utilize useScreenTransitionAnimation for improved animation handling

* refactor: streamline MFA component by removing unused imports and integrating useScreenTransitionAnimation for enhanced transitions

* refactor: simplify Onboarding component by removing unused imports and integrating useScreenTransitionAnimation for smoother transitions

* refactor: enhance useScreenTransitionAnimation hook to support animated transitions and integrate it into Server component

* refactor: replace custom animation logic with useScreenTransitionAnimation in SSO component for improved transition handling
2025-06-26 11:25:48 +02:00
Guillermo Vayá
db569fe2c3
[MM-62565] Custom Profile attributes websocket changes (#8758)
* user_info websocket listening

* add to edit profile

* add tests

* fix user_info test

* improved types

* add websocket tests

* fix tests to adapt to the database

* temp

* fix test, remove unneeded file

* Update app/actions/remote/custom_profile.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix test and storing fields and attributes

* consistency

* remove await from loop

* remove db from component

* simplify functions

* address reviews

* adress review comments

* fix promises not being fulfilled before ordering

* fix tests

* address comments

* address review comments

* test_helper

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-27 16:24:40 +02:00
Daniel Espino García
af0a7525c8
Refactor Open Profile (#8746)
* Refactor Open Profile

* Add missing changes

* Fix tests

* Fix tests

* Address feedback
2025-05-13 17:07:13 +02:00
Elias Nahum
f320dd65ad
Add is_blocked to FileModel (#8842)
* Add is_blocked to FileModel

* fix type in the docs

* use correct type in docs
2025-05-07 15:33:04 +08:00
Daniel Espino García
5c2153f83b
Add Report a Problem functionality (#8605)
* Add Report a Problem functionality

* update cache pinned SHA version from 4.0.2 to 4.2.0

* Address feedback

* Fix tests

* Fix some issues and update kotlin coroutines version

* Fix delete file for iOS

* Bump 1 more version for coroutines

* Use rxjava instead of kotlin coroutines to avoid security issue

* Move path prefix to avoid test error

* Address feedback

* Address feedback

* Address feedback

* Use mailto on iOS

* Fix tests related to button changes

* Address feedback

* Update icon and fix onboarding buttons

* Fix test

---------

Co-authored-by: Angelos Kyratzakos <angelos.kyratzakos@mattermost.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-04-24 11:12:55 +02:00
Rajat Dabade
f75c50ad2b
Feature schedule posts (#8509) 2025-04-14 22:08:59 +05:30
Guillermo Vayá
6a060cd505
[MM-62565] DB only custom profile attributes and fields (#8739)
Database only
2025-04-09 15:35:27 +02:00
Elias Nahum
374f812b98
Update dependencies (#8721)
* update fastlane

* update dev dependencies

* update to eslint 9+

* update testing-library

* update react-intl

* update bottom-sheet

* update expo

* update reanimated

* upgrade msgpack

* upgrade datepicker

* upgrade react-navigation

* update sentry

* update FlasList

* update fuse.js moment-timezone node-html-parser and semver

* update gesture-handler

* update image-picker

* update react-native-keychain

* update react-native-localize

* update react-native-navigation

* update watermelonDB

* update react-native-permissions

* update react-native-safe-area-context and react-native-screens

* update react-native-share and react-native-svg

* update react-native-video and react-native-webrtc

* update @mattermost/rnutils

* update @mattermost/rnshare

* update @mattermost/hardware-keyboard

* fix isMainActivity

* update android dependencies

* fix upload file progress indicator

* fix entry update config & license

* revert to stable version of @sentry/react-native

* update react-intl again

* update moment-timezone

* upgrade @react-native-camera-roll/camera-roll

* update @react-native-clipboard/clipboard

* update @react-navigation again

* update @shopify/flash-list

* update eslint

* update expo again

* update html-entities

* update mime-db

* update react-native-permissions

* Revert "update react-intl again"

This reverts commit e8e6d5a60dfa56b82b810cbbd7cdffec7697ffc7.

* Revert "update react-intl"

This reverts commit c77f329bb38910aeeba03869b72d77a8b0e00ba1.

* update react-native-keychain

* update and patch react-intl

* mend

* feedback during review 1
2025-04-07 09:30:06 +08:00
Daniel Espino García
85e01a7fb6
Add model mocks to TestHelper (#8715)
* Add model mocks to TestHelper

* Address feedback
2025-03-28 09:40:08 +01:00
Daniel Espino García
b475f2bedb
Fix team sidebar not showing thread unreads (#8624)
* Fix team sidebar not showing thread unreads

* Fix tests

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-03-18 13:33:15 +01:00
Elias Nahum
a5a1e53827
Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645)
* Handle biometric authentication

* jailbreak/root detection and biometric small fixes

* remove server from initializeSecurityManager and fix loginEntry

* Add screen capture prevention and other small fixes

* added unit tests to SecurityManager

* added shielded nativeID to protect views

* use MobilePreventScreenCapture instead of MobileAllowScreenshots in config type definition

* Apply Swizzle for screen capture on iOS

* Apply patch to bottom sheet to prevent screen captures

* fix ios sendReply

* Fix SDWebImage swizzle to use the correct session

* Fix potential crash on Android when using hardware keyboard

* rename patch for network library to remove warning

* add temp emm reference

* fix initializeSecurityManager tests

* fix translations

* use siteName for jailbreak detection when connecting to a new server

* fix i18n typo

* do not query the entire config from the db only the required fields

* migrate manage_apps to use defineMessages

* use TestHelper.wait in tests

* use defineMessages for security manager

* fix missing else statement for gm_to_channel

* created a TestHelper function to mockQuery and replace as jest.Mock with jest.mocked

* fix unit tests

* fix unit tests (again) and include setting the test environment to UTC

* Fix keyboard disappearing on iOS

* update react-native-emm
2025-03-13 14:07:41 -04:00
David Krauser
c27f0eade2
[MM-62925] introduce websocket client-side ping (#8633)
This commit introduces new functionality on the client side to send PING messages over the websocket. If the server doesn't respond within PING_INTERVAL (currently 30 seconds), the connection is closed and re-created. This will allow us to find broken connections more quickly.
2025-03-11 11:48:09 -04:00
Daniel Espino García
802a67c4f2
Enforce names for singleton imports (#8639) 2025-02-27 12:46:17 +01:00
Daniel Espino García
438edd96f6
Fix edit attachments (#8468)
* Fix edit attachments

* Address feedback
2025-01-17 12:41:14 +01:00
Elias Nahum
2f3dfbbbfa
Update dependencies and upgrade to RN 0.76.5 (#8421)
* update dev deps

* partial update dependencies

* update watermelondb

* update rn to 0.76.5, expo to 52.0.18 and others

* upgrade android firebase

* upgrade detox deps

* fix package-lock.json

* update emm and paste-input

* update turbo-log

* update network library

* fix tests

* review feedback

* fix Keyboard blocking signIn button

* Fall back to iphone 14 iOS 17.2 simulator as app crashes on iOS 17.4

* changes in deleteCredentialsForServer is causing a crash

* withOptions x2 clearly is wrong

* re-add cli-platform-apple fix

* fix: RN 0.76.5 issue with bottom sheet disappearing (#8478)

* experiment, using view vs BottomSheetView

* revert previous & try disabling enableDynamicSizing

* revert an unintended removal

---------

Co-authored-by: yasserfaraazkhan <attitude3cena.yf@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Rahim Rahman <rahim.rahman@mattermost.com>
2025-01-16 07:11:32 -07:00
Elias Nahum
d25c6fe245
Extra keyboard (#8348)
* Add support to use the keyboard area with a component

* fix import

* add missing providers to involved screens

* Change the way we handle the keyboard to allow using custom components in that area

* review feedback
2024-11-29 11:58:13 +08:00
Daniel Espino García
bc8a42b161
Native set load measured (#8242)
* Track notification loaded on native side instead of JS

* iOS details and iOS 18 changes

* Fix tests
2024-10-14 16:07:06 +02:00
Elias Nahum
a2dca382c7
add unit tests to app/utils/notification (#8140) 2024-08-29 00:04:12 +08:00
Elias Nahum
e7fe7c23ff
add unit tests to utils/gallery (#8117) 2024-08-06 13:17:36 +03:00
Elias Nahum
4048b70713
fix cannot read data when opening a deeplink (#8109) 2024-07-27 03:37:57 +08:00
Elias Nahum
a7224479d5
added utils unit tests (#8040) 2024-07-05 07:17:09 +08:00
Christopher Poile
92bdb2847b
[MM-57486] [MM-58008] Calls: Mobile ringing for incoming calls (#7984)
* notification ringing, settings screen, native code patch, ringing mp3s

* i18n

* play preview on first press

* prevent playing from background (only affects Android) to match iOS beh

* stop ringing/vibration on entering background

* ring when coming back from background and new incoming call is present

* no push notification sound when it's a call; improve ringing

* move sounds to asset folder; copy on postinstall for android bundling

* make Ringtone type a string enum

* make Android ring async + await ring and stop; changes from PR comments

* missing fields after merge

* release lock on an exception

* cancel sample ringing when turning notifications off

* copy sound files for android build

* typo

* update snapshots

* testing if the problem is copying the mp3 files

* fix android mp3 assets when building for non-release

* add sounds to .gitignore

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2024-07-03 10:22:46 -04:00
Daniel Espino García
b7791add7c
Use UUID native functions (#8032) 2024-06-20 18:22:59 +08:00
Elias Nahum
b8c088cc70
Upgrade RN as well as update or replace other dependencies (#8011)
* start upgrade to RN 74

* migrate react-native-fs to expo-file-system

* exclude expo-asset module

* fix database manager remove directory

* fix: android network helper

* include expo on android

* temporarily disable android dep lock

* replace react-native-create-thumbnail with expo-video-thumnails

* update patches file version

* fix android build on 74

* create local library to replace MattermostManaged, Notifications and SplitView modules with new arch support

* migrate app to use new mattermost-rnutils library

* remove unused flipper class for android unsigned

* fix mattermost-rnutils android foldedObserver lifecycle

* use mattermost-rnutils on Android

* use mattermost-rnutils on iOS

* path react-native-navigation to not crash when activity is not NavigationActivity

* create local library for android share extension with new arch support

* Replace ShareModule with @mattermost/rnshare library

* remove ShareModule from android native code

* update react-intl

* update nodejs to 20.x.x npm to 10.x.x and dev deps

* update @gorhom/bottom-sheet

* use MattermostShare conditionally based on the platform

* update @react-native-camera-roll/camera-roll

* remove unused react-native-calendars

* fix metro config

* fix terminate session race condition

* remove unused analytics

* replace react-native-device-info with expo-application and expo-device

* update @react-native-clipboard/clipboard

* update @react-native-community/datetimepicker

* update @react-native-community/netinfo

* update @sentry/react-native

* update react-native-document-picker

* update react-native-gesture-handler

* update react-native-share

* update react-native-svg and react-native-svg-transformer

* update react-native-vector-icons

* update babel

* update react-native-shadow-2

* update semver

* remove react-native-svg-transformer and convert svg files to svg components

* fix @mattermost/rnshare new-arch build on android

* remove react-native-create-thumbnail resolution in build.gradle

* create @mattermost/hardware-keyboard library to replace hw-keyboard-events

* fix hardware-keyboard library

* fix rnutils library

* create @mattermost/keyboard-tracker library

* replace react-native-keyboard-tracking-view with @mattermost/keyboard-tracker

* fix: rnutils to not crash on lateinit context

* fix: rnutils delete database

* revert changes to session_manager

* Removed react-native-webview and added expo-web-browser instead

With expo-web-browser we no longer need the webview for SSO login
the SSO login is now done by using "custom Chrome tabs" on Android
and ASWebAuthenticationSession on iOS

* remove patch for react-native-keyboard-tracking-view

* replace react-native-linear-gradient with expo-linear-gradient

* replace react-native-in-app-review with expo-store-review

* fix: shared group database directory on ios

* replace react-native-fast-image with expo-image

* remove unusued type def for react-native-keyboard-tracking-view

* replace react-native-elements and react-native-button with @rneui

* node version

* update sizzling methods

* fix tests using jest-expo

* replace jail-monkey with expo-device

* update babel deps

* update typescript eslint

* update rn and expo

* react-native-document-picker @react-native-camera-roll/camera-roll @react-native-community/datetimepicker react-native-reanimated react-native-safe-area-context

* update patches

* update @sentry/react-native

* upgrade react-native-navigation

* update expo & expo-image

* upgrade to working version of @sentry/react-native

* update node, cocoapods, bundler, fastlane versions

* @testing-library/react-native and eslint-plugin-jest

* fix: FloatingTextInput causing a crash with reanimated

* update sentry, localize, @types/lodash and uuid

* fix floating text input label

* update react-native-video

* fix: cannot calculate shadow efficiently on some components

* fix: reduce motion warning for bottomSheet

* fix: shadow on YouTube component

* update react-native-webrtc expo and @typescript-eslint

* audit fix

* fix swizzling bad merge

* temp use of github dependency for @mattermost libraries

* feedback review

* feedback review

* npm audit fix

* update bundle deps

* update @mattermost/react-native-turbo-log

* update deps
2024-06-19 09:33:45 +08:00
Elias Nahum
dddd09aa9b
Add unit tests to utils config, datetime, error_handling, errors and files (#8018) 2024-06-15 01:29:03 +08:00
Daniel Espino García
5f01f9e9af
Add performance metrics to the app (#7953)
* Add performance metrics to the app

* add batcher and improve handling

* Add tests

* Fix test

* Address feedback

* Address feedback

* Address feedback

* update podfile
2024-06-12 09:45:27 +02:00
Daniel Espino García
b966e1f356
Fix priority footer on tablets (#7966) 2024-06-10 17:08:53 +02:00
Elias Nahum
de57c343f0
MM-55621 fix layout for tablets and foldables (#7697)
* MM-55621 fix layout for tablets and foldables

* feedback review
2023-12-05 11:08:43 +08:00