*Summary*
- This PR adds storybook into the mobile repo, and adds a sample story for the existing "loading" component.
- In the root of the repo run `npm run storybook`. This step automatically scans and loads all stories. A new browser tab will open with the storybook interface. You can configure the storybook host url by updating the .env file in the root of the repo. This might be required if you're using a real device. When running in an emulator, the code tries to use the default network values.
- Then run the usual `npm run android` (or `npm run ios`) and `npm run start` commands
- Storybook has been integrated into the react-native-dev-menu. When the app is running in the emulator press CTRL+M or CMD+M to open the dev menu and select "Storybook". If running on a real device, shaking the device will bring up the react-native dev menu. You can also press d in the terminal where you ran npm run start to get the app running.
- The storybook interface will open in the mobile app. The stories can be controlled either through the desktop browser storybook UI or the mobile browser storybook UI. Both will render the component on the device.
*Ticket Link*
https://mattermost.atlassian.net/browse/MM-28845
*Device Information*
This PR was tested on:
Iphone 11 emulator running ios 13.7
Pixel 3XL emulator running Android 10
* MM-29948 Display error msg when pasting files and uploads are disabled
* Remove unnecessary ref and Animated.View
Co-authored-by: Miguel Alatzar <this.migbot@gmail.com>
* MM-28105 do not crash when in-app notification shows
* Use index.tsx to register the notification screen
* Fix notification e2e and some import cleanup
* Update iOS notification json
* e2e: Show the add reaction screen before receiving a notification
* Update snapshots
* Patch react-native-notifications to prevent iOS crash when opening
* Apply TM4J id
Co-authored-by: Joseph Baylon <joseph.baylon@mattermost.com>
* MM-28688 Close sidebar when current channel is selected
* Update snapshot
* Apply suggestions from code review
Co-authored-by: Joseph Baylon <joseph.baylon@mattermost.com>
* Fix iOS select_channel e2e and feedback review
Co-authored-by: Joseph Baylon <joseph.baylon@mattermost.com>
* [MM-22366] Make user autocomplete also match on spaces
* Move template string to fullName variable
* Add Detox E2E tests for user autocomplete
* Add TM4J IDs
Co-authored-by: Joseph Baylon <joseph.baylon@mattermost.com>
* Add test for keyword not associated with user
Co-authored-by: Joseph Baylon <joseph.baylon@mattermost.com>
* Use AppGroupId from Info.plists instead of hardcoded constant
* Update script, ci & Makefile
* Update Cocoapods to 1.9.3
* Split android builds using ABI filters
* Update Fastlane deps & build scripts
* Update CI to use latests scripts
* Display app version & build number in select server screen
* Make generate scripts compatible with node < 12
* Build scripts
* add build script to package.json
* Update to use bundler 2.1.4 and CI with Xcode 12
* Fix script name for build:ios-unsigned
* Fix RN iOS scripts
* Update CI pods-dependencies step
* Add pipefail to android executor
* Update Fastlane
* Fix type in postinstall script
* update android executor and set TERM
* Fix S3 bucket name variable
* Apply suggestions from code review
Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
* Fix master unit tests
* use requireActual in jest setup
* Jest setup to use react instead of React
Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
* MM-T3201 initial test purpose with detox
* MM-T3201 spaces and more comments
* MM_T3201 update snapshot tests to include test id
* MM-T3201 edit test ID to follow naming convention, PR fix
* MM-T3201 change comments to indicate if action or expect
* MM-T3201 add more testID to create buttons
* MM-T3201 adding trailing commas and testID
* MM-T3201 fix style
* MM-T3201 fix snaps test
* MM-T3201 fix conflicts with prior PR
* MM-T3201 using test dependent on platform to test button behaviour
* Update detox/e2e/test/channels/create_public_channel.e2e.js
Co-authored-by: Joseph Baylon <joseph.baylon@mattermost.com>
Co-authored-by: Joseph Baylon <joseph.baylon@mattermost.com>
* Automate MM-T3187
* Update the snapshots. Applied channel_item_display_name suggestion. Add verification for channels_list (to prove the testID works).
* Update testID. Move test to a new file under smoke test.
* Revert message_posting.e2e.js
* Applied suggestion from code review.
* Update detox/e2e/test/smoke_test/channels.e2e.js
Apply Saturnino's suggestion
Co-authored-by: Saturnino Abril <saturnino.abril@gmail.com>
Co-authored-by: Saturnino Abril <saturnino.abril@gmail.com>
* WIP: slash suggestion autocomplete
* WIP: patched styles a bit
* WIP: Adding styles
* Adding active state to autocomplete items
* Fixing style for channel mention item
* Fixing bugs + styling issues for Android
* Updating snapshot
* Fixing autocomplete to render on top of post draft
- Misc style fixes
* Renaming props, patching slash suggestion icon
* Fixing tests and lint errors
* Resolving post-merge issue with slash commands
* Fixing android positioning for autocomplete
* Fixing autocomplete not scrolling in edit_channel_info
* WIP: Fixing things according to UX Review
* UX Fixes to autocomplete
* Updating snapshots
* Updating snapshots, replacing slash-command icons
* Fixing android scrolling and positioning issues
* Fixing issues with date_suggestion not rendering
* Making use of the "ShowFullName" config in at_mention_item
* Removing top border on first autocomplete section
* Allowing autocomplete to be smaller than its maxWidth
* Fixing slash_suggestion padding
* removing "componentWillReceiveProps" from date_suggestion
* Changing edit_channel_info autocomplete offset
* Replacing toUpperCase() with textTransform: uppercase
* Fixing odd border issues + prop validation warning
* Restore section header background & add paddingBottom
* Patching up padding on channel mentions
- Reverting previous incorrect padding adjustments
* Removing inline 'completeSuggestion' function
* Removing brackets from style prop
* Improve empty state for Recent Mentions.
* Change backgroud color of icon.
* Improve empty states for flagged and pinned posts.
* Update pinned posts' test snapshot.
* Change NoResult style as per figma specs.
* Change NoResults icons according to UX specs.
* Change style according to UX feedback.
* Add word boundaries for (all | channel | here)
* do not include underscore in channel wide mention highlight
* Regex suggested in code review
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
* Restyle at_mention suffix
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
* [MM-15477] reorder search suggest results
* allow searching dms and gms with 'in:@'
* fix sort order for private before public
* faster than regex
* remove server minimum version prop and checks
* initial Detox setup for mobile UI automation
* fix iOS allow permission on opening the app, add npm script to root folder, fix test when using longer site URL and add detox dependency to root for android build dependency
* remove detox proguardFile
* update packages and emulator
* change folder build on local and CI
* add test to post a message, ability to have test in isolation, server API commands, server config, dependency updates and update folder structure
* update snapshot
* update detox and do clean up
* update dependencies
* MM-25684 Highlight at-mention followed by a period
* Refactor at_mention to not highlight the period
* Do not add a link for invalid mentions
* Suggested review
Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
* Handle group synced channel highlighting better
* Add tests
* Dont check if teamRoleFound if no teamId given for haveIChannelPermission
* Pass team id for channel mentions and group mentions checks
* Actually make a selector
* Check for falsey teamId instead of undefined
* Remove true &&
* Iterate over object values instead of for in
* updates to bage UI
* fixed spacing
* updated tests with npm test command
* fixed badge theme colors
* updated badge width to deal with larger mention counts
* updated tests
* fixed sizing issue
* fixed sizing issue & moved maxWidth to Badge layout
* added constants for badge maxWidth & adjusted badge position
* adjusted top position for badge on burger menu
* fixed last issue for max mentions positioning on burger menu badge
* Refactor post draft component
Re-styled ReadOnly channels
Remove filename from upload error
* Update canSubmit based on file attachment changes
* Fix error message for max file size
* Fix select autocomplete values on iOS
* Style readonly and refactor accessory view for iOS
* Make PostDraft scrollViewNativeID prop not required
* Update ReadOnly to have a background with 0.40 opacity
* Update max file size error message
* Fix shift+enter with HW keyboard
* Add popDismissToChannel
* Use popToRoot + dismissAllModals
* Just dismissAllModals and popToRoot
* Revert unnecessary changes
* Close permalink on popToRoot
* Emit after dismissAllModals and popToRoot