This makes sure the selection state is correct when moving the cursor through an entity in the composer but only in rich text mode. https://github.com/vector-im/riot-web/issues/4666 still persists despite this, probably because the text content inserted during a completion in markdown mode has a different length to the text node within the entity.
fixesvector-im/riot-web#4654
Instead of relying on the local avatar/displayname of a user, request the data from the server and update the pill if it shows up.
This required a slight refactor which means we're not doing everything in `render` now. Also I noticed unknown rooms weren't being rendered _at all_! So now you get something that looks like a normal link but with the room alias/ID in it.
This isn't an entirely side-effect-free refactoring:
- the text of the timeline pills is now either the room ID/alias or user ID/ display name of the linked resource (which means that until we do a roundtrip to get user displaynames, mentions for users not in the current room will have their user IDs shown instead of what was in the link body).
- timeline links to rooms without avatars are now rendered as links
- fixed issue that would throw an error whilst rendering (i.e. unusable client) a room link to a room that the client doesn't know about
* Implement new widget API
This allows clients to see who provisioned which widgets.
* Update to make state_key the wid
* Update to latest API
* Only show widgets which have required fields
* Don't constantly show apps dialog
* Fix example to include data key
In order to get ILAG internationalised
Conflicts:
src/components/structures/LoggedInView.js
src/components/structures/MatrixChat.js
src/components/views/dialogs/ChatCreateOrReuseDialog.js
src/components/views/dialogs/SetDisplayNameDialog.js
src/createRoom.js
src/i18n/strings/en_EN.json
* Serve translation files from the karma server
* Port UserSettingsStore to ES6 exports because the test runner
gets confused by ES6 importing a commonjs module
* Remove extra spaces in translations strings for MELS
* Fix 'his/her' back to be 'their'
* Change test to expect singular 'invitation' for a single person
(there may be multiple invitations, but IMO this should be
'rejected n invitations' and we can play with the wording later,
I don't think the singular is any worse than the plural).
* set language in the MELS tests (and wait for it to complete)
* Don't bother setting lang in other tests for now
* Read languages from the available ones rather than the config
* Make the search work (add searchEnabled=true)
* Move variables to the class since they were populated there
- Instead of using one attribute, use one that might just contain one token
- Use the first token when tracking a child
- Mandate that no commas can be in individual tokens
This adds the `data-contained-scroll-tokens` API to elements in `ScrollPanel` which allows arbitrary containers of elements with scroll tokens to declare their contained scroll tokens. When jumping to a scroll token inside a container, the `ScrollPanel` will act as if it is scrolling to the container itself, not the child.
MELS has been modified such that it exposes the scroll tokens of all events that exist within it.This means "Jump to unread message" will work if the unread event is within a MELS (which is any member event, because even individual member events surrounded by other events are put inside a MELS).
This makes the following changes:
- Improve CountryDropdown by allowing all countries to be displayed at once and using PNGs for performance (trading of quality - the pngs are scaled down from 32px to 25px)
- "I want to sign in with" dropdown to select login method
- MXID login field that suffixes HS domain (whether custom or matrix.org) and prefixes "@"
- Email field which is secretly the same as the username field but with a different placeholder
- No more login flickering when changing ServerConfig (!) fixes https://github.com/vector-im/riot-web/issues/1517
This implements most of the design in https://github.com/vector-im/riot-web/issues/3524 but neglects the phone number login:
![login_with_msisdn](https://cloud.githubusercontent.com/assets/1922197/24864469/30a921fc-1dfc-11e7-95d1-76f619da1402.png)
This will be updated in another PR to implement desired things:
- Country code visible once a country has been selected (propbably but as a prefix to the phone number input box.
- Use square flags
- Move CountryDropdown above phone input and make it show the full country name when not expanded
- Auto-select country based on IP
* WIP msisdn sign in
* A mostly working country picker
* Fix bug where you'dbe logged out after registering
Stop the guest sync, otherwise it gets 401ed for using a guest
access token for a non-guest, causing us to beliebe we've been
logged out.
* Use InteractiveAuth component for registration
* Fix tests
* Remove old signup code
* Signup -> Login
Now that Signup contains no code whatsoever related to signing up,
rename it to Login. Get rid of the Signup class.
* Stray newline
* Fix more merge failing
* Get phone country & number to the right place
* More-or-less working msisdn auth component
* Send the bind_msisdn param on registration
* Refinements to country dropdown
Rendering the whole lot when the component was rendered just makes
the page load really slow, so just show 2 at a time and rely on
type-to-search.
Make type-to-search always display an exact iso2 match first
* Propagate initial inputs to the phone input
* Support msisdn login
* semicolon
* Fix PropTypes
* Oops, use the 1qst element of the array
Not the array of object keys which has no particular order
* Make dropdown/countrydropdown controlled
* Unused line
* Add note on DOM layout
* onOptionChange is required
* More docs
* Add missing propTypes
* Don't resume promise on error
* Use React.Children to manipulate children
* Make catch less weird
* Fix null dereference
Assuming [0] of an empty list == undefined doesn't work if you're
then taking a property of it.
- Use avatar initial instead of "R" or "?"
- Use Fuse.js to do case-insensitive fuzzy search. This allows for better sorting of results as well as search based on weighted keys (so userId has a high weight when the input starts with "@").
- Added debounce of 200ms to prevent analysis on every key stroke. Fuse seems to degrade performance vs. simple, non-fuzzy, unsorted matching, but the debounce should prevent too much computation.
- Move the selection to the top when the query is changed. There's no point in staying mid-way through the items at that point.
To fix https://github.com/vector-im/riot-web/issues/2916, force the checking of scroll position by calling _onWidgetLoad (might need renaming...) when a MELS is expanded/contracted.
Also use an keying scheme for MELS that doesn't depend on the events contained, but rather a simple incrementing index based on the order of the MELS as it appears amongst all MELS.