Skip to content

Conversation

@dbkr
Copy link
Member

@dbkr dbkr commented Oct 2, 2025

so we don't have to pass it into RoomView

We should really replace ResizerNotifier with ResizeObservers to do it automatically. This just merges in the change from the module experiments branch which makes it possible to create a roomview from a module (ie. without the module having to know about the ResizeNotifier to pass it to RoomView).

Checklist

so we don't have to pass it into RoomView
@dbkr dbkr added the T-Task Tasks for the team like planning label Oct 2, 2025
if (!!this.props.currentUserId) {
pageElement = (
<UserView userId={this.props.currentUserId} resizeNotifier={this.props.resizeNotifier} />
<UserView userId={this.props.currentUserId} resizeNotifier={this.context.resizeNotifier} />
Copy link
Member

Choose a reason for hiding this comment

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

Can UserView not also consume it via ctx?

Copy link
Member Author

Choose a reason for hiding this comment

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

Unfortunately UserView uses MatrixClientContext so suffers the multiple-context problem as it's still a class component.

pageType={this.props.page_type as PageTypes}
isMinimized={shouldUseMinimizedUI || false}
resizeNotifier={this.props.resizeNotifier}
resizeNotifier={this.context.resizeNotifier}
Copy link
Member

Choose a reason for hiding this comment

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

ditto for LeftPanel

Copy link
Member Author

Choose a reason for hiding this comment

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

This only gets resizeNotifier so it can pass it into the legacy room list which doesn't seem worth changing at this point, it can just be stripped out when the old room list dies?

Copy link
Member

Choose a reason for hiding this comment

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

Same for everything here =(

Copy link
Member Author

Choose a reason for hiding this comment

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

I've taken out a bunch of these, most of the remainders are ones involving MessageComposer.

@dbkr
Copy link
Member Author

dbkr commented Oct 3, 2025

I guess this should have another quick look as there's quite a lot more code gone in to get the tests passing again

@dbkr dbkr requested a review from t3chguy October 3, 2025 17:31
@dbkr dbkr enabled auto-merge October 6, 2025 08:38
@dbkr dbkr disabled auto-merge October 6, 2025 08:39
@Half-Shot Half-Shot self-requested a review October 6, 2025 08:46
});

it("should notify on resize start events", async () => {
//const user = userEvent.setup();
Copy link
Member

Choose a reason for hiding this comment

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

surprise commented out line?

Copy link
Member Author

Choose a reason for hiding this comment

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

oops, thanks

Copy link
Member

@Half-Shot Half-Shot left a comment

Choose a reason for hiding this comment

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

VoIP files look fine (modulo one commented out line on a test)

@dbkr dbkr added this pull request to the merge queue Oct 6, 2025
Merged via the queue into develop with commit c087755 Oct 6, 2025
35 checks passed
@dbkr dbkr deleted the dbkr/resizenotifier_to_sdkcontext branch October 6, 2025 09:39
ap-alpha-2 pushed a commit to omitech/element-web that referenced this pull request Oct 7, 2025
* Move ResizerNotifier into SDKContext

so we don't have to pass it into RoomView

* Fix test

* Unused import

* Add tests

* Remove a bunch of resizeNotifier props

* Remove more resizeNotifier props

* Add resizenotifier to test

* Add more sdkcontext wrappers in tests

* More sdkcontext wrappers

* Even more sdkcontext wrappers

* Add test to make sonarcloud happy

* Context isn't always there unlike props

* Test actual resizing too

* Remove commented line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-Task Tasks for the team like planning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants