-
-
Notifications
You must be signed in to change notification settings - Fork 820
Allow maintaining a different right panel width for thread panels #11064
Changes from 1 commit
d53ba2d
d9d3b6d
e858785
48d61f3
3ad5e45
02bb437
dd398f6
c6eb1b0
08712e7
2855655
86c5b72
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -179,6 +179,10 @@ export interface IRoomState { | |
showApps: boolean; | ||
isPeeking: boolean; | ||
showRightPanel: boolean; | ||
/** | ||
* Whether the right panel shown is either of ThreadPanel or ThreadView. | ||
* Always false when `showRightPanel` is false. | ||
*/ | ||
threadRightPanel: boolean; | ||
t3chguy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
// error object, as from the matrix client/server API | ||
// If we failed to load information about the room, | ||
|
@@ -2454,6 +2458,8 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> { | |
<MainSplit | ||
panel={rightPanel} | ||
resizeNotifier={this.props.resizeNotifier} | ||
// Override defaults when a thread is being shown to allow persisting a separate | ||
// right panel width for thread panels as they tend to want to be wider. | ||
sizeKey={this.state.threadRightPanel ? "thread" : undefined} | ||
defaultSize={this.state.threadRightPanel ? 500 : undefined} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. a comment explaining this logic wouldn't hurt. I think the idea is: for a thread panel we default to 500px, for other panels we default to... something else? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. according to the IProps on MainSplit, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Its an optional prop, because of its presence in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I did wonder! |
||
> | ||
|
Uh oh!
There was an error while loading. Please reload this page.