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

Add feature flag 'feature_new_room_decoration_ui' and segrate legacy UI component #11345

Merged
merged 2 commits into from
Aug 1, 2023

Conversation

germain-gg
Copy link
Contributor

@germain-gg germain-gg commented Jul 31, 2023

Fixes element-hq/element-web#25887

Adds a new labs flag feature_new_room_decoration_ui that will be useful during the development of element-hq/element-web#25883

Current UI changes:

Screenshot 2023-07-31 at 16 54 02

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.

@germain-gg germain-gg added the T-Task Refactoring, enabling or disabling functionality, other engineering tasks label Jul 31, 2023
@germain-gg germain-gg requested a review from a team as a code owner July 31, 2023 14:23
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.

We should not have labs flags that do effectively nothing. We had this with favouriting messages and it created a lot of additional support load.

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.

Github is making the RoomHeader/LegacyRoomHeader thing impossible to review. Any chance you could try to convince it that RoomHeader is a new file and that LegacyRoomHeader is predominantly a move? Maybe we could forgo most of this change by having NewRoomHeader until such time when we replace the "Legacy" one and thus everything is straight renames/moves.

image

"mx_RoomHeader_button": true,
"mx_RoomHeader_button--highlight": isHighlighted,
"mx_RoomHeader_button--unread": isUnread,
"mx_LegacyRoomHeader_button": true,
Copy link
Member

Choose a reason for hiding this comment

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

This implies this should be LegacyHeaderButton

This comment was marked as outdated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, these classes should not be existing in this file in the first place. I will be keeping this file with the current name and will not spend time refactoring code we're looking to remove.

viewingCall={false}
activeCall={null}
/>
{SettingsStore.getValue("feature_new_room_decoration_ui") ? (
Copy link
Member

Choose a reason for hiding this comment

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

Could we monitor/watch the setting instead of requiring a refresh?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd rather skip this change altogether, i do not want to add more logic that i need to write tests for.

@germain-gg
Copy link
Contributor Author

Maybe we could forgo most of this change by having NewRoomHeader until such time when we replace the "Legacy" one and thus everything is straight renames/moves.

This is just pushing the problem further down the line. I'd rather keep it this way for now.

@t3chguy
Copy link
Member

t3chguy commented Jul 31, 2023

This is just pushing the problem further down the line

Do you have an alternative to convince git/hub to simplify the diff?

@germain-gg
Copy link
Contributor Author

Unfortunately no. I have not changed any of the logic.

@germain-gg germain-gg requested a review from t3chguy July 31, 2023 16:36
@t3chguy
Copy link
Member

t3chguy commented Jul 31, 2023

The diff disagrees. Could you rebase into sensible commits?

Maybe something like

  1. Rename existing stuff
  2. Create new RoomHeader

@germain-gg
Copy link
Contributor Author

@t3chguy Sure, done. Hopefully those two commits help you to have a better review.

@t3chguy
Copy link
Member

t3chguy commented Jul 31, 2023

@germain-gg I don't think that quite worked - b99467b doesn't rename as it claims - it copies. Making the diff have an extra ~819 lines to review which is making it more difficult

3759042 also doesn't create the new room header as it claims, instead it just modifies an existing file.

@germain-gg
Copy link
Contributor Author

Well, i'm not sure how to make git change that. Further, but happy to hear suggestions

@t3chguy
Copy link
Member

t3chguy commented Jul 31, 2023

In b99467b you created a new file instead of renaming, not sure how else to say how to fix it. A rename != copy, its a move

@t3chguy
Copy link
Member

t3chguy commented Jul 31, 2023

@germain-gg like cfef892 + 4ff5ae9 but also for the pcss file

@t3chguy
Copy link
Member

t3chguy commented Jul 31, 2023

@germain-gg thanks so much, those 2 commits look great. Just add one which fixes whatever is upsetting CI - don't bother rebasing into the existing 2 commits - and once that last commit looks good I'll approve

@germain-gg
Copy link
Contributor Author

done. the commits contain the diff for the file rename.

@t3chguy
Copy link
Member

t3chguy commented Jul 31, 2023

@germain-gg while we wait for CI can you add it to labs.md?

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.

LGTM once documented as per https://github.com/vector-im/element-web/blob/develop/docs/config.md#labs-flags

Thanks for wrangling the commits into sane shape

@germain-gg germain-gg added this pull request to the merge queue Aug 1, 2023
Merged via the queue into develop with commit 6ae7c03 Aug 1, 2023
@germain-gg germain-gg deleted the germain-gg/25887 branch August 1, 2023 07:56
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.

Create labs flag for room header UI
2 participants