Commit Graph

12471 Commits (c44fed4bea0bef0e5fe12bd5f0d0ff2dbfc3fce7)

Author SHA1 Message Date
Bruno Windels c44fed4bea even less logging 2019-05-14 15:38:16 +01:00
Bruno Windels a3b02cf0cc make logging quiet 2019-05-14 15:38:16 +01:00
Bruno Windels 4ff37ca046 don't show model for now 2019-05-14 15:38:16 +01:00
Bruno Windels 9e0816c51c find caret offset and calculate editor text in same tree-walking algo
instead of having the same logic twice
2019-05-14 15:38:16 +01:00
Bruno Windels 7ebb6ce621 WIP commit, newlines sort of working 2019-05-14 15:38:16 +01:00
Bruno Windels 9f597c7ec0 no comment nodes without react,so can bring this back to simpler version 2019-05-14 15:38:16 +01:00
Bruno Windels 7a85dd4e61 after completion, set caret in next part at start
instead of end of current part
2019-05-14 15:38:16 +01:00
Bruno Windels 2c3453d307 put caret after replaced part if no caretOffset is given by autocomplete 2019-05-14 15:38:16 +01:00
Bruno Windels 1a577eed11 take non-editable parts into account for new caret position 2019-05-14 15:38:16 +01:00
Bruno Windels 8d97c0033e catch this for now as caret behaviour is still a bit flaky 2019-05-14 15:38:16 +01:00
Bruno Windels 580a89875a fix autocompl. not always appearing/being updated when there is no part 2019-05-14 15:38:16 +01:00
Bruno Windels bc14d4f58f comment 2019-05-14 15:38:16 +01:00
Bruno Windels 22587da5ff close autocomplete on enter 2019-05-14 15:38:16 +01:00
Bruno Windels ffff66a92d handle Escape properly
close autocomplete, and also replace with plain text part.

also remove leftover logging
2019-05-14 15:38:16 +01:00
Bruno Windels 64b171198c rerender through callback instead of after modifying model
this way rendering is centralized and we can better rerender
from interaction in the autocompleter
(we didn't have access to caret before)
2019-05-14 15:38:16 +01:00
Bruno Windels aa1b4bb91e keep auto complete code close to each other 2019-05-14 15:38:16 +01:00
Bruno Windels 5e6367ab57 basic support for non-editable parts
e.g. pills, they get deleted when any character of them is removed
later on we also shouldn't allow the caret to be set inside of them
2019-05-14 15:38:16 +01:00
Bruno Windels 4bb8b79942 initial auto complete wrapper, make existing autocompleter work w/ model 2019-05-14 15:38:16 +01:00
Bruno Windels bb73521f0c prefer textContent over innerText as it's faster
and transforms the text less
2019-05-14 15:38:16 +01:00
Bruno Windels 317e88bef2 initial hacky hookup of Autocomplete menu in MessageEditor 2019-05-14 15:38:16 +01:00
Bruno Windels 1330b438d6 initial support for auto complete in model and parts
also move part creation out of model, into partcreator, which
can then also contain dependencies for creating the auto completer.
2019-05-14 15:38:16 +01:00
Bruno Windels 7507d0d7e1 complete proptypes 2019-05-14 15:38:16 +01:00
Bruno Windels a765fdf98a run autocomplete after mounting
componentWillReceiveProps doesn't run after mount,
and is deprecated as well.

Update state after both on componentDidMount and componentDidUpdate
2019-05-14 15:38:16 +01:00
Bruno Windels a2f1f49972 update the DOM manually as opposed through react rendering
react messes up the DOM sometimes because of, I assume, not
being aware of the changes to the real DOM by contenteditable.
2019-05-14 15:38:16 +01:00
Bruno Windels 85adc8953f remove logging 2019-05-14 15:38:16 +01:00
Bruno Windels 0f38753dba some comments 2019-05-14 15:38:16 +01:00
Bruno Windels 8f0074f824 ignore react comment nodes when locating/setting caret 2019-05-14 15:38:16 +01:00
Bruno Windels 6be6492cd2 initial parsing of pills for editor 2019-05-14 15:38:16 +01:00
Bruno Windels 76bb56a2bf initial hookup editor code with react component 2019-05-14 15:38:16 +01:00
Bruno Windels 9f98a6c0e6 add converted prototype code 2019-05-14 15:38:16 +01:00
Bruno Windels 6599d605cd wire up editor component (somewhat hacky) 2019-05-14 15:38:16 +01:00
J. Ryan Stinnett 66aabdca9e
Merge pull request #2962 from matrix-org/jryans/gif-autoplay
Always thumbnail for GIFs
2019-05-14 14:07:58 +01:00
J. Ryan Stinnett f19e70c219 Add comment about thumbnailing for GIFs 2019-05-14 13:55:38 +01:00
David Baker 7ac82a23ab Yes yes, eslint 2019-05-14 12:11:07 +01:00
David Baker c11d26d809 Fix email registration, pt. 2
Regressed in https://github.com/matrix-org/matrix-react-sdk/pull/2768
where we check for an existing stored account first and restore that
instead if it exist, telling the user. We usually make a guest account
when the user first hits the page though, so this just restored this
guest account.

Don't restore the account if it's just a guest account (which, as per
comment, is not perfect, but is definitely better than the current
behaviour).

Fixes https://github.com/vector-im/riot-web/issues/9581
2019-05-14 11:59:38 +01:00
David Baker a0ecd89c94 Fix email registration: pt. 1
We look to see if there's already a user logged in and if there is,
restore that session instead of logging the user in as their new
account. We still set this 'is_registered' flag though, even though
in that case it's not a newly registered account that's being restored,
so don't set in that case.
2019-05-14 11:44:00 +01:00
J. Ryan Stinnett 7881369b98 Always thumbnail for GIFs
When displaying a GIF, we always want to thumbnail so that we can properly
respect the user's GIF autoplay setting (which relies on thumbnailing to produce
the static preview image).

Fixes https://github.com/vector-im/riot-web/issues/9658
2019-05-13 18:28:57 +01:00
J. Ryan Stinnett 9d9a41b263 Save `content.info` as a local for readability 2019-05-13 18:00:52 +01:00
Travis Ralston 201fef8b11
Merge pull request #2947 from matrix-org/travis/password-score-config
Add configuration flag to disable minimum password requirements
2019-05-13 09:19:23 -06:00
J. Ryan Stinnett f5aa32bc96
Merge pull request #2954 from matrix-org/jryans/aggregations
Send and undo reaction events
2019-05-13 15:20:28 +01:00
J. Ryan Stinnett e22bd45608 Clarify `ReactionsRow` forceUpdate usage 2019-05-13 15:00:43 +01:00
J. Ryan Stinnett af9fdbaeeb Rework `reactionsCreated` in `EventTile` to use state
This changes to use component state instead of `forceUpdate`, so that it's more
obvious why an update is happening here.
2019-05-13 14:52:55 +01:00
J. Ryan Stinnett 24209905e8 Test settings later for performance 2019-05-13 14:41:49 +01:00
David Baker 59cefbaa44
Typo
Co-Authored-By: J. Ryan Stinnett <jryans@gmail.com>
2019-05-13 14:24:56 +01:00
David Baker 34990d1c89 Fix bug where email was not required where it shouldn't have been
See comment!

Fixes https://github.com/vector-im/riot-web/issues/9681
2019-05-13 14:17:09 +01:00
Travis Ralston 4ffd826e76 Flip logic for unsafe->safe 2019-05-12 22:53:06 -06:00
Travis Ralston 909354c195
Merge branch 'develop' into t3chguy/cmd_rainbow 2019-05-12 18:51:22 -06:00
Travis Ralston 99e2ac7255
Merge pull request #2956 from matrix-org/t3chguy/fix_memberinfo_invite
Fix invite via MemberInfo
2019-05-12 18:47:17 -06:00
Travis Ralston 8af6bc0758
Merge pull request #2955 from matrix-org/t3chguy/close_room_settings_leave_room
Close Room Settings upon Leave Room
2019-05-12 18:46:49 -06:00
Travis Ralston 76f37d691d
Merge pull request #2953 from matrix-org/t3chguy/roomavatar
Command to change avatar for a single room, including upload of mxc res
2019-05-12 18:46:06 -06:00