Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Story] Create a new room (with ask to join & redesign) #2575

Open
2 of 5 tasks
mxandreas opened this issue Oct 15, 2024 · 4 comments
Open
2 of 5 tasks

[Story] Create a new room (with ask to join & redesign) #2575

mxandreas opened this issue Oct 15, 2024 · 4 comments

Comments

@mxandreas
Copy link

mxandreas commented Oct 15, 2024

Description

Background
In order to fit in the option to create a room with the knock join rule, the design of the room creation modal has been revisited to ensure it is optimized for the most common use cases (not to overwhelm users with a lot of choices to think about), and the UX becomes also more consistent between EX and EW.

The main differences that will remain between EX and EW:

  • EW continues to allow the creation of a room in the context of a space, hence it will allow a (private) room to be created with the accessible to space members aka restricted join rule.
  • EW keeps the Block anyone not part of element.io from ever joining this room. toggle in the Advanced section.

The following 2 tables show how the user controls are mapped to the room configuration, note it does not include obvious 1:1 mappings (e.g. room name or topic).

EX:
image

EW:
image

It is worth explicitly noting that on EW the E2EE is no longer shown - it defaults to either OFF or ON, depending on room's visibility.

Conditions

  • When the user is switching between the Private and Public visibility, the subsequent choices are reset to default.
    • E.g. effectively, when user selects Public as visibility, Anyone is always selected as access; and room address is auto-filled (from scratch) using current room name.

Public room & addresses

  • Alias (in APIs and technical specifications) is a synonym to address (used on UI).
  • To control if the room appears in the directory when browsing (e.g. the property Visibility in room directory in the tables above), this API is used.
  • A (technical) pre-requisite for the above is that the room has at least one alias. For alias creation there are 2 steps:
    • Create an (local to homeserver) alias with this API, e.g. PUT https://beta.ems.host/_matrix/client/v3/directory/room/%23laagri-b%3Abeta.matrix.org
    • Publish the alias through the m.room.canonical_alias state event, e.g. PUT https://beta.ems.host/_matrix/client/v3/rooms/!vQBVkoHQCPajfjlWBi%3Abeta.matrix.org/state/m.room.canonical_alias/ {"alt_aliases":[],"alias":"#laagri-b:beta.matrix.org"}

Designs:

Acceptance criteria

  • The configuration of the created room follows the mapping above.
  • When creating a room in the context of a space on EW, the Private visibility is selected by default and the Accessible to space members is selected by default (to keep current behavior).

Size estimate

None

Dependencies

  • None

Out of scope

  • There is a separate story for auto-filling the room address.

Open questions

Questions

Subtasks

Android

  1. T-Task
    ganfra

iOS

  1. T-Task
    Velin92

Rust

Other

No tasks being tracked yet.
@mxandreas mxandreas changed the title [Story] [WIP] Create a new room (with ask to join & redesign) [Story] Create a new room (with ask to join & redesign) Oct 16, 2024
@jmartinesp
Copy link
Member

I've added a couple of PRs that changed the room creation stage in Rust so we can:

  • Add a custom join rule (knocking).
  • Set a canonical room alias.

Besides that, the existing API already allows you to customise visibility, the preset used for creating the room, and whether E2EE is enabled. I'm not sure if we're missing anything else.

@mxandreas
Copy link
Author

mxandreas commented Oct 21, 2024

As a result of the discussion with @gaelledel and @ganfra we have decided to change the permissions for invite and kick from admin to moderator when you create a Ask to join room. That means that the only effective difference compared to what we have right now, is that for invite you need to be a moderator. For kick, you already needed to be a moderator.

@mxandreas
Copy link
Author

Made the following update:

Conditions

  • When the user is switching between the Private and Public visibility, the subsequent choices are reset to default.
    • E.g. effectively, when user selects Public as visibility, Anyone is always selected as access; and room address is auto-filled (from scratch) using current room name.

@mxandreas
Copy link
Author

This is to confirm the technical side of room publishing, and the address/alias that is required for that. I am pointing this out because this was not implemented in EX before and the topic is not trivial.

  • The visibility / publishing of the room in the homeserver's public room directory is done with this API
  • The room address/alias (which is a pre-requisite for the above) must be both:
    • A "local address" which is managed with this API
    • A "published address" which is a accomplished with the m.room.canonical_alias room event.

cc @ganfra

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants