Commit Graph

1215 Commits

Author SHA1 Message Date
Luke Barnard f9ca2a8e59 Fix _renderCommaSeparatedList 2017-01-25 11:28:12 +00:00
Luke Barnard b887d5b823 Much linting 2017-01-25 11:05:45 +00:00
Luke Barnard 8091cf7df8 Enumerate->label 2017-01-25 09:32:28 +00:00
Luke Barnard f8e46819c5 Rename truncated->coalesced 2017-01-25 09:28:26 +00:00
Luke Barnard 3b8b2cf500 Document _getCanonicalTransitions 2017-01-25 09:18:47 +00:00
Luke Barnard bd106968ce Merge branch 'develop' into luke/fix-join-part-collapsing-causality
Conflicts:
	src/components/structures/MessagePanel.js
2017-01-24 14:22:18 +00:00
Luke Barnard d690677bde Merge branch 'luke/fix-join-part-collapsing-causality' of github.com:matrix-org/matrix-react-sdk into luke/fix-join-part-collapsing-causality
Conflicts:
	src/components/views/elements/MemberEventListSummary.js
2017-01-24 14:17:11 +00:00
David Baker 506d37bbad Merge remote-tracking branch 'origin/develop' into dbkr/add_searching_known_users 2017-01-23 11:34:44 +00:00
David Baker f64a4e0ecb Merge pull request #623 from matrix-org/dbkr/user_search_word_boundary
Make user search do a bit better on word boundary
2017-01-23 11:31:26 +00:00
Matthew Hodgson 937f13d578 fix a bunch of dark-theme buttons 2017-01-20 21:00:22 +00:00
David Baker 18d4d3392a Fix a bunch of linting errors
eslint --fix and a few manual ones
2017-01-20 14:22:27 +00:00
Richard van der Hoff 2d060c8d2e Fix error display in account deactivate dialog 2017-01-20 11:04:47 +00:00
Matthew Hodgson b76b0f755d fix context menu bg 2017-01-20 02:47:47 +00:00
David Baker afa384c4f3 Use null instead of false 2017-01-19 18:13:27 +00:00
David Baker a2ff1cd8e6 Factor out adding the input field to the list 2017-01-19 17:03:16 +00:00
David Baker ee1f6c772e Remove duplicate case handled above
And fix typo where it was handled
2017-01-19 16:50:09 +00:00
David Baker 2a08abaa95 Keep old behaviour of submitting on enter
if input is empty
2017-01-19 16:35:40 +00:00
David Baker d8bcc1f067 Merge remote-tracking branch 'origin/develop' into dbkr/sanitize_chatinvitedialog 2017-01-19 16:26:59 +00:00
Richard van der Hoff ba2460aef4 Merge pull request #618 from matrix-org/rav/async_dialog
Allow Modal to be used with async-loaded components
2017-01-19 16:08:30 +00:00
Kegsay 89fa47dc26 Merge pull request #622 from kyrias/commonmark-fix-escaping
Fix escaping markdown by rendering plaintext
2017-01-19 13:39:07 +00:00
David Baker 9e0c7a11d0 Merge pull request #628 from matrix-org/luke/feature-team-reg-auto-join-rooms
Implement auto-join rooms on registration
2017-01-19 11:44:37 +00:00
Johannes Löthberg 9c1c657a1e Markdown: delete remaining pre-split relics
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2017-01-19 11:55:36 +01:00
David Baker b58a67f6b1 Add more punctuation. Also s/let/const/ 2017-01-19 10:51:43 +00:00
David Baker 242f5e0301 PR feedback
* Doc & properly indent escapeRegExp
 * Add close bracket to the list of punctuation chars we search after
2017-01-19 10:24:21 +00:00
lukebarnard e06dd6e34a Implement auto-join rooms on registration
Also: This fixes registration with a team: only the email localpart was being used to register.

When a registration is successful, the user will be joined to rooms specified in the config.json teamsConfig:

"teamsConfig" : {
  "supportEmail": "support@riot.im",
  "teams": [
    {
      "name" : "matrix",
      "emailSuffix" : "matrix.org",
      "rooms" : [
        {
          "id" : "#irc_matrix:matrix.org",
          "autoJoin" : true
        }
      ]
    }
  ]
}

autoJoin can of course be set to false if the room should only be displayed on the (forthcoming) welcome page for each team, and not auto-joined.
2017-01-19 10:56:04 +01:00
David Baker 7b7728c93a Make behaviour of ChatInviteDialog more consistent
* Pressing enter now always adds whatever was in the input box
   to the invite list, if it's a valid address (previously it
   added it to the list of it was a search result but submitted
   the form straight away if there were no results).
 * Remove isValidAddress as it was only used in the context of
   testing whether its return value was true or null (where null
   meant "unsure") so just use getAddressType instead.
2017-01-18 18:32:38 +00:00
Johannes Löthberg 30bd01cdf2 Markdown: Split up render function into toHTML/toPlaintext
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2017-01-18 19:29:11 +01:00
David Baker f105ec2794 Attempt to sanitize ChatInviteDialog a bit
* Use binds rather than onFoo functions which aren't actually
   handler functions themselves but return them
 * Rename onKeyUp to moveSelectionDown etc,, reserving onKeyUp
   for "a key has been released" rather than, "the up arrow key
   has been pressed"
2017-01-18 17:51:39 +00:00
Matthew Hodgson a0bbe3a306 Merge branch 'develop' into matthew/postcss 2017-01-18 12:52:59 +00:00
Luke Barnard 5ef5204c8c Implement simple team-based registration (#620)
* Implement simple team-based registration

Config required goes in the `teams` top-level property in config.json. This consists of an array of team objects:
```json
{
  "name": "University of Bath",
  "emailSuffix": "bath.ac.uk"
}
```
These can be selected on registration and require a user to have a certain email address in order to register as part of a team. This is for vector-im/riot-web#2940. The next step would be sending users with emails matching the emailSuffix of a team to the correct welcome page as in vector-im/riot-web#2430.
2017-01-18 12:48:28 +01:00
lukebarnard 5dd1512ff2 Move aggregation code to dedicated function 2017-01-18 10:59:19 +01:00
lukebarnard 484549e50b Refactor a few things and document everything 2017-01-18 10:26:25 +01:00
Johannes Löthberg c819b433a2 Make old message composer use new markdown
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2017-01-17 20:37:27 +01:00
David Baker a87e7d6617 Make user search do a bit better on word boundary 2017-01-17 18:17:51 +00:00
lukebarnard 3ba9f50873 Move functions around, remove redundancies, add docs 2017-01-17 19:07:45 +01:00
lukebarnard 9574a0b663 Remove pointless length guard 2017-01-17 18:56:57 +01:00
Johannes Löthberg 893a5c971f Fix escaping markdown by rendering plaintext
We still need to parse "plaintext" messages through the markdown
renderer so that escappes are rendered properly.

Fixes vector-im/riot-web#2870.

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2017-01-17 16:23:58 +01:00
David Baker 0b67fd5b4e Add 'searching known users' to the user picker
So it's more obvious it's only finding people you've already seen

Fixes https://github.com/vector-im/riot-web/issues/2931
2017-01-17 14:48:50 +00:00
Matthew Hodgson a18d94099e switch to using <span/> for edit button 2017-01-17 14:11:15 +00:00
lukebarnard 45655f4de3 Modified desc for invitation rejections, withdrawals 2017-01-17 12:01:19 +01:00
lukebarnard aa6e168505 Remove comment 2017-01-16 18:58:53 +01:00
lukebarnard 5ab287fa1a Use pre-calculated displaynames to handle dupes 2017-01-16 18:57:49 +01:00
lukebarnard a79dc886ba Order sequences by occurance of the first event in each sequence 2017-01-16 18:46:17 +01:00
Richard van der Hoff ac22803ba0 Allow Modal to be used with async-loaded components
Add Modal.createDialogAsync, which can be used to display asynchronously-loaded
React components. Also make EncryptedEventDialog use it as a handy
demonstration.
2017-01-16 17:18:38 +00:00
lukebarnard 4be444d524 Move shouldComponentUpdate 2017-01-16 15:12:00 +01:00
lukebarnard 82d6805a71 Canonicalise certain transition pairs, handle arbitrary consecutive transitions
Transition pairs joined,left and left,joined are now transformed into single meta-transitions "joined_and_left" and "left_and_joined" respectively. These are described as "joined and left", "left and rejoined".

Treat consecutive sequences of transitions as repetitions, and handle any arbitrary repetitions of transitions:

...,joined,left,joined,left,joined,left,...

is canonicalised into
...,joined_and_left, joined_and_left, joined_and_left,...

which is truncated and described as
... , joined and left 3 times, ...

This also works if there are multiple consecutive sequences separated by other transitions:

..., banned, banned, banned, joined, unbanned, unbanned, unbanned,...

becomes
... was banned 3 times, joined, was unbanned 3 times ...
2017-01-16 14:49:07 +01:00
lukebarnard fb68fff536 Refactor renderCommaSeparated for reuse 2017-01-16 13:45:42 +01:00
Luke Barnard 77ae041407 Order names by order of first events for users 2017-01-13 16:40:33 +00:00
Kegan Dougal dcd0acb2b5 Review comments 2017-01-13 15:17:34 +00:00
Kegan Dougal e196cfaf91 Show the error dialog when requests to PUT power levels fail
This is why I dislike Q.
2017-01-13 14:51:01 +00:00