Merge branch 'develop' into t3chguy/remove-communities-v2
This commit is contained in:
commit
fdf74750aa
56 changed files with 1453 additions and 693 deletions
|
@ -35,6 +35,9 @@ For a good example, see https://develop.element.io/config.json.
|
|||
users to the SSO to log in if the user lands on the welcome page or no specific page. For example,
|
||||
https://app.element.io/#/welcome and https://app.element.io would redirect if set up to use this option.
|
||||
This can be useful to maintain guest experience until an account is needed.
|
||||
1. `logout_redirect_url`: After Element has cleared the user's storage, the user will be redirected to this URL.
|
||||
Typically most useful in environments where the account users will be logging into is managed for them, such
|
||||
as in cases of some SSO deployments. For example: this page might log the user out of the SSO system too.
|
||||
1. `features`: Lookup of optional features that may be force-enabled (`true`) or force-disabled (`false`).
|
||||
When features are not listed here, their defaults will be used, and users can turn them on/off if `showLabsSettings`
|
||||
allows them to. The available optional experimental features vary from release to release and are
|
||||
|
@ -63,6 +66,20 @@ For a good example, see https://develop.element.io/config.json.
|
|||
https://github.com/matrix-org/rageshake server). Bug reports are sent when a user clicks
|
||||
"Send Logs" within the application. Bug reports can be disabled/hidden by leaving the
|
||||
`bug_report_endpoint_url` out of your config file.
|
||||
1. `uisi_autorageshake_app`: If users enable the Labs flag
|
||||
"Automatically send debug logs on decryption errors", rageshakes
|
||||
submitted by that feature can be given a custom app name so that
|
||||
the rageshake server can file them in a separate issue tracker. If
|
||||
this field is absent from the config, the app name for decryption
|
||||
error rageshakes will be `"element-web"` just like for
|
||||
manually-submitted rageshakes.
|
||||
|
||||
If `bug_report_endpoint_url` is set to Element's rageshake server,
|
||||
then this field should be set to `"element-auto-uisi"` as in
|
||||
`config.sample.json`. If `bug_report_endpoint_url` is left out,
|
||||
this field has no effect and can be left out as well. If you are
|
||||
using your own rageshake server, set this field in accordance with
|
||||
your rageshake server configuration.
|
||||
1. `roomDirectory`: config for the public room directory. This section is optional.
|
||||
1. `roomDirectory.servers`: List of other homeservers' directories to include in the drop
|
||||
down list. Optional.
|
||||
|
@ -70,7 +87,7 @@ For a good example, see https://develop.element.io/config.json.
|
|||
1. `update_base_url` (electron app only): HTTPS URL to a web server to download
|
||||
updates from. This should be the path to the directory containing `macos`
|
||||
and `win32` (for update packages, not installer packages).
|
||||
1. `piwik`: Analytics can be disabled by setting `piwik: false` or by leaving the piwik config
|
||||
1. DEPRECATED: `piwik`: Analytics can be disabled by setting `piwik: false` or by leaving the piwik config
|
||||
option out of your config file. If you want to enable analytics, set `piwik` to be an object
|
||||
containing the following properties:
|
||||
1. `url`: The URL of the Piwik instance to use for collecting analytics
|
||||
|
@ -109,7 +126,12 @@ For a good example, see https://develop.element.io/config.json.
|
|||
`/.well-known/matrix/client` in its well-known location, and the JSON file
|
||||
at that location has a key `m.vector.riot.jitsi`. In this case, the
|
||||
configuration found in the well-known location is used instead.
|
||||
|
||||
1. `jitsiWidget`: Options to change the built-in Jitsi widget behaviour. `jitsi` controls
|
||||
how the widget gets created, but not how it behaves.
|
||||
1. `skipBuiltInWelcomeScreen`: If you'd like to skip the default "Join Conference"
|
||||
behaviour, set this to `true`. This will cause the widget to assume that there's
|
||||
a Jitsi welcome screen set up and point the user towards that. Note that this can
|
||||
cause the camera/microphone to flicker as "in use" while Jitsi tests the devices.
|
||||
1. `enable_presence_by_hs_url`: The property key should be the URL of the homeserver
|
||||
and its value defines whether to enable/disable the presence status display
|
||||
from that homeserver. If no options are configured, presence is shown for all
|
||||
|
@ -168,6 +190,9 @@ For a good example, see https://develop.element.io/config.json.
|
|||
when explaining to the user where data is being sent. If not set, defaults to `brand`.
|
||||
1. `defaultDeviceDisplayName`: The default device display name to use for new logins
|
||||
and registrations. If not set then a calculated version will be used.
|
||||
1. `custom_translations_url`: An optional URL to allow overriding of translatable strings.
|
||||
The JSON file must be in a format of `{"affected string": {"languageCode": "new string"}}`.
|
||||
See https://github.com/matrix-org/matrix-react-sdk/pull/7886 for details.
|
||||
|
||||
Note that `index.html` also has an og:image meta tag that is set to an image
|
||||
hosted on riot.im. This is the image used if links to your copy of Element
|
||||
|
|
|
@ -16,19 +16,53 @@ the React SDK, you can still override it from the Element Web layer:
|
|||
`element-web/src/customisations/YourNameSecurity.ts`
|
||||
2. Edit customisations points and make sure export the ones you actually want to
|
||||
activate
|
||||
3. Tweak the Element build process to use the customised module instead of the
|
||||
default by adding this to the `additionalPlugins` array in `webpack.config.js`:
|
||||
3. Create/add an entry to `customisations.json` next to the webpack config:
|
||||
|
||||
```js
|
||||
new webpack.NormalModuleReplacementPlugin(
|
||||
/src[\/\\]customisations[\/\\]Security\.ts/,
|
||||
path.resolve(__dirname, 'src/customisations/YourNameSecurity.ts'),
|
||||
),
|
||||
```json
|
||||
{
|
||||
"src/customisations/Security.ts": "src/customisations/YourNameSecurity.ts"
|
||||
}
|
||||
```
|
||||
|
||||
If we add more customisation modules in the future, we'll likely improve these
|
||||
steps to remove the need for build changes like the above.
|
||||
|
||||
By isolating customisations to their own module, this approach should remove the
|
||||
chance of merge conflicts when updating your fork, and thus simplify ongoing
|
||||
maintenance.
|
||||
|
||||
**Note**: The project deliberately does not exclude `customisations.json` from Git.
|
||||
This is to ensure that in shared projects it's possible to have a common config. By
|
||||
default, Element Web does *not* ship with this file to prevent conflicts.
|
||||
|
||||
### Custom components
|
||||
|
||||
Instead of implementing skinning from the react-sdk, maintainers can use the above system to override components
|
||||
if they wish. Maintenance and API surface compatibility are left as a responsibility for the project - the layering
|
||||
in Element Web (including the react-sdk) do not make guarantees that properties/state machines won't change.
|
||||
|
||||
### Component visibility customisation
|
||||
|
||||
UI for some actions can be hidden via the ComponentVisibility customisation:
|
||||
- inviting users to rooms and spaces,
|
||||
- creating rooms,
|
||||
- creating spaces,
|
||||
|
||||
To customise visibility create a customisation module from [ComponentVisibility](https://github.com/matrix-org/matrix-react-sdk/blob/master/src/customisations/ComponentVisibility.ts) following the instructions above.
|
||||
|
||||
`shouldShowComponent` determines whether the active MatrixClient user should be able to use
|
||||
the given UI component. When `shouldShowComponent` returns falsy all UI components for that feature will be hidden.
|
||||
If shown, the user might still not be able to use the
|
||||
component depending on their contextual permissions. For example, invite options
|
||||
might be shown to the user, but they won't have permission to invite users to
|
||||
the current room: the button will appear disabled.
|
||||
|
||||
For example, to only allow users who meet a certain condition to create spaces:
|
||||
```typescript
|
||||
function shouldShowComponent(component: UIComponent): boolean {
|
||||
if (component === UIComponent.CreateSpaces) {
|
||||
// customConditionCheck() is a function of your own creation
|
||||
const userMeetsCondition = customConditionCheck(MatrixClientPeg.get().getUserId());
|
||||
return userMeetsCondition;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
```
|
||||
In this example, all UI related to creating a space will be hidden unless the users meets the custom condition.
|
||||
|
|
24
docs/labs.md
24
docs/labs.md
|
@ -165,3 +165,27 @@ who prefer to have the right panel open consistently across rooms.
|
|||
If no right panel state is known for the room or it was closed on the last room
|
||||
visit, it will default to the room member list. Otherwise, the saved card last
|
||||
used in that room is shown.
|
||||
|
||||
## Show current profile of users on historical messages (`feature_use_only_current_profiles`)
|
||||
|
||||
An experimental flag to determine how the app would behave if a user's current display
|
||||
name and avatar (profile) were shown on historical messages instead of the profile details
|
||||
at the time when the message was sent.
|
||||
|
||||
When enabled, historical messages will use the current profile for the sender.
|
||||
|
||||
## Pin drop location sharing (`feature_location_share_pin_drop`) [In Development]
|
||||
|
||||
Enables sharing a pin drop location to the timeline.
|
||||
|
||||
## Live location sharing (`feature_location_share_live`) [In Development]
|
||||
|
||||
Enables sharing your current location to the timeline, with live updates.
|
||||
|
||||
## Threaded Messaging (`feature_thread`)
|
||||
|
||||
Threading allows users to branch out a new conversation from the main timeline of a room. This is particularly useful in high traffic rooms where multiple conversations can happen in parallel or when a single discussion might stretch over a very long period of time.
|
||||
|
||||
Threads can be access by clicking their summary below the root event on the room timeline. Users can find a comprehensive list of threads by click the icon on the room header button.
|
||||
|
||||
This feature might work in degraded mode if the homeserver a user is connected to does not advertise support for the unstable feature `org.matrix.msc3440` when calling the `/versions` API endpoint.
|
||||
|
|
|
@ -30,7 +30,7 @@ function getColorName(hex) {
|
|||
|
||||
## Adding new strings
|
||||
|
||||
1. Check if the import ``import { _t } from 'matrix-react-sdk/lib/languageHandler';`` is present. If not add it to the other import statements. Also import `_td` if needed.
|
||||
1. Check if the import ``import { _t } from 'matrix-react-sdk/src/languageHandler';`` is present. If not add it to the other import statements. Also import `_td` if needed.
|
||||
1. Add ``_t()`` to your string. (Don't forget curly braces when you assign an expression to JSX attributes in the render method). If the string is introduced at a point before the translation system has not yet been initialized, use `_td()` instead, and call `_t()` at the appropriate time.
|
||||
1. Run `yarn i18n` to update ``src/i18n/strings/en_EN.json``
|
||||
1. If you added a string with a plural, you can add other English plural variants to ``src/i18n/strings/en_EN.json`` (remeber to edit the one in the same project as the source file containing your new translation).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue