-
-
Notifications
You must be signed in to change notification settings - Fork 829
Granular settings #1516
Granular settings #1516
Conversation
I think webcam and microphone should just remain local (device) variables, syncing them is pointless as the chance that they'd match between two devices is super slim |
I believe the design originally also had |
I'd disagree on |
@t3chguy webcam and microphone should indeed be device only, I just mislabeled them (fixed). What settings would The |
This is looking super-promising. I haven't had a chance to look at the code, but I assume the end result is an API which just provides a get/setSetting which magically abstracts away the various different levels of granularity? As you've pointed out, the vast majority of settings only make sense at a given level of granularity (typically per-device or per-account). However, I'm failing to grok the table you've written here - I wonder if it's worth spelling it out as an actual table so we can check we're all on the same page? Something like:
perhaps? |
@turt2live url previews for instance |
How do groups factor into this? I would hope that certain groups can contain defaults that apply to all of its rooms, which might be overrideable per room (perhaps with a setting to control what level may override group defaults...) Perhaps between room and default? |
For the moment, groups are completely ignored for this PR intentionally. Groups don't have a concept of a permissions system, so can't be implemented. When groups have a permissions system, they'll be easily implemented into this system. |
Thinking a bit more about groups: Their factorability is directly affected by how the permissions system gets implemented. If they have an arbitrary value store for users (matrix-org/synapse#2569) and another for the group itself (matrix-org/synapse#2570), then it would be fairly easy to add support for the tiers. I'd imagine group overrides would squeeze in between per-room and account (effectively making the chain room > group > account). |
the grid is excellent - thank you! I only spot one weirdness when doing a sanitycheck:
|
Oops! Missed that one. All settings are able to have their default be undefined, which is why all settings support it. |
(random thought: there is a lot of overlap between granular settings and the nightmare that is push notification settings - i.e. "adjust volume per room, per device-per-room, globally, etc". Given that notif settings have a whole 'nother level of fractaline complexity (per origin user, per content, etc) i think that having a proper push notif API is certainly the right approach to have taken, but just observing the parallels). |
GranularSettingStore is a class to manage settings of varying granularity, such as URL previews at the device, room, and account levels. Signed-off-by: Travis Ralston <[email protected]>
Signed-off-by: Travis Ralston <[email protected]>
Signed-off-by: Travis Ralston <[email protected]>
This does away with the room- and account-style settings, and just replaces them with `supportedLevels`. The handlers have also been moved out to be in better support of the other options, like SdkConfig and per-room-per-device. Signed-off-by: Travis Ralston <[email protected]>
83d8733
to
989bdcf
Compare
Signed-off-by: Travis Ralston <[email protected]>
Signed-off-by: Travis Ralston <[email protected]>
Signed-off-by: Travis Ralston <[email protected]>
Signed-off-by: Travis Ralston <[email protected]>
Signed-off-by: Travis Ralston <[email protected]>
Signed-off-by: Travis Ralston <[email protected]>
This breaks language selection. Signed-off-by: Travis Ralston <[email protected]>
Signed-off-by: Travis Ralston <[email protected]>
This currently causes a split-brain scenario for the application due to the priority of each level. Granular settings assumes a simple override, however the crypto setting wants per room to be overriden with the global setting, regardless of the room setting. Some additional comments are needed on the intended behaviour. Signed-off-by: Travis Ralston <[email protected]>
Signed-off-by: Travis Ralston <[email protected]>
Signed-off-by: Travis Ralston <[email protected]>
Signed-off-by: Travis Ralston <[email protected]>
Signed-off-by: Travis Ralston <[email protected]>
Signed-off-by: Travis Ralston <[email protected]>
Signed-off-by: Travis Ralston <[email protected]>
Signed-off-by: Travis Ralston <[email protected]>
Signed-off-by: Travis Ralston <[email protected]>
Signed-off-by: Travis Ralston <[email protected]>
Signed-off-by: Travis Ralston <[email protected]>
Signed-off-by: Travis Ralston <[email protected]>
So i've just worked through the whole enchilada again, courtesy of UA900's lovely in-flight wifi. The only stuff which jumps out at me is:
Otherwise it really looks great to me, and I am very tempted to 'merge early, merge often' so that we can test it in the upcoming groups RC... |
It isn't a setting. Signed-off-by: Travis Ralston <[email protected]>
Signed-off-by: Travis Ralston <[email protected]>
@ara4n I've gone ahead and made I've also dropped the notification toolbar setting. That isn't a setting, and shouldn't be in here. |
Signed-off-by: Travis Ralston <[email protected]>
Signed-off-by: Travis Ralston <[email protected]>
Signed-off-by: Travis Ralston <[email protected]>
Signed-off-by: Travis Ralston <[email protected]>
Signed-off-by: Travis Ralston <[email protected]>
tests pass locally so merging \o/ :) |
Required PRs
Description
This PR is very much inspired from @t3chguy's explanations of the matter. This implementation hides a lot of the actual getting and setting code to expose a single common interface where a couple lines of code can be used to update the different levels of a setting.
Granular settings have a human-readable level associated with them to best describe the area of impact. These levels are:
device
- only affects the current deviceroom-device
- only affects the target room on the current deviceroom-account
- only affects the target room, for the current useraccount
- only affects the current userroom
- affects all members of the target roomconfig
- affects all users of the application, defined by config.jsondefault
- affects everyone, defined by matrix-react-sdkThe farther you travel down the list of levels, the more and more generic you get. This implementation aims to return early if it finds a value at a given level to effectively 'override' the remaining levels.
Supported settings
● denotes 'supported but no ui/ux will be part of this PR'
✔ denotes 'supported and ui/ux will be part of this PR'
✓ indicates that the setting has been implemented in this PR
default
is always supported.MessageComposerInput.isRichTextEnabled
MessageComposer.showFormatting
Note: Color scheming is handled in #1479
This PR addresses:
General TODO items for this PR:
SettingsCheckbox
all overUserSettings
andRoomSettings
blacklistUnverifiedDevices
blacklistUnverifiedDevices
default_theme
in config.json (matthew/status branch - just bring in the setting)getLevelAt
specificity)ColorSettings
use thiscanSetValue
check the correct event type (ie: url previews)UserSettingsStore