Skip to content

Commit b79bd77

Browse files
committed
content [nfc]: Convert content parsing/rendering TODOs to issues
Filed zulip#191, zulip#192, zulip#193, zulip#194.
1 parent 04deea2 commit b79bd77

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

lib/model/content.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ class QuotationNode extends BlockContentNode {
114114
}
115115

116116
class CodeBlockNode extends BlockContentNode {
117-
// TODO represent the code-highlighting style spans in CodeBlockNode
117+
// TODO(#191) represent the code-highlighting style spans in CodeBlockNode
118118
const CodeBlockNode({super.debugHtmlNode, required this.text});
119119

120120
final String text;
@@ -357,7 +357,7 @@ BlockContentNode parseCodeBlock(dom.Element divElement) {
357357
}
358358
buffer.write(text);
359359
} else if (child is dom.Element && child.localName == 'span') {
360-
// TODO parse the code-highlighting spans, to style them
360+
// TODO(#191) parse the code-highlighting spans, to style them
361361
buffer.write(child.text);
362362
} else {
363363
return UnimplementedBlockContentNode(htmlNode: divElement);
@@ -436,7 +436,7 @@ BlockContentNode parseBlockContent(dom.Node node) {
436436
case 'h6': headingLevel = HeadingLevel.h6; break;
437437
}
438438
if (headingLevel == HeadingLevel.h6 && classes.isEmpty) {
439-
// TODO handle h1, h2, h3, h4, h5
439+
// TODO(#192) handle h1, h2, h3, h4, h5
440440
return HeadingNode(
441441
headingLevel!, inlineNodes(), debugHtmlNode: debugHtmlNode);
442442
}

lib/widgets/content.dart

+5-5
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class BlockContentNodeWidget extends StatelessWidget {
8282
} else if (node is ListNode) {
8383
return ListNodeWidget(node: node);
8484
} else if (node is HeadingNode) {
85-
// TODO h1, h2, h3, h4, h5 -- same as h6 except font size
85+
// TODO(#192) h1, h2, h3, h4, h5 -- same as h6 except font size
8686
assert(node.level == HeadingLevel.h6);
8787
return Padding(
8888
padding: const EdgeInsets.only(top: 15, bottom: 5),
@@ -158,7 +158,7 @@ class ListNodeWidget extends StatelessWidget {
158158
// but that comes out too close to item; not sure what's fixing that
159159
// in a browser
160160
case ListStyle.unordered: marker = "• "; break;
161-
// TODO ordered lists starting not at 1: https://github.com/zulip/zulip-flutter/issues/59
161+
// TODO(#59) ordered lists starting not at 1
162162
case ListStyle.ordered: marker = "${index+1}. "; break;
163163
}
164164
return ListItemWidget(marker: marker, nodes: item);
@@ -200,7 +200,7 @@ class MessageImage extends StatelessWidget {
200200
Widget build(BuildContext context) {
201201
final message = InheritedMessage.of(context);
202202

203-
// TODO multiple images in a row
203+
// TODO(#193) multiple images in a row
204204
// TODO image hover animation
205205
final src = node.srcUrl;
206206

@@ -458,7 +458,7 @@ class MessageUnicodeEmoji extends StatelessWidget {
458458

459459
@override
460460
Widget build(BuildContext context) {
461-
// TODO get spritesheet and show actual emoji glyph
461+
// TODO(#58) get spritesheet and show actual emoji glyph
462462
final text = node.text;
463463
return Container(
464464
padding: const EdgeInsets.all(2),
@@ -624,7 +624,7 @@ InlineSpan _errorUnimplemented(UnimplementedNode node) {
624624
// For now this shows error-styled HTML code even in release mode,
625625
// because release mode isn't yet about general users but developer demos,
626626
// and we want to keep the demos honest.
627-
// TODO think through UX for general release
627+
// TODO(#194) think through UX for general release
628628
final htmlNode = node.htmlNode;
629629
if (htmlNode is dom.Element) {
630630
return TextSpan(children: [

0 commit comments

Comments
 (0)