mattermost-mobile/app/constants
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
..
about_links.ts Barebones code for v2 2020-11-17 14:20:58 -03:00
action_type.ts Feature schedule posts (#8509) 2025-04-14 22:08:59 +05:30
apps.ts App framework - Post menu and channel info bindings, App forms (#6735) 2022-11-30 21:25:08 +02:00
autocomplete.test.ts [MM-49540] Message Priority Phase 3 (#7142) 2023-04-27 11:22:03 +00:00
autocomplete.ts Fix cannot search user when pressing space (#7486) 2023-08-09 11:38:06 +02:00
calls.ts Remove long deprecated Calls code (#8747) 2025-05-15 18:20:45 +02:00
categories.ts [Gekidou] channel quick actions (#6288) 2022-05-19 14:30:55 -04:00
channel.ts MM 45015 - auto follow threads (#7463) 2023-11-14 10:00:19 +01:00
config.ts [Gekidou MM-41093] CRT - WS Events, Actions, Queries, Thread Follow, Post Query (#6075) 2022-04-04 19:55:13 +05:30
custom_status.ts Remove tand prevent double tap (#9078) 2025-08-25 12:03:01 +02:00
database.ts Add Playbooks read-only support for mobile devices (#8978) 2025-07-14 09:21:37 +02:00
datetime.ts Gekidou CRT - Global threads screen (#6140) 2022-04-28 09:01:36 -04:00
deep_linking.ts MM-64960 ask users to fill Playbook run retrospective on web or desktop (#9044) 2025-07-31 18:21:11 +08:00
device.ts Upgrade RN as well as update or replace other dependencies (#8011) 2024-06-19 09:33:45 +08:00
draft.ts Standardize tabs across different components (#8691) 2025-05-28 16:23:37 +02:00
emoji.ts Improve emoji picker performance introducing flashList (#8650) 2025-03-11 22:09:46 +08:00
events.ts Viewing Files in Edit mode in mobile with ability to delete and save (#8918) 2025-06-20 01:03:57 +05:30
files.ts Ability to show quick action and add files to edit post (#8926) 2025-06-25 16:04:08 +05:30
gallery.ts Refactor gallery gestures (#8752) 2025-07-22 14:00:57 +08:00
general.ts Add model mocks to TestHelper (#8715) 2025-03-28 09:40:08 +01:00
image.ts fix: fixed image overflow in message attachments (#8361) 2024-12-06 08:27:42 +02:00
index.ts [MM-60405] Crossteam search (#8411) 2025-02-05 13:46:38 -07:00
integrations.ts Add AppsForm and Interactive Dialogs (#6142) 2022-04-28 18:26:21 +02:00
launch.ts Add DeepLink support (#6869) 2022-12-16 18:57:15 +02:00
license.ts Secure Files and preview PDF inline (#8844) 2025-06-19 15:30:56 +08:00
list.ts [Gekidou] Sidebar Categories FlatList Optimisations (#6031) 2022-03-08 18:16:58 -03:00
members.ts [Gekidou - MM-47653] Implement Manage Members Screen (#6771) 2023-02-03 10:42:12 +02:00
navigation.ts Refactor NavigationStore (#6842) 2022-12-07 16:44:21 +02:00
network.ts show alert when server SSL is invalid or untrusted (#7533) 2023-09-07 06:23:34 -03:00
notification_level.ts Add GM as DM feature support (#7515) 2023-09-26 18:35:40 +02:00
permissions.ts Channel Bookmarks (#7817) 2024-07-18 09:10:28 +08:00
post.ts Add model mocks to TestHelper (#8715) 2025-03-28 09:40:08 +01:00
post_draft.ts Extra keyboard (#8348) 2024-11-29 11:58:13 +08:00
preferences.ts MM-37809 Update Default Themes (#7907) 2024-04-24 06:54:09 +08:00
profile.ts MM-40364 [Gekidou] - Image Picker for Edit Profile (#5901) 2022-01-28 16:06:50 +04:00
push_notification.ts Fix MM 56723 (#7883) 2024-04-24 17:12:56 +02:00
push_proxy.ts [Gekidou] [MM-41837] Add verification for push proxy and related interface (#6192) 2022-05-09 11:41:16 +02:00
reaction_picker.ts BottomSheet migration to react-native-bottom-sheet (#6907) 2023-01-05 09:51:51 +02:00
screens.ts feat(MM-65625): floating banner (#9162) 2025-10-12 09:33:51 -06:00
server_errors.ts Displayed channel related error with name field 2023-11-16 17:06:39 +05:30
snack_bar.ts Add Playbooks read-only support for mobile devices (#8978) 2025-07-14 09:21:37 +02:00
sso.ts Add support for Auth Scheme customization (#8261) 2024-10-23 08:44:12 +08:00
supported_server.ts Update supported ESR version (#8835) 2025-05-16 09:28:47 +03:00
team.ts [MM-60405] Crossteam search (#8411) 2025-02-05 13:46:38 -07:00
tooltip.ts Fix scheduled messages tooltip entering an infinite resize loop (#8877) 2025-05-23 13:05:31 +02:00
tutorial.ts Feature schedule posts (#8509) 2025-04-14 22:08:59 +05:30
versions.ts copy channel purpose text implemented (#7586) 2023-10-09 18:36:56 +02:00
view.ts feat(MM-65625): floating banner (#9162) 2025-10-12 09:33:51 -06:00
websocket.ts Add Playbooks read-only support for mobile devices (#8978) 2025-07-14 09:21:37 +02:00