Travis Ralston
fde32f13a5
[CONFLICT CHUNKS] Merge branch 'develop' into travis/sourcemaps-develop
2020-01-09 14:15:09 -07:00
Michael Telatynski
245a68b3ba
Merge branches 'develop' and 't3chguy/clean_up_TextualBody' of github.com:matrix-org/matrix-react-sdk into t3chguy/clean_up_TextualBody
...
Conflicts:
yarn.lock
2020-01-09 12:17:21 +00:00
Travis Ralston
59f608ffd6
Merge pull request #3761 from matrix-org/travis/babel7-wp-es6-export
...
Convert CommonJS exports to ES6 exports
2020-01-08 09:09:11 -07:00
Michael Telatynski
c551f2983a
Add TextualBody-test.js
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-01-06 13:28:29 +00:00
Michael Telatynski
bd0a96f2b2
Merge branches 'develop' and 't3chguy/fix_react_complaining' of github.com:matrix-org/matrix-react-sdk into t3chguy/fix_react_complaining
...
Conflicts:
src/components/views/elements/Pill.js
2020-01-06 09:35:59 +00:00
Michael Telatynski
ac1d9b03bf
undo one of the "fixes"
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-01-06 09:35:14 +00:00
David Baker
2125bcf5a6
Comment remaining non-cross-signing-compliant components
...
Fixes https://github.com/vector-im/riot-web/issues/11748
2020-01-03 15:38:59 +00:00
Michael Telatynski
ebf7eb698d
Turn RoomAliasField into properly controlled and use in RoomSettings
2019-12-26 18:52:57 +00:00
Michael Telatynski
661701f7ca
Merge branches 'develop' and 't3chguy/tags_changes' of https://github.com/matrix-org/matrix-react-sdk into t3chguy/tags_changes
...
Conflicts:
src/components/views/elements/TagTile.js
2019-12-23 11:00:42 +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
Travis Ralston
344dac4fb9
Convert CommonJS exports to ES6-compatible exports
...
We use `export default` begrudgingly here. Ideally we'd use just `export`, though this entire SDK expects things to be exported as a default. Instead of breaking everything, we'll sacrifice our export pattern for a smaller diff - a later commit can always do the default export -> regular export conversion.
2019-12-22 21:01:02 -07:00
Michael Telatynski
3a36d61fab
delint
2019-12-19 21:10:22 +00:00
Michael Telatynski
24d0d0d596
Merge pull request #3743 from matrix-org/t3chguy/react16_contexts
...
Migrate away from React Legacy contexts API
2019-12-19 20:32:11 +00:00
Michael Telatynski
b2249d0561
Initial rejig
2019-12-19 20:09:05 +00:00
Michael Telatynski
709b2eed7c
Add bunch of null-guards and similar to fix React Errors/complaints
2019-12-19 15:10:54 +00:00
Michael Telatynski
f30e919f9e
Merge pull request #3741 from matrix-org/t3chguy/dropdown_keyboard_propagation
...
Dropdown stop keyboard propagation if key handled
2019-12-17 17:39:41 +00:00
Michael Telatynski
da4d72b3c4
delint
2019-12-17 17:34:03 +00:00
Michael Telatynski
b094f0fe47
delint
2019-12-17 17:31:29 +00:00
Michael Telatynski
937b32663c
Migrate away from Legacy React Contexts
2019-12-17 17:26:12 +00:00
Michael Telatynski
2e8d66fa36
Null-guard member mention pills for rooms you have left (notif panel)
2019-12-17 16:54:59 +00:00
Michael Telatynski
7f78f55c94
Dropdown stop keyboard propagation if key handled
2019-12-17 15:14:01 +00:00
Michael Telatynski
0e86c2648d
improve comment
2019-12-17 14:36:20 +00:00
Michael Telatynski
213bc4c3ac
Fix Field validation tooltip sticking if blurred before async validation resolved
2019-12-17 14:28:18 +00:00
Michael Telatynski
d28a892bb0
Stop using KeyboardEvent.keyCode as it is deprecated
2019-12-16 17:14:03 +00:00
Michael Telatynski
2569b78db3
Merge pull request #3729 from matrix-org/t3chguy/aria_dropdown
...
Make combobox dropdown keyboard and screen reader accessible
2019-12-16 11:14:46 +00:00
David Baker
be914c7b0c
Merge pull request #3728 from matrix-org/jryans/verify-users
...
Verify users when cross-signing enabled
2019-12-16 10:12:46 +00:00
Michael Telatynski
9c4eb1d649
clean up new code
2019-12-16 10:03:40 +00:00
Michael Telatynski
224ee05b62
this is a combobox, HOME/END should pertain to the input, not selection
2019-12-15 15:07:49 +00:00
Michael Telatynski
cecf581e04
Make Combobox dropdown keyboard and screen reader accessible
2019-12-15 15:04:57 +00:00
Michael Telatynski
f67eedf843
Fix keyboard handling including scroll into view, add aria roles
2019-12-15 14:24:56 +00:00
Michael Telatynski
9d0bf13ca0
Fix ToggleSwitch A11Y (trapping tab and switch v. checkbox)
2019-12-13 14:18:41 +00:00
J. Ryan Stinnett
3ac0deebab
Use static modals for verification
...
Verification with cross-signing may requiring asking for your secret storage
passphrase, which is displayed in it's own modal on top of flows. For now while
verification takes in modals also, mark the verification ones as static so they
don't lose state when secret storage appears on top mid-flow.
2019-12-13 13:55:28 +00:00
Michael Telatynski
d22985f12e
Migrate string refs over to createRef
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-12-08 12:16:17 +00:00
David Baker
fc4926600a
Fix propTypes declaration
...
With this version of babel (via babel-eslint), eslint now fails
with a somewhat confusing, "Unexpected reserved type number"
(from the flow plugin...) if you get this wrong.
2019-12-05 10:42:20 +00:00
Michael Telatynski
901e402a5c
apply renames suggested in PR review
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-12-02 23:23:11 +00:00
Michael Telatynski
757f811126
s/ContextualMenu/ContextMenu/
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-12-02 23:21:59 +00:00
Michael Telatynski
29b59dde5b
undo unrelated change
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-11-28 20:44:08 +00:00
Michael Telatynski
3847996b5b
transition Tooltips over to deprecated code
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-11-28 20:26:09 +00:00
Michael Telatynski
6c5b777a77
Consolidate all except tooltips
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-11-28 18:16:59 +00:00
Michael Telatynski
6d69ec17d9
Merge branches 'develop' and 't3chguy/context_menus' of github.com:matrix-org/matrix-react-sdk into t3chguy/context_menus
...
Conflicts:
src/components/views/context_menus/RoomTileContextMenu.js
2019-11-28 16:25:59 +00:00
Travis Ralston
7b013ecc69
Fix persisted widgets getting stuck at loading screens
...
The widget itself is rendered underneath the loading screen, so we just have to disable the loading state.
This commit also removes the "is" attribute because React 16 includes unknown attributes: https://reactjs.org/blog/2017/09/08/dom-attributes-in-react-16.html
Fixes https://github.com/vector-im/riot-web/issues/11536
2019-11-27 12:54:31 -07:00
Travis Ralston
fbba55ab05
Merge pull request #3670 from matrix-org/travis/toggle-communities
...
Make the communities button behave more like a toggle
2019-11-27 07:52:05 -07:00
Matthew Hodgson
9f455fae4b
Merge branch 'develop' into matthew/fix_logging
2019-11-26 10:19:48 +00:00
Matthew Hodgson
9fd45d1f14
console.log doesn't take %s substitutions
2019-11-26 01:14:03 +00:00
Travis Ralston
1ff39f2524
Make the communities button behave more like a toggle
...
Fixes https://github.com/vector-im/riot-web/issues/10771
Clicking the button should toggle between your last page (room in our case) and the communities stuff.
2019-11-25 16:51:48 -07:00
Travis Ralston
11fec80370
Hide tooltips with CSS when they aren't visible
...
Fixes https://github.com/vector-im/riot-web/issues/11456
2019-11-24 20:52:22 -07:00
Bruno Windels
4a684d01a4
Merge pull request #3661 from matrix-org/bwindels/verif-toasts
...
Show incoming verification requests in in-app notifications
2019-11-22 16:39:18 +00:00
Bruno Windels
0dfb0f5468
fix lint
2019-11-22 16:25:30 +01:00
Bruno Windels
66cc68bae4
add new-styled button
...
might merge it later on with accessible button
2019-11-22 16:04:51 +01:00
Travis Ralston
a55e5f7759
Update copy for widgets not using message encryption
...
Misc design update
2019-11-21 09:12:07 -07:00
Travis Ralston
86783e4439
Merge pull request #3645 from matrix-org/travis/widget-menu
...
Move many widget options to a context menu
2019-11-21 08:10:28 -07:00
Travis Ralston
5d612bb370
Merge pull request #3644 from matrix-org/travis/widget-encryption
...
Re-add encryption warning to widget permission prompt
2019-11-21 08:04:56 -07:00
Michael Telatynski
d3f872bf7a
Merge branches 'develop' and 't3chguy/remove_bluebird' of github.com:matrix-org/matrix-react-sdk into t3chguy/remove_bluebird
2019-11-21 11:15:32 +00:00
Travis Ralston
fd12eb28e7
Move many widget options to a context menu
...
Part of https://github.com/vector-im/riot-web/issues/11262
2019-11-20 19:17:42 -07:00
Travis Ralston
62a2c7a51a
Re-add encryption warning to widget permission prompt
2019-11-20 16:26:06 -07:00
Michael Telatynski
6121420113
Merge branch 'develop' into t3chguy/remove_bluebird
2019-11-20 15:21:23 +00:00
Travis Ralston
5b6ace2558
Appease the linter
2019-11-18 18:02:47 -07:00
Travis Ralston
b185eed462
Wire up the widget permission prompt to the cross-platform setting
...
This doesn't have any backwards compatibility with anyone who has already clicked "Allow". We kinda want everyone to read the new prompt, so what better way to do it than effectively revoke all widget permissions?
Part of https://github.com/vector-im/riot-web/issues/11262
2019-11-18 17:56:33 -07:00
Travis Ralston
f5ec9eb8f4
Ensure widgets always have a sender associated with them
...
Fixes https://github.com/vector-im/riot-web/issues/11419
2019-11-18 13:16:36 -07:00
Michael Telatynski
5c172a383d
Merge branch 't3chguy/remove_bluebird_2' of https://github.com/matrix-org/matrix-react-sdk into t3chguy/remove_bluebird
...
Conflicts:
src/components/views/right_panel/UserInfo.js
2019-11-18 10:36:43 +00:00
Michael Telatynski
d4d51dc61f
Rip out the remainder of Bluebird
2019-11-18 10:03:05 +00:00
Travis Ralston
6b726a8e13
Implement the bulk of the new widget permission prompt design
...
Part 1 of https://github.com/vector-im/riot-web/issues/11262
This is all the visual changes - the actual wiring of the UI to the right places is for another PR (though this PR still works independently).
The help icon is known to be weird here - it's a bug in the svg we have. The tooltip also goes right instead of up because making the tooltip go up is not easy work for this PR - maybe a future one if we *really* want it to go up.
2019-11-15 14:26:16 -07:00
Bruno Windels
0f39a9f72d
fix pr feedback
2019-11-15 17:29:38 +01:00
Bruno Windels
d0914f9208
allow label to be empty on power selector
2019-11-15 16:14:18 +01:00
Bruno Windels
b278531f2f
add IconButton as in design
2019-11-15 16:14:18 +01:00
Michael Telatynski
168b1b68bb
Revert "s/.done(/.then(/ since modern es6 track unhandled promise exceptions"
...
This reverts commit 09a8fec2
2019-11-12 11:56:21 +00:00
Michael Telatynski
09a8fec261
s/.done(/.then(/ since modern es6 track unhandled promise exceptions
2019-11-12 11:51:23 +00:00
Michael Telatynski
2eddb6ca01
DRY context menu placement algorithms
2019-11-12 11:24:14 +00:00
Michael Telatynski
1c4d89f2d7
Migrate all standard Context Menus over to new custom framework
2019-11-11 17:53:17 +00:00
Travis Ralston
bdcf3890a5
Fix HTML fallback in replies
...
Correctly encode the `body` to avoid problems down the line. We also convert newlines to `<br/>` to better represent the message as a fallback.
Fixes https://github.com/vector-im/riot-web/issues/9413
2019-11-08 16:07:11 -07:00
Travis Ralston
e46976be72
Match widgets up with their integration manager
2019-10-29 11:49:15 -06:00
Bruno Windels
3e360c156a
bring LazyRenderList up to React 16 standards, cleanup & docs
2019-10-24 17:56:26 +02:00
Michael Telatynski
8d9dc195d5
Make ARIA happier with DateSeparator and tidy ELS
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-23 18:32:10 +01:00
Michael Telatynski
93ecc9839b
Fix linty failures
2019-10-22 13:49:02 +01:00
Michael Telatynski
3400808f6e
Use navigation treeview aria pattern for roomlist sublists and tiles
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-17 15:53:39 +01:00
Michael Telatynski
6e33cc0650
Merge pull request #3433 from matrix-org/t3chguy/nvl/react16/EventListSummary
...
Summarise state events after room creation
2019-10-11 09:53:26 +01:00
Michael Telatynski
7160922b77
Merge pull request #3541 from matrix-org/t3chguy/fix_150rc1
...
SettingsFlag always run ToggleSwitch fully-controlled
2019-10-10 09:39:33 +01:00
Michael Telatynski
0d42b8629e
remove SettingsFlag manualSave altogether
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-09 23:20:59 +01:00
Michael Telatynski
685c2f494a
actually always run fully controlled
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-09 22:33:14 +01:00
Michael Telatynski
2b9c102f07
SettingsFlag always run ToggleSwitch fully-controlled
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-09 22:27:49 +01:00
Michael Telatynski
58317b1608
Use Keyboard Key variables instead of hardcoded strings
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-09 19:59:11 +01:00
Michael Telatynski
ff18a04da1
Merge pull request #3529 from matrix-org/t3chguy/react16_cleanup2
...
React error/warning cleanup
2019-10-09 16:26:24 +01:00
J. Ryan Stinnett
e905abe5ce
Add label to rageshakes for React soft crashes
...
This adds a label all rageshakes submitted via the React error boundary marking
them as soft crashes for triage.
Fixes https://github.com/vector-im/riot-web/issues/11072
2019-10-09 11:59:10 +01:00
Michael Telatynski
efeb6e87c4
Use new React Shallow renderer with hooks support
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-09 12:51:08 +02:00
Michael Telatynski
34530843f4
Factor out generic EventListSummary from MELS
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-09 12:50:03 +02:00
Michael Telatynski
4c82496bca
export ToggleSwitch
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-08 12:22:22 +01:00
Michael Telatynski
a03e9e7a4f
tidy ToggleSwitch
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-08 12:18:44 +01:00
Michael Telatynski
a782baf510
React error/warning cleanup
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-08 12:10:37 +01:00
Michael Telatynski
a0de7d5f14
Cull some easily fixable errors which make the console a mess
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-03 21:47:19 +01:00
Michael Telatynski
8ef61ce43e
Merge pull request #3514 from matrix-org/t3chguy/accessibility3
...
Various ARIA a11y fixes.
2019-10-03 11:09:01 +01:00
Michael Telatynski
f1db0cf027
Various ARIA a11y fixes.
...
Notate RightPanel tabs.
Shorten Screen Reader queues.
Make AccessibleTooltipButton screen reader friendly
Flatten DOM for Sticker button using React Fragments
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-03 09:35:39 +01:00
J. Ryan Stinnett
0e8dc24c3f
Add a basic error boundary for the entire app
...
This adds a basic error boundary around the entire app to catch errors during
rendering and present the user with the options on how to proceed. This is not
implemented as a modal so that it could be used selectively in portions of the
app as well, such as just the `RoomView`.
Fixes https://github.com/vector-im/riot-web/issues/11009
2019-10-02 17:31:22 +01:00
Bruno Windels
44e68f16ba
use a way of unmounting the tooltip that seems to work 100% of the time
...
¯\_(ツ)_/¯
2019-10-02 14:32:08 +02:00
Bruno Windels
55c1c5e582
tell tooltip when format bar gets hidden, as it won't be unmounted
2019-10-02 14:31:42 +02: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
2824f468d9
Update pill processing to handle better permalinks
2019-09-30 20:27:51 -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
2621ad1b43
Group room tiles in room sub list in the room list for ARIA
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-09-30 16:04:43 +01:00
Michael Telatynski
14e3cb8736
Allow keyboard control even without a screen reader
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-09-26 13:52:09 +01:00
Michael Telatynski
3672832d38
conform to style
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-09-25 18:10:05 +01:00
Michael Telatynski
ab3e5c3b87
Merge branches 'develop' and 't3chguy/accesibility' of github.com:matrix-org/matrix-react-sdk into t3chguy/accesibility
2019-09-25 16:59:46 +01:00
Michael Telatynski
e01be212e6
improve Settings Accessibility for Toggles and Dialogs
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-09-25 09:25:11 +01:00
Michael Telatynski
4a5ee4a969
Put aria-disabled on AccessibleButtons and attempt to a11y ToggleSwitch
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-09-25 09:01:49 +01:00
Bruno Windels
8a1c1bbec4
implement RoomAliasField component
...
adding a postfix to Field to show the domain name
2019-09-23 11:22:30 +02: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
Sorunome
4ae130bd27
add license header, descriptive comment and change to class
2019-08-29 18:13:52 +02:00
Sorunome
fe9ae46ffb
Merge branch 'develop' of https://github.com/matrix-org/matrix-react-sdk into soru/spoilers
2019-08-28 20:23:24 +02:00
Travis Ralston
838e115b72
Merge pull request #3338 from matrix-org/t3chguy/fix_jitsi_persisted_breaking_randomly
...
Only Destroy the expected persistent widget, not *ANY*
2019-08-28 10:49:29 -06:00
Travis Ralston
b3cda4b19a
Support multiple integration managers behind a labs flag
...
Fixes https://github.com/vector-im/riot-web/issues/10622
Implements [MSC1957](https://github.com/matrix-org/matrix-doc/pull/1957 )
Design is not final.
2019-08-23 09:12:40 -06:00
Michael Telatynski
cd6a980c7e
Only Destroy the expected persistent widget, not *ANY*
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-08-22 16:57:51 +01:00
Travis Ralston
6f7bbf958e
Remove tooltipClassName from the Field's input
...
React doesn't want the property on the <input>, so we'll take it off.
2019-08-21 12:51:16 -06:00
Travis Ralston
f55a40001c
Touch up settings: alignment, spacing, error states
...
Fixes https://github.com/vector-im/riot-web/issues/10554
Issues fixed:
* Fields were not ~30px from the avatar (too much right margin)
* Tooltips overflowed the dialog on some resolutions
* SetIdServer didn't have an error state for making the field red
* Spacing between sections in Discovery was wrong (fixed by just removing the problematic n+2 selector - it didn't help anything)
2019-08-20 13:20:07 -06:00
Jason Robinson
29085895a7
Fix regression on widget panel edit button
...
Due to commit ffa49df889
the parameters for the call to open a widget in edit mode from the
widget panel in a room has broken. The `screen` parameter needs
to be prefixed with `type_` as it was before.
This corresponds to parameters supplied when creating the URL when
opening a widget in edit mode through Scalar screens.
Signed-off-by: Jason Robinson <jasonr@matrix.org>
2019-08-20 15:55:57 +03:00
Michael Telatynski
a96df333e9
Merge pull request #3310 from matrix-org/t3chguy/fix_reply_parent_redacted
...
Fix showing events which were replied to and then redacted
2019-08-16 19:19:25 +01:00
Travis Ralston
5fe691cf33
Double equals
2019-08-15 13:33:02 -06:00
Travis Ralston
e2f013ddb4
Appease the linter
...
This looks awkward, but should pass.
2019-08-15 13:31:45 -06:00
Travis Ralston
27504e1578
Prompt for terms of service on integration manager changes
...
Part of https://github.com/vector-im/riot-web/issues/10539
2019-08-15 13:28:23 -06:00
David Baker
4afed0fab4
Merge pull request #3313 from matrix-org/t3chguy/fix_jitsi_persisted_breaking_randomly
...
Fix Persisted Widgets (Jitsi) randomly closing on room change
2019-08-15 10:52:24 +01:00
Michael Telatynski
6f529852cd
Skip forceUpdate in ReplyThread if the redacted event is not relevant
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-08-14 23:27:04 +01:00
Michael Telatynski
7b17ea1fa5
Fix Persisted Widgets (Jitsi) randomly closing on room change
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-08-14 23:15:49 +01:00
David Baker
e2c5dc6bac
Merge pull request #3300 from matrix-org/dbkr/change_is
...
Add UI in settings to change ID Server
2019-08-14 09:42:20 +01:00
Michael Telatynski
a44d61fb75
add copyright
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-08-13 18:17:42 +01:00
Michael Telatynski
6589e5dab9
Fix showing events which were replied to and then redacted
2019-08-13 18:13:47 +01:00
David Baker
860a9dbc82
s/tooltip/tooltipContent/
2019-08-13 11:01:04 +01:00
David Baker
06905bc5bb
Actually appease linter
2019-08-12 12:05:25 +01:00
David Baker
417d9b6af8
nicer way to appease linter
2019-08-12 11:50:11 +01:00
Travis Ralston
ffa49df889
Refactor integration manager handling into a common place
...
It was already in a common place, but this is the boilerplate for supporting multiple integration managers, and multiple integration manager sources.
For https://github.com/vector-im/riot-web/issues/4913 / https://github.com/vector-im/riot-web/issues/10161
2019-08-09 16:08:06 -06:00
David Baker
4075cdde7f
lint
2019-08-09 18:59:57 +01:00
David Baker
c76514fceb
Add UI in settings to change ID Server
...
Just changes the current ID server being used
To come in subsequent PRs:
* Store this in account data
* Check for terms or support the proper UI for accepting terms when setting
* Support disconnecting
Part 1 of https://github.com/vector-im/riot-web/issues/10094
Requires https://github.com/matrix-org/matrix-js-sdk/pull/1013
2019-08-09 18:07:58 +01:00
David Baker
fcdbce1dda
Change throttle to debounce
...
And add an explanation of whyI think one's more apropriate than the
other for this.
2019-08-09 15:30:05 +01:00
Bruno Windels
66ef08120e
Merge pull request #3282 from matrix-org/bwindels/extract-common-editor-code
...
Split MessageEditor up in edit-specifics & reusable parts for main composer
2019-08-07 07:58:52 +00:00
Bruno Windels
299cf8542c
Split MessageEditor in edit-specifics & reusable part for main composer
2019-08-05 15:31:18 +02:00
Michael Telatynski
224dac3ffb
Remove withMatrixClient as we are committed to using Contexts
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-08-05 12:26:31 +01:00
Bruno Windels
9d49a5bb73
pass caret to history manager upon initial render
...
otherwise caret is put at editor start when undoing last step
2019-08-01 11:28:01 +02:00
Bruno Windels
234404e598
add mod+z/y shortcuts, set editor state to what history manager returns
2019-08-01 11:27:09 +02:00
Bruno Windels
98bc0d24f4
push changes to history manager
2019-08-01 11:26:20 +02:00
Michael Telatynski
1087e04bb5
Replace React.PropTypes with usage of the prop-types
package
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-07-31 12:19:29 +01:00
Bruno Windels
9bfba9db3e
make PartCreator a bit more testable by not asking for deps of dep
2019-07-25 14:50:20 +02:00
J. Ryan Stinnett
cef67d5784
Merge pull request #3245 from matrix-org/jryans/tooltip-larger-buffer
...
Tweak interactive tooltip buffer area allow for overshoot
2019-07-25 13:16:20 +01:00
J. Ryan Stinnett
f5fbd30a28
Tweak interactive tooltip buffer area allow for overshoot
...
This uses a larger buffer area around the tooltip, as it easy to overshoot and
mouse the cursor past the tooltip.
Fixes https://github.com/vector-im/riot-web/issues/10400
2019-07-25 12:17:07 +01:00
J. Ryan Stinnett
2d4264c39d
Keep widget URL in permission screen to one line
...
This keeps the widget URL to one line max, so that the allow button will always
be visible. The full URL can be viewed by hovering.
Fixes https://github.com/vector-im/riot-web/issues/10402
2019-07-23 18:06:37 +01:00
J. Ryan Stinnett
846a908bb4
Add missing copyright header
2019-07-23 17:52:00 +01:00
Bruno Windels
58fd828944
Merge pull request #3241 from matrix-org/bwindels/dofocuscomposer
...
Restore manual composing focusing logic
2019-07-23 11:55:44 +00:00
David Baker
2eb8a8879b
Merge pull request #3199 from matrix-org/dbkr/terms
...
ToS for ISes/IMs: prompt on use screen
2019-07-23 10:32:11 +01:00
Bruno Windels
ceb53dc0bb
Revert "remove unnessary manual focussing of composer"
...
This reverts commit 57abbc4273
.
2019-07-23 09:13:51 +02:00
J. Ryan Stinnett
09c2d899ac
Defer IM token until widget is shown and permission granted
...
This defers the work to request the IM token when displaying a widget until
after we know that widget will actually be shown and the user has granted
permission for this widget to be displayed.
This is useful in general to avoid making unnecessary token checks, but it's
particularly helpful with the new Terms API, so that we only show the Terms flow
when widget are actually being used (as opposed to entering the room where
widgets exist, but haven't been shown / permitted).
Part of https://github.com/vector-im/riot-web/issues/10088
2019-07-22 11:50:54 +01:00
Bruno Windels
4fa7302f69
Merge pull request #3224 from matrix-org/bwindels/focus-composer-on-type
...
Focus composer when typing anywhere in the app
2019-07-18 16:10:23 +00:00
Bruno Windels
03f577bea9
use keydown here, as its a div element
2019-07-17 17:23:19 +02:00
Bruno Windels
50c88279a0
remove non-existing keypress handler
2019-07-17 17:05:56 +02:00
J. Ryan Stinnett
fc8cdc5661
Improve interactive tooltip safe mousing area
...
This adds a more complex trapezoidal safe area between the button that triggers
the tooltip and the tooltip itself. It should be easier to move from the button
into the tooltip without accidentally closing it.
Fixes https://github.com/vector-im/riot-web/issues/10185
2019-07-17 14:11:27 +01:00
Bruno Windels
57abbc4273
remove unnessary manual focussing of composer
...
now that composer is focused automatically when no other shortcuts
apply, remove the manual focusing we have in place where it's not needed
2019-07-15 18:21:10 +02:00
Bruno Windels
507b89fc61
manually attach input event handler, as React doesn't pass inputType
2019-07-11 18:46:56 +02:00
Michael Telatynski
8d4356a5b9
Show anything other than ban/invite -> leave as a kick
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-07-10 08:57:00 +01:00
David Baker
83f697a9a2
lint
2019-07-09 19:01:22 +01:00
David Baker
d4af8d4993
Use showIntegrationsManager in other places
2019-07-09 18:56:39 +01:00
David Baker
54aaabac74
Initial support for ToS dialogs for IS/IM
...
as per MSC2140
2019-07-09 18:51:56 +01:00
Michael Telatynski
349afb13f3
Merge pull request #3164 from matrix-org/t3chguy/fix_proptypes_mismatches
...
Fix some React errors
2019-07-09 10:59:29 +01:00
Bruno Windels
f6e71b2335
turn flag into options object
2019-07-08 16:55:56 +02:00
Bruno Windels
888e4d1ec2
preserve reply fallback when editing
2019-07-08 15:25:44 +02:00
Michael Telatynski
c2905bd33b
make things a tad saner
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-07-06 11:16:01 +01:00
Michael Telatynski
89ece266c6
Make id used in EditableItemList unique, namespace mx_EditableItemList_*
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-07-06 11:15:10 +01:00
Michael Telatynski
6b9c6a31f0
Don't show Remove button in ImageView if can't redact, delint ImageView
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-07-06 10:42:14 +01:00
Michael Telatynski
000f7e8007
Merge pull request #3103 from matrix-org/t3chguy/edit_skip_if_no_edit
...
If oldContent matches newContent, skip sending the edit
2019-07-06 08:52:58 +01:00
J. Ryan Stinnett
5496a4dce6
Fix interactive tooltip null target error
...
Fixes https://github.com/vector-im/riot-web/issues/10232
2019-07-05 15:02:09 +01:00
David Baker
668d24111c
Merge pull request #3173 from matrix-org/t3chguy/MELS_3pid
...
MELS handle m.room.third_party_invite
2019-07-03 16:02:10 +01:00
Bruno Windels
353f5a205c
Merge pull request #3170 from matrix-org/bwindels/handle-associated-failures
...
Handle associated event send failures
2019-07-03 09:02:58 +00:00
Michael Telatynski
429b8e94df
MELS handle m.room.third_party_invite
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-07-03 08:58:34 +01:00
J. Ryan Stinnett
cf8eeedcc7
Merge pull request #3169 from matrix-org/jryans/reactions-tooltip-tweaks
...
Improve interactive tooltip hover behaviour
2019-07-02 18:28:09 +01:00
Bruno Windels
daa2250023
fix lint
2019-07-02 18:30:57 +02:00
Bruno Windels
3fd96008c3
Fixup: dont assume there is a prior edit
2019-07-02 17:34:07 +02:00
Bruno Windels
357ad3d50c
cancel pending edit when sending new edit
2019-07-02 14:52:29 +02:00
J. Ryan Stinnett
a4587c5013
Merge pull request #3165 from matrix-org/t3chguy/tooltip_accessible_button
...
Add AccessibleTooltipButton and use it for RoomSubList buttons
2019-07-02 10:34:51 +01:00
Michael Telatynski
904a096f72
Update AccessibleTooltipButton.js
2019-07-02 10:28:36 +01:00
J. Ryan Stinnett
dd94bf799d
Improve interactive tooltip hover behaviour
...
This gives the interactive tooltip a more natural hover behaviour by removing
the full screen div behind it. This allows the target button to keep its hover
state, for example.
This also removes the click to close behaviour, which was too easy to trigger
accidentally.
Fixes https://github.com/vector-im/riot-web/issues/10179
Fixes https://github.com/vector-im/riot-web/issues/10222
Fixes https://github.com/vector-im/riot-web/issues/10225
2019-07-01 18:00:59 +01:00
Michael Telatynski
46a6043e9b
Use title prop instead to minimize changes
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-06-30 11:00:21 +01:00
Michael Telatynski
8ed336ea08
Add AccessibleTooltipButton and use it for RoomSubList buttons
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-06-30 10:58:59 +01:00
Michael Telatynski
d774d96290
Fix some React errors
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-06-30 10:41:39 +01:00
Michael Telatynski
e591d3ef76
take dirty-flag into account for editing
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-06-29 06:52:19 +01:00
Michael Telatynski
bf9353f3af
Merge branches 'develop' and 't3chguy/edit_skip_if_no_edit' of github.com:matrix-org/matrix-react-sdk into t3chguy/edit_skip_if_no_edit
2019-06-29 06:45:06 +01:00
Michael Telatynski
443c7343a0
Merge branches 'develop' and 't3chguy/fix_MELS_labs' of github.com:matrix-org/matrix-react-sdk into t3chguy/fix_MELS_labs
2019-06-29 06:36:20 +01:00
J. Ryan Stinnett
e8fba4f770
Change interactive tooltip to only flip when required
...
This changes the interactive tooltip to only flip around when the tooltip
content would be near the window edge.
Fixes https://github.com/vector-im/riot-web/issues/10176
2019-06-26 18:24:34 +01:00
J. Ryan Stinnett
67130cb45f
Condense isInRect
2019-06-25 11:57:55 +01:00
J. Ryan Stinnett
72bfc3b5ea
Improve API and interactivity of new tooltip
...
This reworks the API the `InteractiveTooltip` component so that it's more
natural to use just like other React components. You can now supply the target
component as a child and the tooltip content as a prop.
In addition, this tweaks the interactivity to keep the tooltip on screen until
you move the mouse away from the tooltip and its target.
Part of https://github.com/vector-im/riot-web/issues/9753
Part of https://github.com/vector-im/riot-web/issues/9716
2019-06-24 17:32:36 +01:00
J. Ryan Stinnett
f366f7d2b3
Merge pull request #3131 from matrix-org/jryans/interactive-tooltip
...
Add interactive tooltip style
2019-06-24 15:42:02 +01:00
Michael Telatynski
f3641eaa32
Add ability to render null-rejoins in Timeline and MELS
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-06-23 21:41:28 +01:00
Bruno Windels
1c7af38d83
Merge pull request #3126 from matrix-org/bwindels/caret-refactoring
...
Editor caret improvements
2019-06-21 15:02:41 +00:00
J. Ryan Stinnett
32bf4588dd
Center tooltip along top or bottom of target
...
This adjusts the positioning to work more the way we want:
* Tooltip is position on the top or bottom edge of the target depending on where
space is available
* Tooltip and chevron are centered
In addition, more bits borrowed from `ContextualMenu` are not needed, so they
have been removed for simplicity.
Part of https://github.com/vector-im/riot-web/issues/9753
Part of https://github.com/vector-im/riot-web/issues/9716
2019-06-21 15:04:19 +01:00
J. Ryan Stinnett
6dcdad028e
Clone ContextualMenu to InteractiveTooltip
...
As part of reactions and editing work, we're adding a new style of tooltip that
allows interacting with the content of the tooltip. `ContextualMenu` is closest
out of the things we have today, but it doesn't position in quite the way we
want and it's already quite complex.
To get started, let's first clone that to a new `InteractiveTooltip`.
Part of https://github.com/vector-im/riot-web/issues/9753
Part of https://github.com/vector-im/riot-web/issues/9716
2019-06-21 15:04:19 +01:00
Bruno Windels
b16bc0178a
insert manually, as insertHTML command moves caret inconsistently
...
across browsers
2019-06-19 17:42:18 +02:00
J. Ryan Stinnett
bb4b5d7798
TooltipButton rename step 2 of 2
2019-06-19 11:32:03 +01:00
J. Ryan Stinnett
ab4c5f0152
TooltipButton rename step 1 of 2
2019-06-19 11:30:37 +01:00
J. Ryan Stinnett
4ec7a8ddff
Fix casing of TooltipButton
...
My brain can't deal with two different ways to write "Tooltip", so this
converges the naming to match the rest of the code base. Separate commits will
fix up the file names for case-insensitive file systems.
2019-06-19 11:26:13 +01:00
Bruno Windels
63fba611c0
Merge pull request #3108 from matrix-org/bwindels/edit-room-notif-pill
...
Support @room pills while editing
2019-06-18 16:43:14 +00:00
Travis Ralston
8f6e8c1ec7
Appease the linter
2019-06-17 15:51:14 -06:00
Travis Ralston
d2d0cb2e9e
Port AppTile (widgets) over to new integration manager dialog props
2019-06-17 15:34:30 -06:00
Travis Ralston
a5f296457f
Make the Manage Integrations Button defer scalar auth to the manager
...
This moves the responsibility of creating a URL to open from the button (and other components) to the integrations manager dialog itself.
By doing this, we also cut down on scalar API calls because we don't pick up on account information until the user opens the dialog.
2019-06-17 15:29:28 -06:00
Bruno Windels
eb4ff50c3c
do parts creation only in PartCreator to not scatter dependencies
2019-06-14 18:28:44 +02:00
Bruno Windels
3cfdd518ee
detect emote when sending (and trim "/me " for content)
2019-06-14 11:02:20 +02:00
Michael Telatynski
41b995df3c
If oldContent matches newContent, skip sending the edit
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-06-13 22:56:32 +01:00
Bruno Windels
41e41269dc
use EditorStateTransfer to pass on state to newly mounted editor
2019-06-12 18:52:34 +02:00
Sorunome
d0f78e9d44
stop propagation of click events on un-hiding the spoiler
2019-06-11 22:13:47 +02:00
Sorunome
eddac4b188
blur spoilers
2019-06-11 21:08:45 +02:00
J. Ryan Stinnett
f0d67e0454
Revert "Merge pull request #3019 from matrix-org/travis/sr/fix-timeline"
...
This reverts commit 9a1a9825b0
, reversing
changes made to 62dc83310a
.
2019-05-28 12:22:22 +01:00
Bruno Windels
25e2c747ed
focus main composer after cancel or saving edit
2019-05-27 16:26:21 +02:00
Bruno Windels
e193522db1
PR feedback: put findPrev/NextEditableEvent in one function with flag
2019-05-27 16:22:55 +02:00
Bruno Windels
fbb79e4686
don't navigate to next/prev message when editor has modifications
...
to prevent losing modifications by accident
2019-05-24 14:46:34 +02:00
Bruno Windels
3591eedcfa
move between editable events with arrow keys
2019-05-24 14:42:33 +02:00
Bruno Windels
3468cef654
Merge pull request #3013 from matrix-org/bwindels/editor-formatting
...
Message editing: preserve and re-apply formatting
2019-05-24 07:34:05 +00:00
Travis Ralston
14dc4b47fa
Merge branch 'develop' into travis/feature/wellknown2
2019-05-22 23:05:54 -06:00
Travis Ralston
9a1a9825b0
Merge pull request #3019 from matrix-org/travis/sr/fix-timeline
...
Make the timeline less noisy for screen readers (mk II)
2019-05-22 19:18:40 -06:00
Travis Ralston
62dc83310a
Merge pull request #3020 from matrix-org/travis/sr/edit
...
Label message edit field as such for screen readers
2019-05-22 16:30:45 -06:00
Travis Ralston
6edf760943
Mute avatars and read receipts on event tiles
...
This reduces overall noise from the screen reader. It was reading the alt attribute from the sender avatar, which was just a mxid. The read receipts were just nonsensical noise.
Fixes https://github.com/vector-im/riot-web/issues/2716
Fixes https://github.com/vector-im/riot-web/issues/5697
See https://github.com/vector-im/riot-web/issues/9747
2019-05-22 15:18:51 -06:00
Travis Ralston
85a024175b
Hide flair from screen readers
...
To have less noise when they run over the sender profile.
See https://github.com/vector-im/riot-web/issues/9747
2019-05-22 15:18:46 -06:00
Sorunome
d8f4512439
add basic spoiler support
2019-05-22 20:41:27 +02:00
Travis Ralston
6c0213bb3d
Revert "Make the timeline less noisy for screen readers"
2019-05-22 10:54:51 -06:00
Travis Ralston
983214f4bf
Merge pull request #3007 from matrix-org/travis/sr/mute-timeline
...
Make the timeline less noisy for screen readers
2019-05-22 09:55:23 -06:00
Bruno Windels
53b6586986
re-apply markdown when saving a message
2019-05-22 16:19:07 +02:00
Bruno Windels
ff61376c07
Merge pull request #3004 from matrix-org/bwindels/update-link-previews-after-edit
...
Message editing: update link previews after editing
2019-05-22 14:17:34 +00:00
Bruno Windels
6b1134bdf0
add matrix foundation copyright header
2019-05-22 16:16:32 +02:00
Travis Ralston
a551ef1a72
Label message edit field as such for screen readers
...
See https://github.com/vector-im/riot-web/issues/9747
2019-05-21 20:00:15 -06:00
Travis Ralston
4779144b2e
Mute avatars and read receipts on event tiles
...
This reduces overall noise from the screen reader. It was reading the alt attribute from the sender avatar, which was just a mxid. The read receipts were just nonsensical noise.
Fixes https://github.com/vector-im/riot-web/issues/2716
Fixes https://github.com/vector-im/riot-web/issues/5697
See https://github.com/vector-im/riot-web/issues/9747
2019-05-21 18:56:46 -06:00
Travis Ralston
5ae23fdb27
Hide flair from screen readers
...
To have less noise when they run over the sender profile.
See https://github.com/vector-im/riot-web/issues/9747
2019-05-21 18:55:01 -06:00
Travis Ralston
907c7ed119
Merge pull request #2994 from matrix-org/travis/screenreader/topleftmenu
...
Update TopLeftMenu for accessibility: Keyboard shortcut, reduced screen reader noise
2019-05-21 09:52:26 -06:00
Bruno Windels
2d4d608ed6
Merge pull request #2997 from matrix-org/bwindels/pill-avatars
...
Message editing: render avatars for pills in the editor
2019-05-21 12:11:06 +00:00
Bruno Windels
b00a38a1e5
apply mx_EventTile_content to editor, so it gets the same right margin
...
this way we don't have to include it in the magic number
2019-05-21 12:18:20 +02:00
Travis Ralston
3476be3327
Merge branch 'develop' into travis/feature/wellknown2
2019-05-20 19:50:02 -06:00
Matthew Hodgson
d3f06763b3
Merge branch 'develop' into matthew/twemoji
2019-05-20 16:38:44 +01:00
J. Ryan Stinnett
0e5f0f24cc
Extract MELS-style comma separated list to shared utility
...
This allows other UI components to use the same formatting for a long list.
2019-05-20 15:21:18 +01:00
Bruno Windels
710338c01f
pass member and room to editor pills to get avatar url
2019-05-20 10:28:26 +02:00
Matthew Hodgson
dc72641264
replace emojione with twemoji. completely untested & debugged & unoptimised
2019-05-19 15:23:43 +01:00
Travis Ralston
c5757d8303
Support CTRL+I for opening TopLeftMenu
2019-05-17 15:29:16 -06:00
Bruno Windels
62b8973e72
cancel the edit when pressing escape
2019-05-17 15:35:14 +01:00
Bruno Windels
ca2e6d8eb2
Message editing: shift+enter for newline, enter to send
2019-05-17 10:22:02 +01:00
Travis Ralston
0c7aa39273
Merge branch 'develop' into travis/feature/wellknown2
2019-05-16 12:59:50 -06:00
Bruno Windels
245f48a22c
set caret on mount as we usually do, so FF doesn't enter 2 newlines 🤯
2019-05-16 18:39:20 +01:00
J. Ryan Stinnett
0e369bd12e
Merge pull request #2977 from matrix-org/jryans/encrypted-reactions
...
Use `getRelation` helper
2019-05-16 09:45:09 +01:00
J. Ryan Stinnett
33885cb864
Use getRelation
helper
...
Use the `getRelation` helper to ensure we always read relation info from the
wire content as required in E2E rooms.
2019-05-16 09:25:33 +01:00
Travis Ralston
6f22acc3c6
Merge pull request #2979 from aaronraimist/imageview-tooltip
...
Add tooltips to rotate and close buttons in ImageView (#9686 )
2019-05-15 21:14:20 -06:00
Aaron Raimist
c38b5cabb1
Allow the strings to be translated
...
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2019-05-15 22:11:51 -05:00
Aaron Raimist
bfd37d8089
Add tooltips to rotate and close buttons in ImageView ( #9686 )
...
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2019-05-15 22:06:02 -05:00
Bruno Windels
085f2d199d
focus editor after clicking edit
2019-05-15 17:17:35 +01:00
Bruno Windels
6366371c0d
add * to fallback messages for edits
2019-05-15 15:54:05 +01:00
Bruno Windels
5805a88ab9
adjust to js-sdk changes of marking original event as replaced
2019-05-15 11:54:26 +01:00
Bruno Windels
d83e278f6b
PR feedback, cleanup
2019-05-15 09:46:08 +01:00
Bruno Windels
dc21faa240
send edit also in n.new_content field
...
so we can have fallback content in the regular content for clients
that don't support edits. Note that we're not reading m.new_content
yet as it's going to be a bit of a headache to change this.
So for now just sending the edit in both the normal content and
the m.new_content subfield, so all events out there already
are well-formed
2019-05-14 16:32:08 +01:00
Bruno Windels
45991bc3de
replace original event if there have been previous edits
2019-05-14 15:39:24 +01:00
Bruno Windels
e2388afb51
consistent naming between serialize and deserialize modules
2019-05-14 15:39:24 +01:00
Bruno Windels
759a4a54ef
send the actual m.replace event from composer content
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
8d97c0033e
catch this for now as caret behaviour is still a bit flaky
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
317e88bef2
initial hacky hookup of Autocomplete menu in MessageEditor
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
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
6599d605cd
wire up editor component (somewhat hacky)
2019-05-14 15:38:16 +01:00
Travis Ralston
25e3f7888e
newline for the linter
2019-05-13 18:31:43 -06:00
Travis Ralston
e4576dac28
Render underlines and tooltips on custom server names in auth pages
...
See https://github.com/vector-im/riot-web/issues/9290
2019-05-13 17:16:40 -06:00
J. Ryan Stinnett
26f732723e
Animate tooltips when hiding as well as showing
...
This uses the same animation style as on show, but twice as fast.
2019-04-25 14:29:10 +01:00
J. Ryan Stinnett
aec14e64fa
Throttle validation in response to user input
...
This avoids the case of the password complexity progress jumping wildly for
every character you type.
2019-04-25 14:29:10 +01:00
J. Ryan Stinnett
4f41161a47
Check password complexity during registration
...
This adds a password complexity rule during registration to require strong
passwords. This is based on the `zxcvbn` module that we already use for key
backup passphrases.
In addition, this also tweaks validation more generally to allow rules to be
async functions.
2019-04-25 14:29:10 +01:00
J. Ryan Stinnett
008ca3543b
Migrate passwords on registration to new validation
...
In addition to migrating password fields, this also removes the remaining
support for old-style validation in registration now that all checks have been
converted.
2019-04-25 14:29:10 +01:00
J. Ryan Stinnett
9064875312
Migrate email on registration to new validation
2019-04-25 14:29:09 +01:00
J. Ryan Stinnett
1cbb4be6f7
Add support for validating more strictly at submit time
...
When submitting a form, we want to validate more strictly to check for empty
values that might be required. A separate mode is used since we want to ignore
this issue when visiting a field one by one to enter data.
As an example, we convert the pre-existing logic for the username requirement
using this new support.
2019-04-25 14:29:09 +01:00
J. Ryan Stinnett
778697abf1
Use input element's value directly
...
Since we're keeping the input as a ref anyway, let's use that rather than
requiring the value to be passed to `validate`. This allows others to call
`validate` as well.
2019-04-25 14:29:09 +01:00
J. Ryan Stinnett
5d95c31875
Focus the first invalid field
...
This adjusts the submission step to focus the first invalid field and redisplay
validation. This also rearranges the older style field error handling on
registration which is slated for removal once we convert all fields to the new
style.
2019-04-25 14:29:09 +01:00
J. Ryan Stinnett
62a01e7a37
Track per-field validity with new-style validation
...
This updates the registration form to include the new-style validation state
when deciding whether the entire form is valid overall.
In addition, this tweaks the validation helper to take functions instead of
strings for translated text. This allows the validation helper to be create once
per component instead of once every render, which improves performance.
2019-04-25 14:29:09 +01:00
J. Ryan Stinnett
37e09b5569
Add check and x icons for validation feedback
...
Adds icons from the Feather set with the same color as text. Tweaks validation
item spacing to match the design.
2019-04-25 14:29:09 +01:00
J. Ryan Stinnett
87f13cfe55
Add focus handling to validation
...
Update the Field component and validation handling to show / hide validation
feedback on focus / blur events.
2019-04-25 14:29:09 +01:00
J. Ryan Stinnett
338d83ab55
Add validation feedback helper
...
This adds a general validation feedback mechanism for checking input values. An
initial example is wired up for the username input on registration.
2019-04-25 14:29:09 +01:00
J. Ryan Stinnett
37ecf2a623
Remove unused ref from Field component
...
The `fieldInput` ref is no longer used now that we have controlled components
everywhere.
2019-04-25 14:29:09 +01:00
J. Ryan Stinnett
12f7d1715b
Remove BottomLeftMenu and supporting bits
...
The `BottomLeftMenu` component is not used in the new design. This removes the
component and also any images and sub-components that were only used by it.
2019-04-09 17:38:32 +01:00
J. Ryan Stinnett
f2da833ac9
Fix validation to avoid undefined
class on fields
...
The class name handling for validation inadvertently added `undefined` as a
class when validation is not used. This rearranges the logic to avoid the issue.
Fixes https://github.com/vector-im/riot-web/issues/9345
2019-04-09 16:10:36 +01:00
Travis Ralston
a61ab4eb4e
Merge pull request #2862 from matrix-org/travis/stickerpicker/remount
...
Don't re-init the stickerpicker unless something actually changes
2019-04-04 09:46:38 -06:00
Travis Ralston
9618187d2e
Merge pull request #2855 from YaoiFangirl420/rotate_images
...
Add option to rotate images
2019-04-04 09:46:06 -06:00
Travis Ralston
6722451207
semicolon
2019-04-04 09:36:45 -06:00
J. Ryan Stinnett
b0f59007f3
Clarify level
variable name
2019-04-04 10:30:23 +01:00
YaoiFangirl420
1cbbe5f31f
Add i18n and fix method declaration
...
Add i18n entries for rotating images; fix the way `getName` is defined
Signed-off-by: YaoiFangirl420 <48789208+YaoiFangirl420@users.noreply.github.com>
2019-04-04 02:27:58 -07:00
YaoiFangirl420
9bd1ba60f5
Add option to rotate images
...
cf. https://github.com/vector-im/riot-web/issues/9257
Add rotate clockwise/counterclockwise buttons to <ImageView>
Signed-off-by: YaoiFangirl420 <48789208+YaoiFangirl420@users.noreply.github.com>
2019-04-04 01:48:41 -07:00
J. Ryan Stinnett
fa88185dee
Include the current power level in the selector
...
This ensures we always include the current power level in the power selector,
even if it's greater than the level you're allowed to set yourself. This ensures
the selector can display the current value correctly when disabled.
Fixes https://github.com/vector-im/riot-web/issues/9340
2019-04-03 11:54:10 +01:00
Travis Ralston
51750cf153
General cleanup of handling for WidgetMessaging instances
...
When setting, delete the old one. Because delete checks if it exists first, we can safely call this.
The change in FromWidgetPostMessageApi is just something noticed while debugging.
2019-04-01 19:50:05 -06:00
Travis Ralston
fc28f094fe
Set title attribute on images in lightbox
...
Part of https://github.com/vector-im/riot-web/issues/9324
2019-03-29 14:55:56 -06:00
David Baker
1fe830d1c6
Remove noreferrer on widget pop-out
...
Having the referrer allows widgets to do customisation based on what
riot instance is embedding it. It gets a referrer when we embed it
in the iframe so there's nothing gained by suppressing it here.
2019-03-27 13:27:57 +00:00
Travis Ralston
ddcb7a68bd
Merge pull request #2781 from matrix-org/travis/openid-widget
...
Widget OpenID reauth implementation
2019-03-27 03:42:39 -06:00
Travis Ralston
a8ae63bb06
Minimize stickerpicker when the title is clicked
...
Fixes https://github.com/vector-im/riot-web/issues/6437
This also fixes a bug where if the room had apps open and you clicked the sticker picker's title, you'd end up closing the apps and not the picker.
2019-03-23 23:50:06 -06:00
Travis Ralston
3654c895eb
Appease the linter
2019-03-23 23:31:19 -06:00
Travis Ralston
2dcb40f1be
Track OpenID automatic permissions by (widgetLocation, widgetUrl)
2019-03-23 23:25:31 -06:00
Travis Ralston
d3268801ed
Merge branch 'develop' into travis/openid-widget
2019-03-23 22:48:12 -06:00
Travis Ralston
b68960ad26
Reload widget messaging when widgets reload
...
Fixes a bug for some widgets where they cannot do their startup routine (capabilities negotiation, etc) when someone maximizes the widget. By reloading the widget messaging, we ensure the widget is kept in the loop.
2019-03-15 22:24:27 -06:00
Travis Ralston
f045beafc3
Support whitelisting/blacklisting widgets for OpenID
2019-03-15 21:33:31 -06:00
J. Ryan Stinnett
ec51aee656
Remove refs from RegistrationForm
...
This aligns the code in `RegistrationForm` with other users of the `Field`
component. (In https://github.com/matrix-org/matrix-react-sdk/pull/2780 , I had
thought that this code would be okay to leave alone, but I had missed the usage
of the `Field` value getter.)
Fixes https://github.com/vector-im/riot-web/issues/9172
2019-03-14 14:29:04 +00:00
J. Ryan Stinnett
c70925ab0d
Restore Field
value getter for RegistrationForm
...
When working on the `Field` validation support, I thought `RegistrationForm`'s
refs would be okay to leave as is, but I missed that they also depended on the
value getter.
For the moment, it's quicker to temporarily revive the value getter to get
registration working.
Fixes https://github.com/vector-im/riot-web/issues/9171
2019-03-14 12:29:00 +00:00
J. Ryan Stinnett
45063cad4a
Merge pull request #2780 from jryans/auth-validation
...
Initial portions of support for Field validation
2019-03-14 10:19:21 +00:00
Jason Robinson
02ff1763a2
Ensure scalar_token is valid before opening integrations manager
...
Since Scalar (and other integration managers) are loaded as apps into
an iframe, a valid `scalar_token` must exist when loading the app.
It is possible that a scalar_token becomes invalid between the time
when the integration manager button was rendered and the user clicking
the link. Here we make a call to integration manager `/account`
before trying to render the integration manager, which ensures we
have a valid token for the integration manager to work with.
Moving the scalar token revalidation to the cases where it is actually
needed could make it possible to decrease the amount of Scalar /account
calls we do when switching rooms, which is currently 3.
Signed-off-by: Jason Robinson <jasonr@matrix.org>
2019-03-13 11:47:00 +02:00
J. Ryan Stinnett
69a066657b
Remove bits of Field that supported uncontrolled
...
Field is no longer used as an uncontrolled component, so we can remove some
supporting code that we no longer need.
2019-03-12 16:51:19 +00:00
J. Ryan Stinnett
d4dbba3938
Convert uncontrolled Field usages to controlled
...
As part of adding validation to Field, the logic is simpler to follow if we can
assume that all usages of Field use it as a controlled component, instead of
supporting both controlled and uncontrolled.
This converts the uncontrolled usages to controlled.
2019-03-12 16:17:21 +00:00
J. Ryan Stinnett
5a648ecfe4
Ensure we always set some value in Field
...
Always set some value on the Field's input so that it doesn't flip flop between
controlled and uncontrolled.
2019-03-12 14:02:54 +00:00
J. Ryan Stinnett
ea050683bd
Use the right prop type for functions
2019-03-12 14:02:54 +00:00
J. Ryan Stinnett
57ce4d6e7d
Call the parent component's onChange
if it exists
2019-03-12 14:02:54 +00:00
J. Ryan Stinnett
7241418eba
Appease the linter
...
This checks `onValidate` in `render` to make the linter happy.
2019-03-12 14:02:54 +00:00
J. Ryan Stinnett
edb7f39ec9
Validity class currently unused on tooltip
2019-03-12 14:02:54 +00:00
Matthew Hodgson
40f16fa310
adds validation for fields.
...
* renames RoomTooltip to be a generic Tooltip (which it is)
* hooks it into Field to show validation results
* adds onValidate to Field to let Field instances call an arbitrary validation function
Rebased from @ara4n's https://github.com/matrix-org/matrix-react-sdk/pull/2550
by @jryans. Subsequent commits revise and adapt this work.
2019-03-12 14:02:54 +00:00
Bruno Windels
4e382b1dd9
rename onWidgetLoad to onHeightChanged
...
as it's easy to confuse it with room widgets, but has nothing to do with it.
2019-03-07 17:02:19 +01:00
J. Ryan Stinnett
8bf5e1d19f
Merge pull request #2749 from jryans/auth-field
...
Use Field component in auth flows
2019-03-06 11:18:24 +00:00
J. Ryan Stinnett
35ee9c9ac7
One line for prefix container
2019-03-06 10:58:54 +00:00
J. Ryan Stinnett
26b2aa174b
Add prefix support to Fields
...
This allows Fields to have an optional prefix component which is placed inside
the border of the Field and to the left of the input. Since this label animation
would be complex to get right for this case, it is instead fixed to the top left
if there is a prefix component.
This canonical example of this today would be a phone number field which
includes a country dropdown.
2019-03-05 15:25:43 +00:00
Bruno Windels
96196d8c3d
Merge pull request #2746 from matrix-org/bwindels/flairnolayout
...
Prevent flair pushing timeline downwards
2019-03-05 15:34:09 +01:00
Bruno Windels
624572daa9
show flair container when no profiles loaded to ensure same height
2019-03-05 14:50:39 +01:00
J. Ryan Stinnett
b6351f2607
Merge pull request #2740 from jryans/reorg-field-props
...
Reorganise props handling in Field
2019-03-05 11:30:06 +00:00
J. Ryan Stinnett
d4a148d56c
Use oneOf
to check the input element
2019-03-05 11:18:58 +00:00
Travis Ralston
363964e423
Don't loop forever if you demote yourself via Enter on a PowerSelector
...
The included comment explains what happens and why this is bad.
Fixes https://github.com/vector-im/riot-web/issues/9039
2019-03-04 13:08:54 -07:00
J. Ryan Stinnett
7c672e608d
Reorganise props handling in Field
...
Several small tweaks to the props handling:
* Use destructuring instead of `delete`
* Emphasize the `element` as a primary prop
* Document `textarea` as supported
2019-03-04 17:25:19 +00:00
Michael Telatynski
6b0b5e4aa3
Merge pull request #2729 from matrix-org/t3chguy/missing_permalinkCreator
...
Add missing permalinkCreator prop
2019-03-04 11:15:53 +00:00
Michael Telatynski
6b07195b63
Add missing permalinkCreator prop
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-03-01 09:36:36 +00:00
Travis Ralston
a41df7ab68
Convert PowerSelector to use mxField instead
2019-02-28 19:00:57 -07:00
J. Ryan Stinnett
4b340450b9
Rename Feather icon directory to feather-customised
...
These icons are based on Feather as the original source, but they have various
tweaks applied, such as stroke width, color, etc. Hopefully the tweaked name
makes this more obvious in the future.
2019-02-27 10:42:10 +00:00
Bruno Windels
fb672ffb28
change handling of event permalinks in replies
2019-02-25 18:43:08 +01:00
Travis Ralston
9795161f40
Misc linter cleanup
2019-02-21 17:53:29 -07:00
Travis Ralston
1e6594ceba
Disable removal of items if the user doesn't have permission
2019-02-21 17:15:25 -07:00
Travis Ralston
5d2f17c49a
Make adding aliases direct manipulation
2019-02-21 15:22:08 -07:00
Travis Ralston
2903a0e712
Rework EditableItemList to support mxField
...
Also improves upon the general UX to be a bit friendlier for direct manipulation things.
2019-02-21 15:22:08 -07:00
Bruno Windels
107eb974d4
always rerender
...
as not all state that goes into rendering comes from state or props,
we shouldn't be blocking rendering at all
This might rerender a few times more, but it shouldn't be worse
than what was there before the redesigned roomlist.
2019-02-14 13:30:03 +01:00
Bruno Windels
a1a82e48d9
update range when items size changes
2019-02-13 20:21:17 +01:00
Bruno Windels
e51f279f36
dont assume there items is an array
2019-02-13 18:49:09 +01:00
Bruno Windels
60d0ed4c01
make LazyRenderList stateful for better performance
...
it only rerenders when visible range it would render based on the
props gets OVERFLOW_MARGIN(5) items from the current renderRange
2019-02-13 18:33:57 +01:00
Bruno Windels
9c371111b7
Merge branch 'develop' into bwindels/lazyroomtilerendering
2019-02-13 17:13:23 +01:00
Bruno Windels
0de2161a0d
create LazyRenderList component to trim list to visible part
2019-02-13 14:50:43 +01:00
J. Ryan Stinnett
8652a094f3
Allow theming room header buttons
2019-02-13 10:47:04 +00:00
Bruno Windels
f189ff54a8
hide delete & cancel button on stickers are they weren't visible before
2019-02-12 17:01:05 +01:00
David Baker
2cd25e0077
Merge pull request #2596 from matrix-org/dbkr/emoji_sas
...
Change SAS to decimal / emoji
2019-02-08 16:46:43 +00:00
Travis Ralston
78ea531a87
Merge pull request #2590 from matrix-org/travis/settings/fix-directory-publish
...
Ensure toggle switches listen to property changes
2019-02-08 08:00:47 -07:00
David Baker
ae16cc36aa
Change SAS to decimal / emoji
...
Requires https://github.com/matrix-org/matrix-js-sdk/pull/837
2019-02-08 14:57:36 +00:00
Travis Ralston
89a8422320
Ensure toggle switches listen to property changes
...
They do local echo on changes to avoid jumping back and forth while requests are ongoing, however some areas modify the checked state after the toggle has mounted.
Fixes https://github.com/vector-im/riot-web/issues/8432
2019-02-07 11:54:13 -07:00
David Baker
3a924d05b5
Remove click-to-verify from SAS
...
The click-each-pair to verify was hard to discover, so remove it
2019-02-07 17:01:55 +00:00
Bruno Windels
87ddb8a453
Merge pull request #2575 from matrix-org/bwindels/customtags
...
Bring back custom tags, also badges on communities
2019-02-07 11:37:17 +00:00
Bruno Windels
547c8cb206
render badge on community
2019-02-06 14:31:43 +00:00
Travis Ralston
eac50aa800
Remove old user and room settings
...
This takes out the old user and room settings, replacing the paths with the new dialog editions. The labs setting has been removed in order to support this change.
In addition to removing the old components outright, some older components which were only used by the settings pages have been removed. The exception is the ColorSettings component as it has a high chance of sticking around in the future.
Styles that were shared by the settings components have been broken out to dedicated sections, making it easier to remove the old styles entirely.
Some stability testing of the app has been performed to ensure the app still works, however given the scope of this change there is a possibility of some broken functionality.
2019-02-04 13:40:21 -07:00
Bruno Windels
6d2e582083
fix lint
2019-02-02 07:46:52 +01:00
Bruno Windels
7ccc694eea
minimal theming on app permission in widget
2019-02-01 23:24:56 +01:00
Bruno Windels
e2ce12f5c1
wip
2019-02-01 23:15:14 +01:00
J. Ryan Stinnett
d6f55a508c
Use custom appearance and arrow for select fields
2019-01-30 16:40:53 -06:00
Bruno Windels
85b998d851
fix dropdown style when input is shown
2019-01-30 11:42:50 +01:00
Bruno Windels
6aca7e4515
Merge pull request #2522 from matrix-org/bwindels/memberpanel-tiny-makeover
...
Redesign: small member info panel makeover
2019-01-30 10:01:33 +00:00
Travis Ralston
a2f516c461
Implement the Security & Privacy tab of new room settings
2019-01-29 14:31:07 -07:00