Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Add stable unstable feature for jump to date before v1.6 is fully supported on a homeserver #10398

Conversation

MadLittleMods
Copy link
Contributor

@MadLittleMods MadLittleMods commented Mar 16, 2023

Add stable unstable feature (org.matrix.msc3030.stable) for jump to date before v1.6 is fully supported on a homeserver. Discussion for whether we are okay with moving forward with this -> #10398 (comment)

Related to element-hq/element-web#24362 but does not solve immediately because Synapse does not supply org.matrix.msc3030.stable yet. Synapse PR: matrix-org/synapse#15283

Also refactored ServerSupportUnstableFeatureController to support multiple feature groups where any one of them will enable the setting. All features in a feature group are required. See discussion -> #10398 (comment)

Checklist

  • Tests written for new code (and old code if feasible)
  • Linter and other CI checks pass
  • Sign-off given on the changes (see CONTRIBUTING.md)

This change is marked as an internal change (Task), so will not be included in the changelog.

@MadLittleMods MadLittleMods added the T-Task Refactoring, enabling or disabling functionality, other engineering tasks label Mar 16, 2023
@@ -372,8 +372,8 @@ export const SETTINGS: { [setting: string]: ISetting } = {
controller: new ServerSupportUnstableFeatureController(
"feature_jump_to_date",
defaultWatchManager,
["org.matrix.msc3030"],
undefined,
[["org.matrix.msc3030"], ["org.matrix.msc3030.stable"]],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add stable unstable version (org.matrix.msc3030.stable) for jump to date before v1.6 is fully supported on a homeserver.

org.matrix.msc3030.stable wasn't included in MSC3030 but it seems like pattern that should have been included like MSC2285 as an example.

Are we okay with moving forward with this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +36 to +39
* @param unstableFeatureGroups - If any one of the feature groups is satisfied,
* then the setting is considered enabled. A feature group is satisfied if all of
* the features in the group are supported (all features in a group are required).
*/
Copy link
Contributor Author

@MadLittleMods MadLittleMods Mar 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As suggested by @t3chguy in #10398 (comment),

Guess it should be extended to string[][] where its an OR of AND groups to offer more flexibility

Refactoring ServerSupportUnstableFeatureController to support multiple feature groups where any one of them will enable the setting. All features in a feature group are required.

This way having either org.matrix.msc3030 or org.matrix.msc3030.stable will enable the jump to date feature flag with a config of [["org.matrix.msc3030"], ["org.matrix.msc3030.stable"]]

If you want to AND features together like before, just add them to the same group: [["foo", "bar"]]

@MadLittleMods MadLittleMods marked this pull request as ready for review March 17, 2023 08:06
@MadLittleMods MadLittleMods requested a review from a team as a code owner March 17, 2023 08:06
Copy link
Member

@t3chguy t3chguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks for extending the controller

@robintown
Copy link
Member

Related: element-hq/element-web#24362

@MadLittleMods
Copy link
Contributor Author

@robintown Feel free to edit this type of info directly in the description

…-for-jump-to-date

Conflicts:
	src/settings/Settings.tsx
@MadLittleMods MadLittleMods merged commit bc60e59 into develop Mar 17, 2023
@MadLittleMods MadLittleMods deleted the madlittlemods/add-stable-unstable-version-for-jump-to-date branch March 17, 2023 20:08
@MadLittleMods
Copy link
Contributor Author

Thanks for the review @t3chguy and taking a look @robintown 🐮

MadLittleMods added a commit to matrix-org/synapse that referenced this pull request Mar 17, 2023
…ported on Synapse

Related to #15089

Element Web PR to honor `org.matrix.msc3030.stable`: matrix-org/matrix-react-sdk#10398
@MadLittleMods MadLittleMods changed the title Add stable unstable version for jump to date before v1.6 is fully supported on a homeserver Add stable unstable feature for jump to date before v1.6 is fully supported on a homeserver Mar 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-Task Refactoring, enabling or disabling functionality, other engineering tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants