From 51383ec0841ec2562e5c4a9dadd4fef82974dd5c Mon Sep 17 00:00:00 2001 From: zeripath Date: Mon, 13 Feb 2023 17:59:59 +0000 Subject: Move helpers to be prefixed with `gt-` (#22879) As discussed in #22847 the helpers in helpers.less need to have a separate prefix as they are causing conflicts with fomantic styles This will allow us to have the `.gt-hidden { display:none !important; }` style that is needed to for the reverted PR. Of note in doing this I have noticed that there was already a conflict with at least one chroma style which this PR now avoids. I've also added in the `gt-hidden` style that matches the tailwind one and switched the code that needed it to use that. Signed-off-by: Andrew Thornton --------- Signed-off-by: Andrew Thornton Co-authored-by: wxiaoguang --- templates/repo/diff/blob_excerpt.tmpl | 6 ++-- templates/repo/diff/box.tmpl | 42 ++++++++++++++-------------- templates/repo/diff/comment_form.tmpl | 2 +- templates/repo/diff/comments.tmpl | 8 +++--- templates/repo/diff/compare.tmpl | 12 ++++---- templates/repo/diff/conversation.tmpl | 20 ++++++------- templates/repo/diff/image_diff.tmpl | 2 +- templates/repo/diff/new_review.tmpl | 8 +++--- templates/repo/diff/section_split.tmpl | 8 +++--- templates/repo/diff/section_unified.tmpl | 2 +- templates/repo/diff/stats.tmpl | 2 +- templates/repo/diff/whitespace_dropdown.tmpl | 16 +++++------ 12 files changed, 64 insertions(+), 64 deletions(-) (limited to 'templates/repo/diff') diff --git a/templates/repo/diff/blob_excerpt.tmpl b/templates/repo/diff/blob_excerpt.tmpl index 402435c467..f4f7732c50 100644 --- a/templates/repo/diff/blob_excerpt.tmpl +++ b/templates/repo/diff/blob_excerpt.tmpl @@ -25,7 +25,7 @@ {{$inlineDiff := $.section.GetComputedInlineDiffFor $line $.locale}} {{if and $line.LeftIdx $inlineDiff.EscapeStatus.Escaped}}{{end}} - {{if $line.LeftIdx}}{{end}} + {{if $line.LeftIdx}}{{end}} {{/* */}}{{if $line.LeftIdx}}{{template "repo/diff/section_code" dict "diff" $inlineDiff "locale" $.locale}}{{else}}{{/* */}}{{/* @@ -33,7 +33,7 @@ */}} {{if and $line.RightIdx $inlineDiff.EscapeStatus.Escaped}}{{end}} - {{if $line.RightIdx}}{{end}} + {{if $line.RightIdx}}{{end}} {{/* */}}{{if $line.RightIdx}}{{template "repo/diff/section_code" dict "diff" $inlineDiff "locale" $.locale}}{{else}}{{/* */}}{{/* @@ -69,7 +69,7 @@ {{end}} {{$inlineDiff := $.section.GetComputedInlineDiffFor $line $.locale}} {{if $inlineDiff.EscapeStatus.Escaped}}{{end}} - + {{$inlineDiff.Content}} {{end}} diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index 4bc211f931..319fdb58f8 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -13,21 +13,21 @@

{{.locale.Tr "repo.diff.data_not_available"}}

{{else}}
-
-
- +
+
+ {{/* the icon meaning is reversed here, "octicon-sidebar-collapse" means show the file tree */}} {{svg "octicon-sidebar-collapse" 20 "icon hide"}} {{svg "octicon-sidebar-expand" 20 "icon"}} -
- {{svg "octicon-diff" 16 "mr-2"}}{{.locale.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2html}} +
+ {{svg "octicon-diff" 16 "gt-mr-2"}}{{.locale.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2html}}
-
+
{{if and .PageIsPullFiles $.SignedUserID (not .IsArchived)}} - -