Room list: edit or remove custom sections#33283
Room list: edit or remove custom sections#33283florianduros wants to merge 12 commits intodevelopfrom
Conversation
6409b4a to
9842cd6
Compare
9842cd6 to
e08f878
Compare
c98d985 to
9b7b0f0
Compare
9b7b0f0 to
63a70fb
Compare
63a70fb to
77c2191
Compare
| @@ -14,6 +14,11 @@ import DialogButtons from "../elements/DialogButtons"; | |||
| import { _t } from "../../../languageHandler"; | |||
There was a problem hiding this comment.
Padding around the title is EW default. Compound and EW have different dialog designs and until we decide to update the dialog styles this kind of differences will exist imo
| */ | ||
|
|
||
| .mx_RemoveSectionDialog { | ||
| color: var(--cpd-color-text-primary); |
There was a problem hiding this comment.
You don't have one for CreateSectionDialog. Presumably this is an archaic bug we're fixing, can you leave a comment?
There was a problem hiding this comment.
Not an archaic bug, EW dialog uses another color by default
| hasCancel={true} | ||
| > | ||
| <Text as="span">{_t("remove_section_dialog|confirmation")}</Text> | ||
| <Text as="span">{_t("remove_section_dialog|description")}</Text> |
There was a problem hiding this comment.
ooi, is there a reason for the two spans rather than combining into one?
There was a problem hiding this comment.
To have the same formatting than in figma. You prefer to put a <br /> in the translation?
| <Form.Label> {_t("create_section_dialog|label")}</Form.Label> | ||
| <Form.TextControl onChange={(evt) => setValue(evt.target.value)} required={true} /> | ||
| <Form.TextControl | ||
| value={value} |
There was a problem hiding this comment.
fwiw, in my testing I could insert whitetext before or after my section name and it would not be rendered in the list but accepted by this dialog
| <Form.TextControl onChange={(evt) => setValue(evt.target.value)} required={true} /> | ||
| <Form.TextControl | ||
| value={value} | ||
| onChange={(evt) => setValue(evt.target.value)} |
There was a problem hiding this comment.
Also noting it's possible to have duplicate section names
There was a problem hiding this comment.
Yep that is totally possible
| } | ||
|
|
||
| /** | ||
| * Edits an existing custom section by showing a dialog to the user to enter the new section name. If the user confirms, it updates the section data in the settings. |
There was a problem hiding this comment.
Holy line length batman (it would be helpful if this was kept to around 120 chars per line so it was easier to read)
There was a problem hiding this comment.
There is no currently formating rules enforcing it
| */ | ||
| export async function deleteSection(tag: string): Promise<void> { | ||
| const sectionData = SettingsStore.getValue("RoomList.CustomSectionData") || {}; | ||
| if (!sectionData[tag]) return; |
There was a problem hiding this comment.
Should this warn or throw, seems like there is an application bug if we get to this stage?
77c2191 to
fe2d7ae
Compare
gaelledel
left a comment
There was a problem hiding this comment.
If a section is empty, we still display "The chats in this section will still be available in your chats list." from the confirmation modal.
See below:

So if the section is empty, could we instead have
Title: Remove section?
Body: Are you sure you want to remove this section?
On contrary if the section contains at least one room, then we can display
Title: Remove section?
Body: Are you sure you want to remove this section? The chats in this section will still be available in your chats list.

Closes #32457
Add actions to be able to edit or remove the custom sections. A new menu is introduced in the section header on each custom sections.
Screen.Recording.2026-04-23.at.16.43.20.mov