Michael Telatynski
b243004a6c
Switch to createReactClass: *everything else*. React 16 :D
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-09-06 18:38:11 +01:00
Michael Telatynski
d5db67be38
Switch to createReactClass: views/elements & views/groups. React 16 :D
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-09-06 18:35:52 +01:00
Michael Telatynski
13258132e7
Merge pull request #3400 from matrix-org/t3chguy/react16_9
...
Switch to createReactClass: views/rooms and test/components. React 16 :D
2019-09-06 18:18:32 +01:00
Bruno Windels
48247e66be
use underscore for italics so it doesn't collide with bold when toggling
2019-09-06 17:52:37 +02:00
Bruno Windels
fe482258ac
Merge pull request #3402 from matrix-org/bwindels/cider-toggle-inline-formatting
...
New composer: support toggling inline formatting
2019-09-06 14:42:16 +00:00
Bruno Windels
14fff3be9a
Merge pull request #3399 from matrix-org/bwindels/fix-formatbar-edit-position
...
Fix format bar not appearing in edit composer
2019-09-06 14:28:23 +00:00
Bruno Windels
26bd694c6a
support toggling inline formatting
2019-09-06 16:25:55 +02:00
J. Ryan Stinnett
3ad88604cc
Stregthen bound 3PID warning dialog
...
This tweaks the bound 3PID text and adds danger styling.
Fixes https://github.com/vector-im/riot-web/issues/10750
2019-09-06 15:18:01 +01:00
Michael Telatynski
70ff2bc9cd
Switch to createReactClass: views/rooms and test/components. React 16 :D
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-09-06 15:04:46 +01:00
Bruno Windels
4e98721ba9
take bounding box for positioning calculation
2019-09-06 15:56:46 +02:00
J. Ryan Stinnett
5fddb20d86
Stop setting IS input field on account change
...
This stops setting a value in the IS input on account change. While it may have
been marginally useful if you have the form open and change on a different
device, it also seems to pick up changes on the current device, leading to
strange UX locally.
Fixes https://github.com/vector-im/riot-web/issues/10756
Fixes https://github.com/vector-im/riot-web/issues/10757
2019-09-06 14:33:40 +01:00
Michael Telatynski
4db8ef4d89
Correct case of propTypes property in ES6 React Components. React 16
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-09-06 14:27:33 +01:00
J. Ryan Stinnett
11a5fca702
Remove logs
2019-09-06 13:44:44 +01:00
J. Ryan Stinnett
df03477907
Show change warning only when different from current
2019-09-06 11:54:08 +01:00
J. Ryan Stinnett
19fff51b01
Rework handling for terms CORS error
...
Earlier changes in this branch removed the "next step" of saving from the
dialogs, so we need to fold in the CORS error case.
2019-09-06 11:12:10 +01:00
Bruno Windels
dd1c01068f
fix rename that didn't make it through rebasing
2019-09-06 11:58:27 +02:00
J. Ryan Stinnett
2ff592c542
Use existing modal promises
2019-09-06 10:48:24 +01:00
Bruno Windels
5014b606db
Merge pull request #3391 from matrix-org/bwindels/cider-format-history
...
New composer: ensure undo history is persisted before applying formatting
2019-09-06 09:28:18 +00:00
Bruno Windels
df4762871a
Merge pull request #3392 from matrix-org/bwindels/cider-paste-plain
...
New composer: fix pasting from word processors
2019-09-06 09:22:37 +00:00
Bruno Windels
6b104f6344
Merge pull request #3393 from matrix-org/bwindels/cider-fix-lastcaret
...
New composer: fix needing to push arrow-up twice after sending first message after switching to a room
2019-09-06 09:22:10 +00:00
Bruno Windels
9dac91a70d
ensure step before formatting is persisted in undo history
2019-09-06 11:20:24 +02:00
Bruno Windels
0252c7ae37
force pasting as plain text in new composer
2019-09-06 11:10:41 +02:00
Bruno Windels
2596281a7c
update last caret from update callback instead of input event
...
many editor updates are not caused by an input event, so
the last caret wasn't always up to date.
Updating the caret from the update callback ensures that every
time the editor contents is changed, the last caret is updated.
2019-09-06 11:09:01 +02:00
Bruno Windels
f4938f9d11
dont format empty ranges
2019-09-06 10:59:41 +02:00
Bruno Windels
06143ba7a1
show keyboard shortcuts in format button tooltip
2019-09-06 10:59:41 +02:00
Bruno Windels
bdcea6f21e
add shortcuts for formatting
2019-09-06 10:59:41 +02:00
Bruno Windels
d6a493a2b1
fixup: language strings moved
2019-09-06 10:39:19 +02:00
Bruno Windels
b4b9c7d072
Add tooltip for format buttons
2019-09-06 10:39:19 +02:00
Bruno Windels
da29057fd8
move format bar to own component
2019-09-06 10:39:19 +02:00
Bruno Windels
02681d50b9
Merge pull request #3386 from matrix-org/bwindels/cider-formatbar
...
New composer: show format bar on selection
2019-09-06 08:38:01 +00:00
Bruno Windels
92c0c1a4e2
add comment about positioning the format bar
2019-09-06 10:29:18 +02:00
Bruno Windels
d2949babcd
copyright is solely assigned to matrix foundation now, copy paste error
2019-09-06 10:29:12 +02:00
Travis Ralston
af35cdc2ea
Support sending hidden read receipts
...
Fixes https://github.com/vector-im/riot-web/issues/2527
2019-09-05 20:30:19 -06:00
J. Ryan Stinnett
d5552e4a17
Add bound 3PID warning when changing IS as well
...
This extends the bound 3PID warning from the disconnect button to also appear
when changing the IS as well. At the moment, the text is a bit terse, but will
be improved separately.
Fixes https://github.com/vector-im/riot-web/issues/10749
2019-09-05 17:52:46 +01:00
Bruno Windels
124b7135cd
make sure the update callback gets a caret when calling reset
2019-09-05 17:54:08 +02:00
J. Ryan Stinnett
46ee52a406
Merge pull request #3388 from matrix-org/jryans/bound-3pids-warning
...
Add new agreed URLs to account data instead of overwriting
2019-09-05 15:02:15 +01:00
Travis Ralston
26eb617bec
Merge pull request #3384 from matrix-org/travis/fix-pl
...
Fix member power levels in room settings
2019-09-05 07:16:52 -06:00
J. Ryan Stinnett
0929a9cc72
Add new agreed URLs to account data instead of overwriting
...
This changes terms account data storage to always add, rather than setting only
the current set of displayed URLs.
Fixes https://github.com/vector-im/riot-web/issues/10755
2019-09-05 13:38:32 +01:00
Bruno Windels
4ef9fa53ac
better i18n
2019-09-05 11:10:13 +02:00
Travis Ralston
d6adf0fd6d
Add responsible error handling because we're responsible people
2019-09-04 11:24:31 -06:00
Bruno Windels
2ea556e0b4
support update callback setting selection instead of caret
2019-09-04 16:40:34 +02:00
Bruno Windels
037ac29c57
be more forgiving with offset that don't have atNodeEnd=true
...
if index is not found, it means the last position should be returned
if there is any.
We still return -1 for empty documents, as index should always point
to a valid part if positive.
2019-09-04 16:40:34 +02:00
Bruno Windels
42c37d8293
fixup: improve quote and code block newline handling
2019-09-04 16:40:34 +02:00
Bruno Windels
e0668e8517
improve algorithm to reduce selection to text node + charactar offset
...
this follows the documentation of {focus|anchor}{Offset|Node} better
and was causing problems for creating ranges from the document selection
when doing ctrl+A in firefox as the anchorNode/Offset was expressed
as childNodes from the editor root.
2019-09-04 16:40:34 +02:00
Bruno Windels
4691108a16
only increase offset if caret hasn't been found yet
...
also rename caret away as this isn't used for the caret solely anymore
2019-09-04 16:40:34 +02:00
Bruno Windels
7a01d1407f
make _replaceRange internal only
2019-09-04 16:40:34 +02:00
Bruno Windels
4c04bc19c9
fixup: remove now unused import
2019-09-04 16:40:34 +02:00
Bruno Windels
6e694c113a
add support for inline/block code formatting
2019-09-04 16:40:34 +02:00
Bruno Windels
b35a3531bb
move quote formatting out of react component
2019-09-04 16:40:34 +02:00
Bruno Windels
b72d1a78ec
move inline formatting code out of react component
2019-09-04 16:40:34 +02:00
Bruno Windels
47d8d86bbe
whitespace (in model)
2019-09-04 16:40:23 +02:00
Bruno Windels
7f501b2aef
first impl of quote formatting
2019-09-04 16:40:13 +02:00
Bruno Windels
d4c7992f5a
first impl of inline formatting
2019-09-04 16:39:56 +02:00
Bruno Windels
c15dfc3c05
make Range start and end public
2019-09-04 16:38:42 +02:00
Bruno Windels
7dc39baaf3
implement bold support in format bar
2019-09-04 16:35:03 +02:00
Bruno Windels
77b14beb1f
add getter for intersecting parts of range, and total length
...
we'll need this when replacing selection, to preserve
newlines, etc ... in the selected range (e.g. we can't just
use range.text).
2019-09-04 16:35:03 +02:00
Bruno Windels
48f1bf1816
sort positions in Range constructor, so start always comes before end
2019-09-04 16:35:03 +02:00
Bruno Windels
65ddfc0a50
show format bar when text is selected
2019-09-04 16:35:03 +02:00
Bruno Windels
4575aaa9f6
Merge pull request #3382 from matrix-org/bwindels/escape-command-slash
...
New composer: allow escaping the first slash to not write a command
2019-09-03 16:04:23 +00:00
Bruno Windels
9a409a7acc
Merge pull request #3381 from matrix-org/bwindels/plain-command
...
/plain command to bypass markdown conversion
2019-09-03 16:04:07 +00:00
J. Ryan Stinnett
3cb06c01b7
Merge pull request #3385 from matrix-org/jryans/email-invite-text
...
Improve email invite preview messaging
2019-09-03 16:58:14 +01:00
J. Ryan Stinnett
261bdab156
Fix indent
2019-09-03 16:55:17 +01:00
J. Ryan Stinnett
67299842e3
Use more specific messaging for email invite preview
...
This changes email invite previews to check more specific cases about whether
the email has been added to your account, you have an IS, the email is bound,
etc.
In addition, it always allows you to join if you want to.
Fixes https://github.com/vector-im/riot-web/issues/10669
2019-09-03 15:41:53 +01:00
Travis Ralston
2e3e2ec420
Fix member power levels in room settings
...
Fixes https://github.com/vector-im/riot-web/issues/10736
We didn't have an onChange property on the PowerSelector component
2019-09-03 08:36:24 -06:00
Bruno Windels
0d02ab59d6
allow starting a range with both positions known already
...
we'll need this to start a range for the selection
2019-09-03 16:00:50 +02:00
Bruno Windels
eb87301855
allow getting the DocumentOffset for any node+offset, not just focusNode
...
we need this to get both offsets of the selection boundaries
getSelectionOffsetAndText offers the extra flexibility,
getCaretOffsetAndText keeps the old api for focusNode/focusOffset
Also did some renaming here now that it's not just for the caret anymore
2019-09-03 15:58:50 +02:00
Bruno Windels
648ae37ff4
make DocumentOffset compatible with what is returned from dom/getCaret
...
so we can return a DocumentOffset from there without breakage
2019-09-03 15:58:05 +02:00
Bruno Windels
1063da0ed1
Revert "New composer: show markdown legend on focus"
2019-09-03 08:27:45 +00:00
Travis Ralston
71e13842b8
Merge pull request #3368 from matrix-org/travis/disable-msisdn
...
Disable MSISDN registration if the homeserver doesn't support it
2019-09-02 11:25:17 -06:00
Travis Ralston
5e8eb20c53
Merge pull request #3371 from matrix-org/travis/synapse_admin
...
Add a button to MemberInfo to deactivate a user
2019-09-02 11:08:45 -06:00
Bruno Windels
06ae0645c7
fix lint
2019-09-02 17:56:16 +02:00
Bruno Windels
712c3e5450
allow escaping the first slash to not write a command
2019-09-02 17:53:14 +02:00
Bruno Windels
41ca54bb09
/plain command to bypass markdown conversion
2019-09-02 17:44:31 +02:00
Bruno Windels
422f482a6d
Merge pull request #3378 from matrix-org/bwindels/cider-md-legend
...
New composer: show markdown legend on focus
2019-09-02 14:59:44 +00:00
Bruno Windels
de9f923e36
Merge pull request #3380 from matrix-org/bwindels/cider-fix-dirty-flag-without-input-event
...
New composer: allow submitting after inserting newline
2019-09-02 14:59:18 +00:00
Bruno Windels
6a0842d1ab
Merge pull request #3379 from matrix-org/bwindels/cider-deserialize-headers
...
Message editing: deserialize headers from html back to markdown
2019-09-02 14:58:54 +00:00
Bruno Windels
c4d7df768d
Merge pull request #3375 from matrix-org/bwindels/cider-colononmention
...
New composer: share user pill postfix between autocomplete and insert mention
2019-09-02 14:58:23 +00:00
Bruno Windels
ff74dd4b7f
Merge pull request #3374 from matrix-org/bwindels/fix-cider-command-detection
...
New composer: make command detection not break with pill candidates in command
2019-09-02 14:58:12 +00:00
Bruno Windels
eaed07fcbf
Merge pull request #3377 from matrix-org/bwindels/cider-noemptymsg
...
New composer: dont allow sending empty messages
2019-09-02 14:57:41 +00:00
J. Ryan Stinnett
00a69b996d
Clarify invite error text
...
This fixes a typo in the message (valide) and also has better handling of error
codes, because in some cases, we don't get one.
Fixes https://github.com/vector-im/riot-web/issues/10683
2019-09-02 15:53:13 +01:00
Bruno Windels
6163cefa6a
set dirty flag when programatically inserting text like with newlines
2019-09-02 16:29:25 +02:00
Bruno Windels
5b54cf566d
deserialize headers from html back to markdown
2019-09-02 16:23:56 +02:00
Bruno Windels
f200327ef2
show/hide legend when focusing/blurring
2019-09-02 16:15:18 +02:00
Bruno Windels
b7768f34f2
Add legend and style it
2019-09-02 16:15:18 +02:00
Bruno Windels
b9cb22e153
dont allow sending empty messages
2019-09-02 14:36:31 +02:00
Bruno Windels
2683627a82
disable spell check for pills in the new composer
2019-09-02 14:26:15 +02:00
Bruno Windels
c595371845
share user pill postfix between autocomplete and insert mention
...
where we decide to add a colon only if the composer is empty
2019-09-02 14:06:30 +02:00
Bruno Windels
b46e001d0a
allow pill-candidate parts in commands
2019-09-02 13:51:46 +02:00
Bruno Windels
4329d8c4ef
Merge pull request #3372 from matrix-org/bwindels/fix-command-tab-complete
...
New composer: fix tab-complete in commands
2019-09-02 11:38:13 +00:00
Bruno Windels
fdd23b34ae
also look backwards into commands for last word to tab-complete
2019-09-02 11:27:22 +02:00
Bruno Windels
00d81eece9
don't accept @/#/: as part of command, allow to create pill candidate
...
so if you type these 3 characters, you get the correct autocomplete
2019-09-02 11:26:20 +02:00
Bruno Windels
a4376a76f0
only pass keyboard to autocomplete when it has selections
...
otherwise if tab is pressed, try to tab complete the last word
2019-09-02 11:25:29 +02:00
J. Ryan Stinnett
7032dc6fa1
Merge pull request #3367 from matrix-org/jryans/features-without-is
...
Add a dialog when inviting via slash command without IS
2019-09-02 10:14:09 +01:00
Travis Ralston
cfff576ef4
Add a button to MemberInfo to deactivate a user
...
Part of https://github.com/vector-im/riot-web/issues/4125
2019-09-01 18:04:24 -06:00
Michael Telatynski
6cc29b2a8c
Merge pull request #3363 from matrix-org/t3chguy/react16_6
...
Migrate away from React.createClass for auth and views/auth. React 16 :D
2019-09-01 22:46:55 +01:00
Michael Telatynski
517c7cba76
Merge pull request #3365 from matrix-org/t3chguy/react16_7
...
Migrate away from React.createClass for non-auth structures. React 16 :D
2019-09-01 22:46:43 +01:00
Travis Ralston
2bfffa76b5
Appease the linter
2019-08-30 15:54:00 -06:00
Travis Ralston
d47fb799a5
Disable MSISDN registration if the homeserver doesn't support it
2019-08-30 15:50:51 -06:00
J. Ryan Stinnett
8ff0883c22
Add a dialog when inviting via slash command without IS
...
This adds a dialog to ask how you want to proceed when trying to invite via
email when there is no IS configured.
Fixes https://github.com/vector-im/riot-web/issues/10619
2019-08-30 18:29:07 +01:00
Bruno Windels
63be16beff
Merge pull request #3366 from matrix-org/bwindels/cider-user-pill-text-fallback
...
New composer: put display name in user pill text fallback instead of mxid
2019-08-30 16:03:28 +00:00