flutter / flutter/devtools

Syntax highlighting improvements

オープン
#5,821 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
P2 screen: debugger
主要言語
Dart
スター
1.7k
フォーク
404
平均マージ
6日 17時間
マージ済み PR(30日)
18

説明

A couple things I noticed while updating some debugger panel tests:

1. If there is no `grammar`, the `SyntaxHighlighter` returns a `TextSpan` with no children. This is a problem because in `CodeView` (the only place where our `SyntaxHighlighter` is used, we expect the `TextSpan` to have children, and we loop through the children to break the span into lines. Therefore, if there is no grammar, we display the entire script on a single line.
2. We loop through the entire source twice. Once to add the syntax highlighting, and then again to break it into lines. We could see some performance improvements if we do both in one step (see https://github.com/flutter/devtools/issues/5703)

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

唯一記載されている利用者である SyntaxHighlighter と CodeView から始め、次に issue で言及されているデバッガーパネルのテストを調べます。文法が利用できない場合の動作を確認し、構文ハイライトと改行が 1 回のソースパスで処理されることを測定し、既存のテストが引き続きすべて通ることを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
dart
領域
devtools, performance
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。