Commit graph

93 commits

Author SHA1 Message Date
Andre Vasconcelos
1413e66c36 GH-11948 Adding expand button to markdown tables (#3280)
* WIP: Adding expand button to markdown tables

* Moving padding to styleSheet
2019-10-08 18:55:08 -07:00
Matheus Cardoso
26b999e885 MM-17759 Add code highlighting (#3072)
* Add code highlighting

* Fix code style

* Add unit tests

* Some layout adjustments and code style fixes

* Fix failing test

* Fix typo

* Fixed import style

* Update snapshot

* Fix test

* Remove comment

* Add react-native-syntax-highlighter to NOTICE.txt

* Remove duplicated key

* Fix color issue on Android

* Remove unnecessary style

* Fix top spacing on Android

* Add missing trailing comma

* Revert highlighting in Android full-screen code

* Fix margins on android full-screen code

* Fix top padding on Android full-screen code

* Fix font size on Android full-screen code

* Improve top spacing on iOS full-screen code

* Update package-lock.json

* Update package-lock.json

* Update react-native-syntax-highlighter

* Revert away code highlighting on Android code block
2019-09-30 22:52:45 +08:00
Miguel Alatzar
459801d10b
[MM-17560] Await dismissAllModals and popToRoot prior to calling showSearchModal (#3298)
* Patch react-native-navigation

* Make navigation actions regular functions

* Fix unhandled promise rejection warning

* Missing semicolons

* Mock navigation actions

* Add unit tests for navigation actions

* Place all patches in patches directory

* Fix channel_info snapshot test
2019-09-25 15:23:45 -07:00
Elias Nahum
9975a19b91
MM-18236 Prevent the post menu from triggering when using the back gesture (#3319)
* MM-18236 Prevent the post menu from triggering when using the back gesture in the thread screen

* Update snapshots

* Update app/components/touchable_with_feedback/touchable_with_feedback.ios.js

Co-Authored-By: Miguel Alatzar <migbot@users.noreply.github.com>

* Update app/components/touchable_with_feedback/touchable_with_feedback.ios.js

Co-Authored-By: Miguel Alatzar <migbot@users.noreply.github.com>

* Update app/components/post/post.js

Co-Authored-By: Miguel Alatzar <migbot@users.noreply.github.com>

* Update app/components/touchable_with_feedback/touchable_with_feedback.ios.js

* Fix eslint
2019-09-26 00:19:49 +03:00
Miguel Alatzar
6cf6e51457 [MM-17709] Avoid async getSource (#3115)
* Await getSource

* Use server url from EphemeralStore

* Set currentServerUrl in getAppCredentials too
2019-08-14 16:07:12 +05:30
Elias Nahum
e87858d7af Various fixes (#3078)
* MM-17588 Remove navigation component from stack

* MM-175986 Fix Clock Display Settings on iOS

* Fix markdown and team icon currentServerUrl

* Fix closing permalink logs out the user

* Fix file attachment document ref

* Fix applyTheme when changing a theme in the app

* Feedback review

* remove / when fetching the image on the markdown table on relative paths
2019-08-08 22:28:07 +08:00
Miguel Alatzar
150253d392
[MM-16012] [MM-16084] Update screens related to settings sidebar + update SearchResultPost screen and its children (#2913)
* Update screens

* Update login tests

* Remove done

* Fix failing tests

* Update screens and components

* Check styles fix

* Update tests

* Prevent setState call after component unmounts

* Add empty setButtons func to dummy navigator

* Remove platform check

* Remove Platform import

* Update react-native-navigation version

* Add separate showModalOverCurrentContext function

* check-style fixes

* Remove overriding of AppDelegate's window

* Fix modal over current context animation

* Add showSearchModal navigation action

* Check-style fix

* Address review comments

* Update SettingsSidebar and children

* Update EditProfile screen

* Update SettingsSidebar

* Keep track of latest componentId to appear

* Track componentId in state to use in navigation actions

* Update FlaggedPosts and children

* Update RecentMentions

* Update Settings

* Store componentIds in ephemeral store

* Update AttachmentButton

* Remove unnecessary dismissModal

* Fix typo

* Check-style fix

* Address review comments
2019-06-24 12:52:08 -07:00
Elias Nahum
2abf044193
Show broken image for inline images without dimensions (#2868) 2019-06-06 15:14:32 -04:00
Elias Nahum
f36ee37402
Upgrade to RN 0.59.6 and dependencies (#2777)
* Upgrade to RN 0.59.6 and dependencies

* Remove channel loader unused style

* Update to the latest netInfo that fixes a crash

* Do not set default timezone with moment

* Use RN 0.59.8
2019-05-13 13:33:18 -04:00
Elias Nahum
a16c98b34e MM-15428 Return empty object for native managed configuration when not set (#2770) 2019-05-06 09:20:08 -07:00
Elias Nahum
6eeb830662
Use of cached managed config in components (#2758) 2019-05-01 18:34:09 -04:00
Harrison Healey
1173ca3d97
MM-14030 Don't show large gifs in posts (#2750)
* MM-14030 Don't show large gifs in posts

* Re-add default argument
2019-05-01 09:34:45 -04:00
Yusuke Nemoto
d852e0991f Support MinimumHashtagLength setting (#2583)
* Support MinimumHashtagLength setting

* Set default value if missing
2019-03-22 14:06:02 -03:00
Yusuke Nemoto
e1e1e7cf53 Highlight CJK mention keywords in sentense (#2590) 2019-03-07 22:04:10 +08:00
Saturnino Abril
8a4c6de86f
fix intermittent crash when selecting a link (#2620) 2019-03-05 02:28:40 +08:00
Saturnino Abril
f88c2e2a00
[MM-13295] Make channel link clickable for user who's not member of the public channel (#2466)
* Make channel link clickable for user who's not member of the public channel

* update per review

* update per comment

* remove setChannelDisplayName
2019-02-20 01:45:04 +08:00
Chris Duarte
ffe6b9e2ef Deep linking based on channel url; Fix merge conflicts (#2542)
Code cleanup
2019-02-14 13:29:57 -05:00
Dean Whillier
7eb434b256 [MM 13934] Prevent blank mention keys from crashing the app (#2570)
* don’t match blank word boundaries

* test for blank mention keys

* Check for blank mention before looking for match

* account for multiple spaces as a blank mention
2019-02-13 15:05:52 -08:00
Elias Nahum
3db8604102 Add support for relative permalinks (#2555) 2019-02-08 22:54:26 +08:00
Harrison Healey
ff51501b0c
MM-11232 Fix table column width to better support wide tables (#2467)
* MM-11232 Fix table column width to better support wide tables

* Fix horizontal scrolling on Android
2019-01-07 13:53:04 -05:00
Elias Nahum
19f261a768
Fix copy markdown link (#2449) 2018-12-12 09:36:06 -03:00
Elias Nahum
736a955be8
Use post metadata to prevent scroll pop (#2304)
* Use post metadata to prevent scroll pop

* Fix not to fetch for reactions every time

* Update post-metadata mm-redux ref

* Update mattermost-redux to include post-metadata
2018-11-22 19:47:27 -03:00
Saturnino Abril
d8abeabd70 [MM-12353] Add feature to render jumbo emoji and unwrapped Emoji component with Text when rendering message containing emoji/s only (#2356)
* add feature to render jumbo emoji/s

* fix bottom clipping of emoji on Android

* updated per feedback
2018-11-22 11:56:27 -05:00
Elias Nahum
68a3825d95
Update dependencies (#2316) 2018-11-18 17:54:06 -03:00
Elias Nahum
ae629a455c
Update UX for post long press menu (#2325)
* Update UX for post long press menu

* Post menu feedback review
2018-11-14 17:29:09 -03:00
Chetanya Kandhari
68eff30eda [#MM-12410] Custom Terms of Service (#2234)
* [#MM-12410] Custom Terms of Service Modal.

- Create a new screen for terms of service
- Register it in app navigation
- Open it as a modal when login succeeds or app is opened when already logged in.
- Get terms of service and render it as markdown

* Refactor service terms to terms of service

* Show terms modal when launching channel instead of componentDidMount

* Remove footer text

* Close modal before logging out

* Use dismissAllModals instead od this.close

* Update header styles

* Update the back icon

* Add left icon conditinally based on os

* Update en.json

* - Integrate Accept/Reject API
- Refactor show navigator to util
- Remove title
- Code refactoring

* Handle Accept/Reject API errors

* Update package-lock

* - Show Alert to handle API error
- Handle API error for GetTerms error, Accept/Reject error and Reject success
- Changes in en.json
- Remove error banner
- Open terms modal in sso and experimental certificate

* Enable navigator buttons after getting terms

* Rename Ok to OK in Alert

* Add retry for API error

* Fix check-style

* Fix FailedNetworkAction Error Message

* - Use Close button instead of back button
- Update en.json

* Remove unused import

* Disable hashtags and atmentions in terms modal

* Enable close button when terms text fails to load

* Minor changes

* Fix show terms on sso login

* Handle restartApp event

* Add test cases

* Revert change to app/components/formatted_markdown_text.js

* Show the terms modal on the channel page

* Remove remaining references to showTermsOfService

* Disable Hashtags, AtMentions and ChannelLinks

* Update the props to markdown component

* Pass the text as literal to renderText

* Return the generated renderTexts

* Fix lint

* Render ~, #, @ with Channel link, Hashtags and At Mentions

* Fix failing tests
Revert unwanted changes

* Hide the channel page content before the terms are accepted

* Fix lint and failing tests

* Revert changes to hide channel while terms are not accepted

* Open modal in componentDidMount instead of constructor
Code refactoring
Disable back button on android

* Remove unused import

* No need to await for showModal

* No need to await for accept and reject

* Update flag for updateTermsOfServiceStatus to updateMyTermsOfServiceStatus
- as phase 2 redux PR was mered.

* Fix check-style

* Change opacity in terms of service text

- Fix tests

* Revert package-lock.json changes
2018-11-14 11:36:45 -03:00
Harrison Healey
9727476ef6 MM-12901 Improve handling of hashtags on Recent Mentions, Flagged Posts, and Permalink screens (#2329)
* MM-12901 Create showSearchModal action and use for hashtags

* MM-12901 Improve handling of hashtags on Recent Mentions, Flagged Posts, and Permalink screens
2018-11-09 20:43:22 -03:00
Elias Nahum
e25a1939fc
Set the file prefix in image_cache_manager (#2313) 2018-11-05 15:24:30 -03:00
Harrison Healey
a042cd043e
MM-12880 Properly link the next sibling following a combined text node (#2307) 2018-11-05 10:23:27 -05:00
Harrison Healey
78e5b99884
MM-5957 Add mention highlighting on mobile (#2277)
* Switch pullOutImages to use a NodeWalker

* Add markdown transformer to combine adjacent text nodes

* MM-5957 Add mention highlighting on mobile
2018-10-18 14:12:25 -04:00
Saturnino Abril
dd506d4c9f
fix issue that blocks adding test for thread screen (#2221) 2018-10-05 14:46:21 +08:00
Christopher Speller
cd38d8690f Switching broken image error text to icon. (#2156) 2018-09-28 10:28:40 +08:00
Saturnino Abril
63196936d0
MM-12258 Update snapshots to only compare against the elements and not the bloated objects (#2140)
* update snapshots to only compare against the elements and not the bloated objects

* resolve conflicts to master
2018-09-21 16:07:37 +08:00
Elias Nahum
637ca9244a
Update RN to version 0.57.0 (#2131) 2018-09-20 19:05:41 -03:00
Saturnino Abril
b75aa36554 Fix build error on Hashtag component (#2134)
* fix build error on Hashtag component

* update commonmark-react-renderer
2018-09-18 12:27:41 -03:00
Harrison Healey
ecf25969cc Fix version of commonmark-react-renderer in package.json (#2136)
* Fix version of commonmark-react-renderer in package.json
2018-09-18 20:37:49 +05:30
Harrison Healey
578f204784 MM-10273 Add hashtag support (#2106)
* MM-10273 Add hashtag support

* Put hashtag search in a proper modal

* Change hashtag search style to match regular search

* Move Hashtag component and explicitly pass props

* Add unit tests for Hashtag component

* Fix merge conflict
2018-09-17 17:17:20 -03:00
Elias Nahum
b096ea0a03
Fix iOS tap on post (#2095) 2018-09-11 08:31:42 -03:00
Chris Duarte
26950abb61 Add deep linking support (#1805) 2018-07-31 08:43:54 -04:00
Elias Nahum
b47c7db4dc
Fix cropped images (#1936)
* Fix cropped images

* Unit tests
2018-07-20 13:34:46 -04:00
Harrison Healey
da8b5e92cc MM-10012 Added Markdown rendering to expanded announcement banner (#1861)
* MM-10012 Added Markdown rendering to expanded announcement banner

* Updated snapshots

* Re-added dismiss button to expanded announcement banner

* Updated 'Don't show again' button style'
2018-07-04 13:15:03 -04:00
Harrison Healey
14e13dd6b6
MM-10325 Add cell alignment to markdown tables (#1791) 2018-06-25 12:17:36 -04:00
Jesse Hallam
8372e95d4a add eslint-plugin-header, and --fix all (#1726) 2018-06-19 19:14:50 -04:00
Harrison Healey
787a46737c Fixed dev-mode error relating to adjacent images (#1731) 2018-06-08 14:16:48 -04:00
Elias Nahum
4841678213 Fix inline images in long posts (#1732) 2018-06-07 03:36:50 +08:00
Harrison Healey
861b46d605
MM-9547 Added CustomUrlSchemes option (#1718)
* MM-9547 Added CustomUrlSchemes option

* Switched mattermost-redux back to master
2018-06-04 10:25:34 -04:00
Harrison Healey
29d015bd32 Fixed Markdown links when SiteURL isn't configured (#1650) 2018-05-03 21:08:36 +08:00
Saturnino Abril
8a152ac1e7 convert test runner from mocha to jest (#1637) 2018-04-30 10:55:01 -04:00
Elias Nahum
006c5a08d7
Use local Images when possible (#1580)
* Fix advance settings android layout

* include react-native-image-gallery dependency

* ImageCacheManager

* Add support for isGif, isDocument, isVideo and purge to file utils

* Remove file fetch cache

* include progressive image component

* Refactor image previewer

* Add image preview support for open graph and embed images

* Cache user profile picture

* Fix post additional content images for android

* Preview markdown inline images

* Improve progressive image

* feedback review
2018-04-13 12:23:15 -03:00
Harrison Healey
1fd94c5ae0 Cherry pick fixes for Sentry issues (#1567)
* Fixed MATTERMOST-MOBILE-ANDROID-85 (#1565)

* Fixed MATTERMOST-MOBILE-ANDROID-87 (#1566)
2018-04-02 23:23:48 +03:00