Šimon Brandner
5ffa3783dd
Don't show emoticons in emoji autocomplete
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-08-20 15:16:22 +02:00
Šimon Brandner
b5b0a9bc4e
Show emoji autocomplete only after the user has type 2 characters
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-08-20 15:10:42 +02:00
Michael Telatynski
f9527c9d6b
Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/a11y/composer-list-autocomplete
...
Conflicts:
src/components/views/rooms/BasicMessageComposer.tsx
src/editor/autocomplete.ts
2021-08-12 11:21:20 +01:00
Michael Telatynski
d8c4ab53e0
Merge pull request #6347 from robintown/emojibase-updates
2021-07-20 12:57:00 +01:00
Robin Townsend
5614ef1675
Rename some variables since their purpose has changed
...
Signed-off-by: Robin Townsend <robin@robin.town>
2021-07-19 21:54:25 -04:00
Michael Telatynski
ce78cdf4ad
Conform to new react and typescript eslint rules
2021-07-19 22:43:11 +01:00
Robin Townsend
f8a922eaa1
Apply code review suggestions
...
including filling in gaps in emoji shortcode coverage.
Signed-off-by: Robin Townsend <robin@robin.town>
2021-07-19 15:09:15 -04:00
Robin Townsend
f88d5dd24e
Zip shortcodes in with emoji objects
...
Signed-off-by: Robin Townsend <robin@robin.town>
2021-07-16 16:36:03 -04:00
Robin Townsend
8efb30eb07
Merge branch 'develop' into emojibase-updates
2021-07-16 14:38:10 -04:00
Michael Telatynski
ebfe38dc4a
Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/a11y/composer-list-autocomplete
...
Conflicts:
src/components/views/rooms/BasicMessageComposer.tsx
src/editor/autocomplete.ts
2021-07-15 09:59:40 +01:00
Michael Telatynski
90d380c8ae
Cache value of feature_spaces* flags as they cause page refresh so are immutable
2021-07-15 08:26:49 +01:00
Robin Townsend
718887dd27
Update Emojibase and switch to IamCal (Slack-style) shortcodes
...
for consistency with shortcodes commonly used by other platforms, as
was decided in https://github.com/vector-im/element-web/issues/13857 .
One thing to be aware of is that the currently used version of Twemoji
does not support a few of the newer emoji present in Emojibase, so these
look a little out of place in the emoji picker. Optimally Twemoji would
be updated at the same time, though I don't know how to do that.
Signed-off-by: Robin Townsend <robin@robin.town>
2021-07-10 23:13:48 -04:00
Šimon Brandner
9d569c378e
Second batch of burning
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-07-02 17:08:27 +02:00
J. Ryan Stinnett
ae0a8b8da4
Auto-fix lint errors
2021-06-29 13:11:58 +01:00
Michael Telatynski
9dc8493a5c
Hide communities invites and the community autocompleter when Spaces Beta is enabled
2021-06-22 22:07:42 +01:00
Michael Telatynski
59258585b3
Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/ts/5
2021-06-22 17:28:19 +01:00
Šimon Brandner
7bf230e665
Prefer canonical aliases over non-canonical ones
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-06-20 11:17:42 +02:00
Šimon Brandner
d0ea842f1e
Remove sorting by index as it is already done here: e9ea3cad76/src/autocomplete/QueryMatcher.ts (L120)
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-06-20 10:29:08 +02:00
Michael Telatynski
058cbbbd0c
Fix imports
2021-06-18 16:13:55 +01:00
Michael Telatynski
02e72d8b04
Fix more type definitions
2021-06-17 14:24:53 +01:00
Michael Telatynski
f929d2ee5f
Typescript fixes due to MatrixEvent being TSified
2021-06-17 14:06:03 +01:00
Michael Telatynski
edb2026780
Support any alias not just first
2021-05-18 13:31:53 +01:00
Michael Telatynski
78f569de94
delint
2021-05-18 12:56:23 +01:00
Michael Telatynski
e9c258a930
Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/a11y/composer-list-autocomplete
...
Conflicts:
src/autocomplete/AutocompleteProvider.tsx
src/components/views/rooms/Autocomplete.tsx
2021-05-18 12:49:11 +01:00
Michael Telatynski
19a94d55bd
Create SpaceProvider and hide Spaces from the RoomProvider autocompleter
2021-05-18 09:39:01 +01:00
Germain
bd2917aa69
Add a limit option for autocomplete results ( #6016 )
2021-05-12 12:18:56 +01:00
Michael Telatynski
60d3da2441
Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/a11y/composer-list-autocomplete
...
Conflicts:
src/components/structures/LoggedInView.tsx
src/components/views/rooms/BasicMessageComposer.tsx
src/editor/autocomplete.ts
2021-05-11 10:59:22 +01:00
Germain Souquet
c81847689a
Remove query matcher shouldMatchPrefix support
2021-03-31 18:21:02 +01:00
Germain Souquet
377b6c8a05
Make user autocomplete query search beyond prefix
2021-03-31 11:41:22 +01:00
Travis Ralston
1ac12479ca
Convert cases of mxcUrlToHttp to new media customisation
2021-03-10 12:32:18 -07:00
Robin Townsend
dba52fb5b1
Autocomplete invited users
...
Signed-off-by: Robin Townsend <robin@robin.town>
2021-02-25 16:01:46 -05:00
Michael Telatynski
9463fda1c1
Improve VoiceOver & WebKit accessibility support
...
Based on https://bugs.webkit.org/show_bug.cgi?id=167671#c15
(workaround)
2021-02-18 11:08:43 +00:00
Michael Telatynski
6c166f0560
If no bug_report_endpoint_url, hide rageshaking from the App
2020-09-15 15:49:25 +01:00
Michael Telatynski
97ebfa02c3
Merge pull request #5162 from matrix-org/t3chguy/lodash
...
Consolidate Lodash files in bundle
2020-09-03 15:54:43 +01:00
Michael Telatynski
9ba33c7f80
Fix eslint ts override tsx matching and delint
2020-08-29 01:11:08 +01:00
Michael Telatynski
1fc55b33c1
Stash lodash import optimization
2020-08-28 18:53:43 +01:00
resynth1943
2c20afc047
Fix lodash imports
...
Signed-off-by: resynth1943 <resynth1943@tutanota.com>
2020-08-26 23:23:18 +01:00
J. Ryan Stinnett
7748e3ae1a
Merge pull request #5083 from matrix-org/jryans/riot-to-element
...
Replace Riot with Element in docs and comments
2020-08-05 12:25:45 +01:00
J. Ryan Stinnett
ce226ab534
Replace Riot with Element in docs and comments
...
This only covers the simple cases of references to issues and repos. More
complex areas, such as deployment scripts, will be handled separately.
Part of https://github.com/vector-im/element-web/issues/14864
2020-08-03 18:33:36 +01:00
Bruno Windels
5c05b494df
remove emoji icons in autocomplete/reply by designer request
2020-07-31 14:14:37 +02:00
Michael Telatynski
94acc02b25
Fix Query Matcher regression with certain unhomoglyph'd characters like M
vs m
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-07-27 12:08:51 +01:00
Michael Telatynski
0075ae2187
update emoji provider regex
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-07-21 17:53:16 +01:00
Jorik Schellekens
b3fa855bd8
Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into joriks/eslint-config
2020-07-20 16:22:32 +01:00
Michael Telatynski
918683c232
fix import. wtf webstorm
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-07-15 05:10:05 +01:00
Michael Telatynski
13775f897c
consolidate properties
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-07-15 04:59:35 +01:00
Michael Telatynski
31e0d74adc
Query Matcher apply js-sdk's removeHiddenChars
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-07-15 04:58:13 +01:00
Michael Telatynski
7d7bafb1ea
De-duplicate rooms from the room autocomplete provider
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-06-30 16:23:52 +01:00
Jorik Schellekens
7699aafcaf
Use new eslint package- fix lint issues in ts and js
2020-06-23 17:01:19 +01:00
Michael Telatynski
69c5aecfc7
Merge pull request #4784 from bocoup/extend-querymatcher-heuristic
...
Extend QueryMatcher's sorting heuristic
2020-06-18 19:36:42 +01:00
Mike Pennisi
2e0cb4746a
fixup! Extend QueryMatcher's sorting heuristic
2020-06-18 14:20:40 -04:00
Mike Pennisi
4ffc54d143
fixup! Extend QueryMatcher's sorting heuristic
2020-06-18 13:24:02 -04:00
Jorik Schellekens
05d0309081
Lint a few semicolons
2020-06-18 14:32:43 +01:00
Mike Pennisi
6af4d82ce7
Extend QueryMatcher's sorting heuristic
...
Use the order of the input keys as a signal for relative importance of
matches.
Signed-off-by: Mike Pennisi <mike@mikepennisi.com>
2020-06-17 23:41:41 -04:00
Matthew Hodgson
c171bdfec7
fix emoji in safari
...
1. emoji sometimes vanished from the autocompleter due to a rounding error
combined with maxWidth: 1em on the emoji span kicking in at arbitrary
font sizes/zooms
2. apparently safari needs explicit VS-16 ligatures, as per
ff7dec427f
2020-06-04 22:01:16 +01:00
Michael Telatynski
bc83984a62
tidy up the ref to ref with a forwardRef and initialComponent signature
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-05-30 13:30:59 +01:00
Michael Telatynski
8087b521e6
Autocomplete: use scrollIntoView for auto-scroll instead of broken manual scrollTop calculation
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-05-29 21:42:33 +01:00
Jorik Schellekens
ba3fe850e0
Implement review
...
- lint member order
- cleaner type coersion
- specify access modifiers everywhere
2020-05-26 12:09:23 +01:00
Jorik Schellekens
d10d887996
Explain unsafe coerce
2020-05-25 16:53:09 +01:00
Jorik Schellekens
5c9398a6b1
Types exiliary files
2020-05-25 16:47:57 +01:00
Michael Telatynski
fc828378fa
Fix post-ts autocomplete, it is not null
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-04-22 13:18:54 +01:00
Michael Telatynski
598cf21684
discard propTypes.
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-04-21 18:01:23 +01:00
Michael Telatynski
bf891c85e8
Enable esModuleInterop and iterate PR
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-04-21 10:01:05 +01:00
Michael Telatynski
3b245ee678
add more type annotations
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-04-20 21:05:00 +01:00
Michael Telatynski
66d2a67142
deduplicate emojibase loading
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-04-20 19:17:58 +01:00
Michael Telatynski
5c57b9ab9b
delint
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-04-20 19:04:55 +01:00
Michael Telatynski
fced4ea51e
Convert autocomplete stuff to TypeScript
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-04-20 19:00:54 +01:00
Michael Telatynski
e114effcfa
make code more readable as per pr suggestion
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-04-14 13:07:44 +01:00
Michael Telatynski
3a0e1aeeaf
Sort emoji by shortcodes for autocomplete so that :-1 and :+1 first results are correct
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-04-11 18:09:28 +01:00
Michael Telatynski
8c2b910c03
rework SlashCommands to better expose aliases
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-03-30 13:59:08 +01:00
Bruno Windels
2b19648786
fix cp error and lint
2020-02-21 13:35:14 +01:00
Bruno Windels
8870da6c24
Add alt_aliases to room completion candidates
...
but don't match on name otherwise you see multiple entries per room
when searching for a room name
Also pass the roomId to the composer autocomplete, so
it's easier to we don't need to loop through all the rooms and
it's also easier accept room with local aliases as well in the future
2020-02-21 13:02:41 +01:00
Michael Telatynski
b84fd245b1
Fix room completion for invited rooms and upgraded rooms
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-01-30 18:03:45 +00:00
Michael Telatynski
c97de43f69
Remove unused fetch polyfills, querystring, require-json. Move glob to dev-dep
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-01-18 02:01:45 +00:00
Travis Ralston
fde32f13a5
[CONFLICT CHUNKS] Merge branch 'develop' into travis/sourcemaps-develop
2020-01-09 14:15:09 -07:00
Michael Telatynski
d31c863563
Remove all usages of slate in favour of CIDER
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-01-06 00:15:48 +00:00
Travis Ralston
f1ac3d2f64
Convert imports to ES6 from CommonJS
...
This is needed because `require()` means something different in webpack - it ends up importing the module as something we didn't expect (and is occasionally async)
2019-12-22 21:16:06 -07:00
Travis Ralston
042bd35d79
Fix MatrixClientPeg imports
2019-12-22 21:15:54 -07:00
Travis Ralston
d56f0f2a25
Convert many imports to handle ES6 exports
...
Reliant upon https://github.com/matrix-org/matrix-react-sdk/pull/3761
2019-12-22 21:04:42 -07:00
Michael Telatynski
a25bc94343
remove unused, commented line of code
2019-12-19 17:22:02 +00:00
Michael Telatynski
d35b01b63a
Get rid of stripped-emoji.json in favour of an in-memory single truth source
2019-12-18 15:40:19 +00:00
Michael Telatynski
d4d51dc61f
Rip out the remainder of Bluebird
2019-11-18 10:03:05 +00:00
Michael Telatynski
54dcaf1302
Replace bluebird specific promise things. Fix uses of sync promise code.
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-11-14 13:52:17 +00:00
Michael Telatynski
c882b7f332
Improve A11Y for Autocomplete Commands and DDG
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-14 10:37:10 +01:00
Travis Ralston
7d1a04cb12
Merge pull request #3500 from matrix-org/travis/permalinks
...
Support local permalinks for unfederated instances
2019-10-01 08:41:23 -06:00
Travis Ralston
fc66e69c02
Rename RoomPermalinkCreator -> Permalinks due to scope
...
The file handles more than just a RoomPermalinkCreator, so we should name it accordingly.
2019-09-30 20:39:58 -06:00
Travis Ralston
64aa6695f5
Move matrix-to.js to utils/permalinks/RoomPermalinkCreator
...
Just a little bit of refactoring to make the feature of custom prefixes a bit easier.
2019-09-30 12:16:46 -06:00
Michael Telatynski
f299f7e092
delint
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-09-30 14:32:42 +01:00
Michael Telatynski
f160a308b4
Make Autocomplete more accessible to screen reader users
...
Use ARIA to:
+ notate that the composer has an autocomplete
+ notate the open/closed state of the autocomplete
+ notate the name of the open autocomplete options
+ notate the ID of the highlighted autocomplete option
+ improve naming of emoji autocomplete options for screen readers
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-09-30 14:04:39 +01:00
Bruno Windels
228905bec2
insert command completion as command part (instead of plain)
...
this prevents the command being sent as plain text
this adds a `type` property to completions to decide which
parts should be inserted into the composer, hence deciding how
they will be rendered.
2019-09-23 14:39:19 +02:00
Matthew Hodgson
e3d3b155d6
remove errant debug
2019-05-20 10:08:34 +01:00
Matthew Hodgson
b0ec594c5a
comment on the futility of stripped-emoji.json
2019-05-19 21:19:20 +01:00
Matthew Hodgson
81338306b0
fix lint
2019-05-19 21:00:14 +01:00
Matthew Hodgson
dbc6815abf
make EmojiProvider and stripped-emoji.json work
2019-05-19 20:48:18 +01:00
Matthew Hodgson
497be91c4d
combine regexps correctly
2019-05-19 17:53:36 +01:00
Matthew Hodgson
a8297a7698
fix build
2019-05-19 16:11:12 +01:00
Matthew Hodgson
dc72641264
replace emojione with twemoji. completely untested & debugged & unoptimised
2019-05-19 15:23:43 +01:00
Travis Ralston
85c8d4d0e5
Remove extra debug lines
2019-03-27 13:03:25 -06:00
Travis Ralston
340c24cfa7
Filter out upgraded rooms from autocomplete results
...
Fixes https://github.com/vector-im/riot-web/issues/9289
Theory is that this shouldn't happen in the first place (aliases should be transferred), but there's evidently some cases where this doesn't work, or gets state reset.
2019-03-26 15:13:20 -06:00
Travis Ralston
cb6f415a05
Be more positive with setting labels
...
Fixes https://github.com/vector-im/riot-web/issues/6435
This is done through an on-the-fly inverter for the settings. All the settings changed are boolean values, so this should be more than safe to just let happen throughout the SettingsStore. Typically a change like this would be done in the individual handlers (similar to how setting names are remapped to different properties or even different storage locations on the fly), however doing that for this many settings would be a huge nightmare and involve changing *all* the layers. By putting a global "invert this" flag on the setting, we can get away with doing the inversion as the last possible step during a read (or write).
To speed up calculations of the default values, we cache all the inverted values into a lookup table similar to how we represent the defaults already. Without this, the DefaultHandler would need to iterate the setting list and invert the values, slowing things down over time. We invert the value up front so we can keep the generic inversion logic without checking the level ahead of time. It is fully intended that a default value represents the new setting name, not the legacy name.
This commit also includes a debugger for settings because it was hard to visualize what the SettingsStore was doing during development. Some added information is included as it may be helpful for when someone has a problem with their settings and we need to debug it. Typically the debugger would be run in conjunction with `mxSendRageshake`: `mxSettingsStore.debugSetting('showJoinLeaves') && mxSendRageshake('Debugging showJoinLeaves setting')`.
2019-01-24 20:57:40 -07:00
David Baker
77efa0881e
Gah, onjects
2019-01-11 14:09:29 +00:00