Skip to content

Commit da8fd45

Browse files
author
Cata
authored
fix: adjust Data Flow CSS rules (#627)
1 parent 759bec2 commit da8fd45

File tree

2 files changed

+21
-16
lines changed

2 files changed

+21
-16
lines changed

infrastructure/code/code_html_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func Test_Code_Html_getCodeDetailsHtml(t *testing.T) {
6969
assert.Contains(t, codePanelHtml, `<table class="data-flow-table">`)
7070
assert.Contains(t, codePanelHtml, `main.ts`)
7171
assert.Contains(t, codePanelHtml, `line:5`)
72-
assert.Contains(t, codePanelHtml, `<td class="data-flow-text">import * as http from &#39;http&#39;;</td>`)
72+
assert.Contains(t, codePanelHtml, `<code>import * as http from &#39;http&#39;;</code>`)
7373

7474
// assert Ignore Details section - Elements should not be present
7575
assert.NotContains(t, codePanelHtml, `class=ignore-warning-wrapper`)

infrastructure/code/template/details.html

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
overflow-y: auto;
6363
}
6464

65-
.arrow {
65+
.arrow {
6666
margin: 3px;
6767
cursor: pointer;
6868
}
@@ -88,7 +88,7 @@
8888
.ignore-details-header,
8989
.data-flow-header,
9090
.ai-fix-header,
91-
.overview-text > h2 {
91+
.overview-text>h2 {
9292
line-height: 1.25rem;
9393
font-size: 1.2rem;
9494
margin-bottom: 10px;
@@ -232,10 +232,14 @@
232232
.data-flow-text {
233233
margin-right: 8px;
234234
font-weight: 400;
235-
font-size: 1.4rem;
236235
word-break: break-all;
237236
}
238237

238+
.data-flow-text code {
239+
background: none;
240+
background-color: transparent;
241+
}
242+
239243
.data-flow-delimiter {
240244
opacity: 0.5;
241245
}
@@ -322,7 +326,6 @@
322326
display: inline-block;
323327
white-space: pre-wrap;
324328
font-weight: 400;
325-
font-size: 1.4rem;
326329
background-color: transparent;
327330
}
328331

@@ -889,17 +892,19 @@ <h2 class="data-flow-header">
889892
</div>
890893
<table class="data-flow-table">
891894
<tbody>
892-
{{range $dataFlowItems}}
893-
<tr class="data-flow-row">
894-
<td class="data-flow-number">{{.Number}}</td>
895-
<td class="data-flow-clickable-row" file-path="{{.FilePath}}" start-line="{{.StartLine}}"
896-
end-line="{{.EndLine}}" start-character="{{.StartCharacter}}" end-character="{{.EndCharacter}}">
897-
line:{{.StartLineValue}}
898-
</td>
899-
<td class="delimiter data-flow-delimiter">|</td>
900-
<td class="data-flow-text">{{.Content}}</td>
901-
</tr>
902-
{{end}}
895+
{{range $dataFlowItems}}
896+
<tr class="data-flow-row">
897+
<td class="data-flow-number">{{.Number}}</td>
898+
<td class="data-flow-clickable-row" file-path="{{.FilePath}}" start-line="{{.StartLine}}"
899+
end-line="{{.EndLine}}" start-character="{{.StartCharacter}}" end-character="{{.EndCharacter}}">
900+
line:{{.StartLineValue}}
901+
</td>
902+
<td class="delimiter data-flow-delimiter">|</td>
903+
<td class="data-flow-text">
904+
<code>{{.Content}}</code>
905+
</td>
906+
</tr>
907+
{{end}}
903908
</tbody>
904909
</table>
905910
{{end}}

0 commit comments

Comments
 (0)