Commit Graph

37 Commits

Author SHA1 Message Date
Harrison Healey
581bd8637f Revert "[GH-5915] Clicking on @mention of a user in a post shows the profile popover (#6129)" (#6289)
This reverts commit 83f819451a.
2017-05-01 17:40:54 -04:00
Saturnino Abril
83f819451a [GH-5915] Clicking on @mention of a user in a post shows the profile popover (#6129)
* post message at-mention profile pop-over

* remove hover effect to special mentions

* make non-clickable the non-existing at-mention username

* fix "video call" position

* use usernameMap instead of initially defined liteUsernameMap

* update per comments
2017-05-01 10:08:54 -04:00
Harrison Healey
fb6f2a123c PLT-5860 Updated copyright date (#6058)
* PLT-5860 Updated copyright date in about modal

* PLT-5860 Updated copyright notice in JSX files

* PLT-5860 Updated copyright notice in go files

* Fixed misc copyright dates

* Fixed component snapshots
2017-04-12 08:27:57 -04:00
Harrison Healey
579ad305e1 PLT-5722 Fix formatText to fail gracefully when input is not text (#5670)
* Updated marked to remove incorrect error message

* Fix formatText to fail gracefully when input is not text
2017-03-06 21:20:29 -05:00
Harrison Healey
daef8d8384 Added a unique prefix to text formatting entities (#5549) 2017-02-28 22:21:10 -03:00
George Goldberg
96697c8cf7 PLT-4821 Fix highlighting of wildcard search terms. (#4976) 2017-01-06 08:54:38 -05:00
George Goldberg
c3f60d7ced PLT-4791 Fix hashtag highlight in search results. (#4977) 2017-01-06 08:54:31 -05:00
Hyeseong Kim
2abcc25173 PLT-2077 Support CJK hashtags (#4555)
* Add Korean character ranges to exist CJK pattern

* Add constant for CJK hashtags
Becuase most of keywords in CJK are two characters

* Add CJK ranges to hashtag pattern to handle it.

* Fixes hashtag pattern to apply numbers at last

* Remove a wrong test case
`test_` shouldn't be a hashtag

* Fix hashtag regex to support standard unicodes

* Remove wrong escapes from regex
2016-11-24 09:38:56 -05:00
Christopher Speller
a798714958 Updating eslint (#4573) 2016-11-17 12:02:16 -05:00
George Goldberg
4476adf131 Channel link marker changed from ! to ~ (#4433)
Fixes PLT-4570
2016-11-03 15:26:00 -04:00
Harrison Healey
a7e5837178 PLT-4454 Autolink anything that looks like an at mention (#4416)
* PLT-4454 Added autolinking for anything that looks like an at mention

* PLT-4454 Added unit tests for at mention autolinking
2016-11-01 14:58:44 -07:00
George Goldberg
29a3706ec3 PLT-4307 - fix !channel link hrefs. (#4122)
* PLT-4307 - fix !channel link hrefs.

* Fix style.
2016-09-30 10:19:00 -03:00
Christopher Speller
93f2b6a833 Updating ESLint (#4085) 2016-09-23 12:29:54 -04:00
Christopher Speller
214f9c13a2 Updating client dependancies (#4083) 2016-09-23 10:22:35 -04:00
Harrison Healey
e455bee39f PLT-4096 Fixed highlighting of hashtags in search (#4043)
* PLT-4096 Fixed highlighting of hashtags in search

* Added unit tests for hashtag rendering on the client
2016-09-20 11:59:42 -04:00
George Goldberg
8443ca5828 PLT-1759 - Auto-complete for !channels when posting messages. (#3890)
* Auto-complete for !channels when posting messages.

This is part 1 of the fix for PLT-1759 to make channels linkable.

Still to do:
- Make the !channels clickable when they appear in messages. This is
  blocked until PR #3865 is resolved as it looks like that refactors
  some of the code that would be touched by making this change.

- Unit tests. Again, I think the above referenced PR should be merged
  before tackling this.

* Fix style problems.

* Highlighting of !channel-names in messages.

This only identifies the !channel-name (not the display name). The
implementation of the auto-complete on channel names now needs to be
modified to convert to the channel handle before sending the message.

* Display !channel-name as !Display Name.

When we encounter !channel-name in a message, display it as a link using
the channel's actual name rather than it's handle (name).

* Match on names and display name, and use name.

* Autocomplete channels matching on both the name and the the display
  name.
* Use the name as the text we fill in instead of the display name. It's
  potentially a bit ugly, but it minimises complexity for now as
  otherwise we'd have to do complicated things to the message box.

* Fix style issues.

* Load more channels everywhere.

Whenever we load the list of channels, we should also load the list of
more channels. This is to enable auto-completing and auto-linking of all
channels whether or not the user is in them currently.

* Include more channels in the map for linking.

* Listen for channel list updates for autolinking.

* Remove accidental console.log.

* Autocomplete on more channels too.

* i18n for channel autocomplete.

* Link directly to channels in !channel mentions.

This currently does not work if you aren't a member of that channel.
Need to decide what the correct behaviour is in that case.

* Fix style issues.

* Show channel name and handle in suggestion.

* Match channels only at start or after space.

* Better matching in text-formatting.

Only match channels after a space-type character or at the start in the
posts list too.

* Move the route construction to make tests work.

Moves route-construction out of text_formatting.jsx and into utils.jsx
so that the unit tests work once again.
2016-09-19 08:21:22 -04:00
Harrison Healey
167dd22eef PLT-1752/PLT-3567/PLT-3998 Highlighting links in search, unit tests for autolinking (#3865)
* Added highlighting to links when their URL includes the search term

* Decoupling UserStore from react-router to allow for unit tests involving it

* PLT-3998 Added SiteURL as an option to be passed into the text formatting code

* Removed reference to PreferenceStore and window from TextFormatting

* Refactored TextFormatting to remove remaining browser-only code

* Updated ChannelHeader and MessageWrapper to match the changes to TextFormatting

* Increased max listeners for Preference and Emoji stores

* PLT-3832 Added automated unit tests for autolinking

* PLT-3567 Rerender posts when mention keywords change

* Updated RHS and search to match the changes to TextFormatting

* Broke TextFormatting's dependency on the UserStore
2016-08-29 09:50:00 -04:00
Harrison Healey
c0a905c037 PLT-1424 Added XRegExp library to fix search highlighting (#3787) 2016-08-12 07:49:19 -04:00
Harrison Healey
c79685b0bc PLT-3534 Changed special handling of internal links to only occur for permalinks and links to channels (#3731) 2016-08-03 18:28:38 -05:00
Joram Wilander
bfa04c0ab0 PLT-2408 Adds here mention for online users (#3619)
* Added @here mention that notifies online users

* Fixed existing race condition that would sometime cause clients to miss mention count changes

* Added missing localization strings

* Prevent @here from mentioning the user who posted it
2016-07-21 10:00:09 -04:00
Harrison Healey
7c34ea9b8c Highlight hashtags containing search text (#3568) 2016-07-13 09:00:28 -08:00
Harrison Healey
dc2f2a8001 PLT-3145 Custom Emojis (#3381)
* Reorganized Backstage code to use a view controller and separated it from integrations code

* Renamed InstalledIntegrations component to BackstageList

* Added EmojiList page

* Added AddEmoji page

* Added custom emoji to autocomplete and text formatter

* Moved system emoji to EmojiStore

* Stopped trying to get emoji before logging in

* Rerender posts when emojis change

* Fixed submit handler on backstage pages to properly support enter

* Removed debugging code

* Updated javascript driver

* Fixed unit tests

* Fixed backstage routes

* Added clientside validation to prevent users from creating an emoji with the same name as a system one

* Fixed AddEmoji page to properly redirect when an emoji is created successfully

* Fixed updating emoji list when an emoji is deleted

* Added type prop to BackstageList to properly support using a table for the list

* Added help text to EmojiList

* Fixed backstage on smaller screen sizes

* Disable custom emoji by default

* Improved restrictions on creating emojis

* Fixed non-admin users seeing the option to delete each other's emojis

* Fixing gofmt

* Fixed emoji unit tests

* Fixed trying to get emoji from the server when it's disabled
2016-07-05 11:58:18 -04:00
Harrison Healey
459eee85a9 PLT-3269 Moved formatting toggle behind EnableDeveloper setting (#3402)
* Force formatting to be enabled if testing is disabled

* Moved formatting toggle behind EnableDeveloper setting
2016-06-27 08:16:01 -04:00
Harrison Healey
6b22a8e816 PLT-3211 Fixed search highlighting for hashtags starting with "#in", "#from", or "#channel" (#3400)
* Fixed clicking hashtags/@mentions adding a # to the url

* Updated punctuation trimming regex for searching to better match the server

* Fixed search term splitting to not break up hashtags starting with a search flag (in, from, etc)
2016-06-22 18:32:59 -04:00
Christopher Speller
14510ce194 Adding webpack code splitting (#3377) 2016-06-22 10:30:01 -04:00
Harrison Healey
5f7ce2214a Improved internal links which use react-router (#3180) 2016-06-01 08:52:28 -04:00
Harrison Healey
6e6257fcca Removed unnecessary wbrs (#3182) 2016-05-31 16:11:23 -04:00
Harrison Healey
4a326dd6ce PLT-1626/PLT-1424/PLT-1473/PLT-1483 Improved search highlighting (#3171)
* PLT-1626 Stopped breaking up hyphenated hashtags when highlighting search terms

* Made hashtag search highlighting case independent

* PLT-1424 Improved search highlighting when searching for CJK characters

* PLT-1473 Added search term highlighting to single-line code blocks

* PLT-1473 Added search term highlighting to code blocks that don't use syntax highlighting

* PLT-1483 Added proper highlighting of at mentions

* Fixing formatting
2016-05-31 10:37:59 -04:00
Harrison Healey
fe5db12374 PLT-3080 Added ability to disable formatting for debugging and updated marked to fix errors (#3141)
* Removed injectIntl from user_settings_advanced.jsx

* Added setting to disable formatting for debugging

* Updated fork of marked
2016-05-30 07:57:44 -04:00
samogot
e1bebb2d77 PLT-2321 Move the toggle icon next to the link being previewed (#3071)
* PLT-2321 Move the toggle icon next to the link being previewed
only applicable to one-line messages started with link

* remove useless "Youtube" header when no title is available

* allow breaking long links instead of toggle

* simplify "/" to "/<wbr />" replacing
fix empty post without additional content body

* discard buggy "simplification"
2016-05-27 19:31:02 -04:00
Christopher Speller
4b260b761a Updating client dependancies and ESLint (#2954)
* Updating client dependancies

* Fixing eslint errors with updates

* Updating eslint
2016-05-12 07:50:53 -04:00
Harrison Healey
761f59645d PLT-2816 Fixed handling of Unicode 8 emojis (#2924)
* Updated twemoji to properly recognize Unicode 8.0 emojis

* Updated unicode emoji parser to only render emojis we support as images

* Corrected filename for South African flag emoji

* Added Mattermost emoticons!

* Added additional emoticons to test files
2016-05-09 00:17:26 -07:00
Harrison Healey
ed3162a59d Moved twemoji parsing so that it doesn't occur inside of code blocks (#2896) 2016-05-05 12:35:01 -07:00
Harrison Healey
d8df66c00c Fixed updating mention keys when a user's username changes (#2774) 2016-04-25 08:20:45 -04:00
Harrison Healey
f73daebb61 PLT-1236 Added special handling for markdown links within mattermost (#2763)
* Added special handling for markdown links within mattermost

* Moved application of .app__body class to route components
2016-04-22 11:52:44 -07:00
Harrison Healey
f8ac97fb22 Changed mention parser to ignore empty string mentions 2016-03-17 10:33:06 -04:00
Christopher Speller
12896bd23e Converting to Webpack. Stage 1. 2016-03-16 18:02:55 -04:00