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

Use a more generic layout setting - useIRCLayout → layout #5571

Merged
merged 11 commits into from
Feb 17, 2021

Conversation

SimonBrandner
Copy link
Contributor

@SimonBrandner SimonBrandner commented Jan 25, 2021

This PR converts the useIRCLayout setting to a more generic layout setting. This is a part of the preparations for merging chat-bubbles.

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
@t3chguy t3chguy requested review from a team and removed request for a team January 25, 2021 13:55
@t3chguy
Copy link
Member

t3chguy commented Jan 25, 2021

/me didn't notice it was a draft and got ahead of myself :D

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
@SimonBrandner SimonBrandner marked this pull request as ready for review January 26, 2021 12:45
@SimonBrandner SimonBrandner changed the title [WIP] Use a more generic layout setting - useIRCLayout → layout Use a more generic layout setting - useIRCLayout → layout Jan 26, 2021
@turt2live turt2live requested a review from a team January 28, 2021 07:30
Copy link
Collaborator

@jryans jryans left a comment

Choose a reason for hiding this comment

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

Thanks, seems like a good start!

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
@SimonBrandner
Copy link
Contributor Author

@jryans Thank you for the review! I've fixed some of the things. Please let me know if the rest is fine this way.

@SimonBrandner SimonBrandner requested a review from jryans February 5, 2021 07:37
Copy link
Collaborator

@jryans jryans left a comment

Choose a reason for hiding this comment

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

Thanks for working on this! Still a few things I'd like to see cleaned up, such as removing the commented out blocks.

@@ -106,6 +114,18 @@ export default class DeviceSettingsHandler extends SettingsHandler {
return Promise.resolve();
}

// Special case for old useIRCLayout setting
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since this is a device only level, is there any need to write the old value? It seems like it would only be needed if you are going back in time to old versions, which seems unlikely. (If it were account level and synced to other devices, we would need it, but that doesn't seem to be the case here.)

Copy link
Contributor Author

@SimonBrandner SimonBrandner Feb 15, 2021

Choose a reason for hiding this comment

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

This if statement is here to delete useIRCLayout. Otherwise, the following would always be true:

if (settings["useIRCLayout"]) return Layout.IRC;

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah okay, fair enough. I suppose alternatively the read path could always check the modern value first and stop there if it exists, but anyway, this seems okay too.

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
@SimonBrandner SimonBrandner requested a review from jryans February 16, 2021 19:56
Copy link
Collaborator

@jryans jryans left a comment

Choose a reason for hiding this comment

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

Thanks for working on this! This part seems ready to go. 😄

@@ -106,6 +114,18 @@ export default class DeviceSettingsHandler extends SettingsHandler {
return Promise.resolve();
}

// Special case for old useIRCLayout setting
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah okay, fair enough. I suppose alternatively the read path could always check the modern value first and stop there if it exists, but anyway, this seems okay too.

@jryans jryans merged commit 53c4a1a into matrix-org:develop Feb 17, 2021
@SimonBrandner SimonBrandner deleted the improve-layout-handling branch February 17, 2021 11:03
SimonBrandner added a commit to SimonBrandner/matrix-react-sdk that referenced this pull request Aug 26, 2021
Reverts part of matrix-org#5571

It's probably quite reasonable to remove this now (after ~6 months) instead of keeping this forever

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants