Refactor bodyToHtml, and allow onHighlightClicked
Factor out a Highlighter class to avoid passing round the static state
everywhere.
Add an optional 'opts' argument which can take an 'onHighlightClick' member.
Factor out a Highlighter class to avoid passing round the static state
everywhere.
Add an optional 'opts' argument which can take an 'onHighlightClick' member.
- Make onBlur reset the EditText to show that it hasn't submitted it.
- Add the user ID of the logged in user to Advanced.
- Remove remnants of the Save/Cancel buttons.
- Swap Phases enum to be using string literals
- Swap roomId prop on UserSettings for a more sane onUserSettingsClose and
make MatrixChat responsible for swapping the room.
- s/then/done/ when terminating Promise chains to avoid subtle errors.
- Rejig render() of UserSettings so we don't need to indent quite so much.
\b is *the worst*. From MDN:
Note: JavaScript's regular expression engine defines a specific set of
characters to be "word" characters. Any character not in that set is considered
a word break. This set of characters is fairly limited: it consists solely of
the Roman alphabet in both upper- and lower-case, decimal digits, and the
underscore character. Accented characters, such as "é" or "ü" are,
unfortunately, treated as word breaks.
We fix this by matching on whitespace instead, but then need to tweak the
replace() code since that bluntly replaces the entire match (which now includes
whitespace). It all works now and I can happily tab-complete non-ascii names.
This is required for automatically entering tab-complete mode because
onKeyDown is NOT called in that case, so we need to make sure to have a
membership list hanging around.
This primarily means pre-calculating the list of things we'll be looping over
and then returning matches from this list. Make the regex match be more generic
rather than sorta-kinda-user-id-like-ish.
RoomView is the parent component which creates MessageComposer AND the status
bar. By making RoomView instantiate TabComplete we can scope instances
correctly rather than relying on singleton behaviour through dispatches. This
also makes communication between status bar and the MessageComposer infinitely
easier since they are now sharing the same TabComplete object.
Refactor the event-tile generation loop to go forwards rather than backwards,
which makes it easier to figure out whether we are displaying a continuation of
the previous event, and whether we need a date separator.
Also only display the date separator at the top of the room if there's no more
scrollback to be shown.
This fixesvector-im/vector-web#431
Moved to a `TabComplete` class. Make it more generic (list of strings rather
than RoomMembers) and sort the member list by last_active_ago. Everything still
seems to work.