Horizontally scrollable code blocks (#5001)

* Remove attributed string backed codeblock background color

* Add code block support to attributed string componentization

* Render code blocks within their own custom horizontal scroll view within the timeline

* Update preview test snapshots

* Introduce a attributed string component type instead of a 2 different booleans.
This commit is contained in:
Stefan Ceriu
2026-01-26 12:39:55 +02:00
committed by GitHub
parent 184dd5cf7f
commit 11af2bb0ca
9 changed files with 75 additions and 36 deletions

View File

@@ -349,14 +349,14 @@ class AttributedStringBuilderTests: XCTestCase {
}
let coalescedComponents = attributedString.formattedComponents
XCTAssertEqual(coalescedComponents.count, 1)
XCTAssertEqual(coalescedComponents.count, 3)
guard let component = coalescedComponents.first else {
XCTFail("Could not get the first component")
return
}
XCTAssertTrue(component.isBlockquote, "The reply quote should be a blockquote.")
XCTAssertTrue(component.type == .blockquote, "The reply quote should be a blockquote.")
}
func testMultipleGroupedBlockquotes() {