Skip to content

Commit 160a7c1

Browse files
authored
Move rich topics out of labs / stabilise MSC3765 (#29817)
Signed-off-by: Johannes Marbach <[email protected]>
1 parent c3c0432 commit 160a7c1

File tree

3 files changed

+0
-15
lines changed

3 files changed

+0
-15
lines changed

docs/labs.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,6 @@ Under the hood this stops Element Web from adding the `perParticipantE2EE` flag
101101

102102
This is useful while we experiment with encryption and to make calling compatible with platforms that don't use encryption yet.
103103

104-
## Rich text in room topics (`feature_html_topic`) [In Development]
105-
106-
Enables rendering of MD / HTML in room topics.
107-
108104
## Enable the notifications panel in the room header (`feature_notifications`)
109105

110106
Unreliable in encrypted rooms.

src/HtmlUtils.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -480,10 +480,6 @@ export function topicToHtml(
480480
ref?: LegacyRef<HTMLSpanElement>,
481481
allowExtendedHtml = false,
482482
): ReactNode {
483-
if (!SettingsStore.getValue("feature_html_topic")) {
484-
htmlTopic = undefined;
485-
}
486-
487483
let isFormattedTopic = !!htmlTopic;
488484
let topicHasEmoji = false;
489485
let safeTopic = "";

test/unit-tests/HtmlUtils-test.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ import { SettingLevel } from "../../src/settings/SettingLevel";
1717
import SdkConfig from "../../src/SdkConfig";
1818

1919
describe("topicToHtml", () => {
20-
afterEach(() => {
21-
SettingsStore.reset();
22-
});
23-
2420
function getContent() {
2521
return screen.getByRole("contentinfo").children[0].innerHTML;
2622
}
@@ -36,19 +32,16 @@ describe("topicToHtml", () => {
3632
});
3733

3834
it("converts literal HTML topic to HTML", async () => {
39-
SettingsStore.setValue("feature_html_topic", null, SettingLevel.DEVICE, true);
4035
render(<div role="contentinfo">{topicToHtml("<b>pizza</b>", undefined, null, false)}</div>);
4136
expect(getContent()).toEqual("&lt;b&gt;pizza&lt;/b&gt;");
4237
});
4338

4439
it("converts true HTML topic to HTML", async () => {
45-
SettingsStore.setValue("feature_html_topic", null, SettingLevel.DEVICE, true);
4640
render(<div role="contentinfo">{topicToHtml("**pizza**", "<b>pizza</b>", null, false)}</div>);
4741
expect(getContent()).toEqual("<b>pizza</b>");
4842
});
4943

5044
it("converts true HTML topic with emoji to HTML", async () => {
51-
SettingsStore.setValue("feature_html_topic", null, SettingLevel.DEVICE, true);
5245
render(<div role="contentinfo">{topicToHtml("**pizza** 🍕", "<b>pizza</b> 🍕", null, false)}</div>);
5346
expect(getContent()).toEqual('<b>pizza</b> <span class="mx_Emoji" title=":pizza:">🍕</span>');
5447
});

0 commit comments

Comments
 (0)