element-hq / element-hq/element-web

Extend capability of io.element.widgets.layout event

Open
#20,235 1 comment 0 reactions 0 assignees View on GitHub
A-Room-View A-Widgets O-Occasional T-Enhancement
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

### Your use case

#### What would you like to do?
The current `io.element.widgets.layout` event implementation allows you to prepare a room layout with specific widgets pinned into the room's timeline. It allows you to define relative widths and heights of the widgets, if multiple widgets are pinned to the room they can be placed in columns.
We want to extend this feature to multiple rows and also allow rooms to open right panel widgets by default.

#### Why would you like to do it?
In some cases it is not necessary to reduce the visual space of the timeline by pinning a widget into the timeline. Instead it would be sufficient if widgets could be made visible in the sidebar by default. A good example for this requirement is the [schedule widget for the FOSDEM 2021 conference](https://matrix.org/blog/2021/02/15/how-we-hosted-fosdem-2021-on-matrix#how-was-it-built). Setting the sidebar layout to show this widget by default when you join the room would drastically improve the discoverability of the feature.

#### How would you like to achieve it?
1. Change the [default behavior of the "right" position](https://github.com/matrix-org/matrix-react-sdk/blob/8a0398b632dff1a5f6cfd4bf95d78854aeadc60e/src/stores/widgets/WidgetLayoutStore.ts#L37). If it is set the sidebar should be opened and display the specified widget. Add a new position called "hidden" to define that a widget is not part of the default room layout.
2. Add a new "row" value so multiple widgets can be placed on multiple rows. e.g. Jitsi in full width on the first row and an etherpad widget below.

### Have you considered any alternatives?

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.