Very similar to password resets and registration, the components pass around a server config for usage by other components. Login is a bit more complicated and needs a few more changes to pull the logic out to a more generic layer.
All `Room.timeline*` handlers must currently test for `room` first if they
expect it to exist. It is emitted not only for rooms, but also for timeline sets
without rooms, such as for notifications.
Almost all such handlers were correctly testing as needed, but it was missing
from `RoomBreadcrumbs`.
While that's quite confusing, we can start by testing for `room` when we expect
to have one.
Fixes https://github.com/vector-im/riot-web/issues/9630
This allows you to increment an existing reaction below a message by clicking on
it.
At the moment, this is not linked to the action bar, so they each are using
local state. We'll likely want to add some mechanism so that we can local echo
to both of these UI areas at the same time, but that can be done separately.
Fixes https://github.com/vector-im/riot-web/issues/9486
This displays the existing reactions a message has from all users below the
message.
Since we don't currently have an API to actually get these events yet,
adds a temporary hook that looks for a specific message to inject some sample
data. This helps build out the UI for now and can be removed once it exists.
Fixes https://github.com/vector-im/riot-web/issues/9573
Concludes https://github.com/vector-im/riot-web/issues/8593
We are no longer seeing this error being triggered, and are considering it fixed. As a result, the dialog can be removed to reduce the amount of dead code in the project.
This adds the primary reactions to the action bar. They act as toggles where you
can only select one from each group at a time.
Note that currently we aren't actually sending the reaction at all. That's left
for a separate task.
Fixes https://github.com/vector-im/riot-web/issues/9576
This removes the clickable inviter behaviour, as it was too confusing to reveal
the user info sidebar and also hide the invite. Keeping both on screen would be
okay, but seems a bit too complex to resolve right before RC.
In addition, this adds the full inviter MXID to ensure it's clear who invited
you.
This applies the new design for multiple buttons in the message action bar,
paving the way for more things to appear here.
In addition, this changes the existing options button to use the three vertical
dots icon. Some theme colors are also tweaked to align with what they were meant
to be from the unified palette.
This adds a new action bar component to hold multiple per-message actions. This
existing options button has moved to this new component, and is currently the
only action.
This naming is clearer as it doesn't really edit at all (it shows a context
menu). This should also be less confusing with actual editing when it arrives.
Now that we have a fancier password complexity check, remove the older minimum
length to avoid the feeling of two password style guides fighting each other.
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.
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.
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.
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.
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.
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.
Alt-enter is a common macOS shortcut for inserting a new line in an
input that has a separate action tied to the enter key.
Signed-off-by: Ross Brandes <ross.brandes@gmail.com>
This makes the key backup panel much more explicit about the case where an
existing backup does exist, but this device just isn't using it. You can join
the device to the backup and restore from it by going through the restore
workflow.
Fixes https://github.com/vector-im/riot-web/issues/9446
To avoid confusion with other components that also might be named Avatar
Signed-off-by: YaoiFangirl420 <48789208+YaoiFangirl420@users.noreply.github.com>
To reduce the complexity in render(), move the format bar rendering to a
separate method
Signed-off-by: YaoiFangirl420 <48789208+YaoiFangirl420@users.noreply.github.com>
Make the user avatar a separate function component, make the logic for
laying out components a little more concise
Signed-off-by: YaoiFangirl420 <48789208+YaoiFangirl420@users.noreply.github.com>
Make the call/voice-call/hangup buttons separate react components
to reduce the amount of complexity on MessageComposer.
Signed-off-by: YaoiFangirl420 <48789208+YaoiFangirl420@users.noreply.github.com>
We might not have the device in `sig.device`, so we have to check for it's
existence first. This fixes the "Unable to load key backup status" message that
is incorrectly triggering.
Fixes https://github.com/vector-im/riot-web/issues/9442
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.
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
Rooms which are already upgraded shouldn't be asked to upgrade. Additionally, this fixes a bug where the room upgrade dialog would stay open even after upgrading the room.
Fixes an issue where hovering over the breadcrumbs could cause hundreds of web requests due to updates. This also fixes https://github.com/vector-im/riot-web/issues/9390 as the update is more reliable.
Add i18n entries for rotating images; fix the way `getName` is defined
Signed-off-by: YaoiFangirl420 <48789208+YaoiFangirl420@users.noreply.github.com>
Little bit of a mix of things in this one:
* Support variable-width dialogs. Default is fixed-width as before,
only UploadConformDialog is variable-width. Controlled by a prop
to BaseDialog.
* Fixes to the cancel 'x' - scale the mask image, tweak size & colour
* Colour & boldness of dialog titles
* Align the dialog title & cancel 'x'
* Remove gap between dialog buttons & right hand side of dialog(!)
* Round corners on dialogs
* Add grey border on image preview in upload confirm dialog
* and, squeezing in slightly randomly, finish the partially renamed
ChatInviteDialog to AddressPickerDialog.
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
Fixes https://github.com/vector-im/riot-web/issues/9353
The ContextualMenu now accepts a zIndex parameter which can be used to control its level. Dialogs are at around 4000 in the z-index, and the context menu defaults to 5000 for the things that need tooltips and such in a dialog.
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.
Fixes https://github.com/vector-im/riot-web/issues/9354https://github.com/matrix-org/matrix-react-sdk/pull/2801 introduced a change which tried to make sure that when the widget URL was changed that the picker would be re-mounted, however it accidentally introduced a regression. While it effectively did the task it wanted to, it failed to keep the previously-mounted sticker picker alive. This is because the Stickerpicker component is remounted when opened, and the _updateWidget function is called. This results in this.state not having the "current" widget, meaning a URL change is always detected when the component is remounted (room changes, open sticker picker).
Instead of remounting always, we'll instead track which sticker picker widget is being used out of band. This therefore means that whenever the Stickerpicker component is mounted it doesn't create a whole new widget, and the existing (background) picker can be used. This also fixes the loading screen that people would see when opening the sticker picker after switching rooms, something which the persistent widget stuff is supposed to solve.
This uses the field component in the bug report dialog, which generally improves
the styling to fit in more naturally with the rest of the app so that it feels
more trustworthy.
Fixes https://github.com/vector-im/riot-web/issues/9343
Also fairly significant refactor of the uploading code: there are
a number of different ways of triggerring a file upload and each
went through a different code path (the media config size limit
worked on one of those paths). Basically take a lot of code out
of the views and put it into ContentMessages.
Sorry about the size of this patch.
https://github.com/vector-im/riot-web/issues/7565
Fixes https://github.com/vector-im/riot-web/issues/8605
The grey screen of sadness comes up when Chrome tries to open the PDF but doesn't have the right CSP headers. To avoid this, we'll just force a download of the PDF through `fetch` and `Blob`.
There are a few cases where the user might still get a grey screen though: namely if they open the URL in a new tab or when the event content is lying about the file type, or the file is too large to blobify.
`fetch` works in Chrome, Firefox, and our packaged Electron version.
If we have account data in local storage but nothing in the crypto store, it
generally means the browser has evicted IndexedDB out from under us. This adds a
modal to explain the situation and offer to completely clear storage to get
things back to normal.
Fixes https://github.com/vector-im/riot-web/issues/9109
Fixes https://github.com/vector-im/riot-web/issues/8714
Fixes https://github.com/vector-im/riot-web/issues/8890
Fixes https://github.com/vector-im/riot-web/issues/9034
Fixes https://github.com/vector-im/riot-web/issues/8954
This turned out to be much more complicated than it needed to be. We use an IndicatorScrollbar to do all the math for us and some minor changes have been made so it can flag left/right overflow. The complicated part is the css changes which make the gradients work: unlike the RoomSubList, we have to calculate the offset of the indicators (gradients) on our own because position:sticky doesn't work horizontally.
The changes to the css (well, mostly pointer-events:none) make it so the gradient doesn't interfere with the room avatars.
9034 and 8954 are fixed by this because they represent an overflow-x:none style breakage where browsers won't let you scroll without a scrollbar. The gradient offset problem is also demonstrated in 8954.
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.
This clarifies that the notification settings only apply to the current device.
This also tries to apply the spirit of
https://github.com/matrix-org/matrix-react-sdk/pull/1995 (authored by @aidalgol)
which wanted to remove "web" from the label, since there's also a desktop
client.
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.
The NetworkDropdown component was incorrectly guarding against a null
check when retrieving the list of networks
Signed-off-by: YaoiFangirl420 <48789208+YaoiFangirl420@users.noreply.github.com>
instead of setting a min-height on the whole timeline,
track how much height we need to add to prevent shrinking
and set paddingBottom on the container element of the timeline.
We moved off to our own fork of velocity many moons ago to fix
a memory leak bug when velocity was being barely maintained. They
have now merged the bugfix, so go back to mainline.
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.
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
The unknown devices dialog is confusing at the moment due to the complex trust
model in Riot involving various possible device states.
The room header padlock allows you to access this dialog even if there are no
unknown devices, which leads users to be unsure what they can believe and
reduces confidence in Riot. For now, we'll remove the room header click handler
that shows this dialog.
Fixes https://github.com/vector-im/riot-web/issues/8815
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>
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.