Skip to content

Commit 4ed7d2a

Browse files
mrsdizzie6543lafriks
authored
Remove last traces of has-emoji class (#11263)
Now that emojify.js has been removed, get rid of all instances of has-emoji class that was only used for that. Support for rendering shortcodes should remain in all of these places so it should still work the same. Co-authored-by: 6543 <[email protected]> Co-authored-by: Lauris BH <[email protected]>
1 parent 1bdffef commit 4ed7d2a

File tree

23 files changed

+68
-59
lines changed

23 files changed

+68
-59
lines changed

modules/markup/html.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,8 @@ func RenderDescriptionHTML(
284284
urlPrefix: urlPrefix,
285285
procs: []processor{
286286
descriptionLinkProcessor,
287+
emojiShortCodeProcessor,
288+
emojiProcessor,
287289
},
288290
}
289291
return ctx.postProcess(rawHTML)

options/locale/locale_en-US.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -865,8 +865,8 @@ issues.label_templates.info = No labels exist yet. Create a label with 'New Labe
865865
issues.label_templates.helper = Select a label set
866866
issues.label_templates.use = Use Label Set
867867
issues.label_templates.fail_to_load_file = Failed to load label template file '%s': %v
868-
issues.add_label_at = added the <div class="ui label has-emoji" style="color: %s\; background-color: %s">%s</div> label %s
869-
issues.remove_label_at = removed the <div class="ui label has-emoji" style="color: %s\; background-color: %s">%s</div> label %s
868+
issues.add_label_at = added the <div class="ui label" style="color: %s\; background-color: %s">%s</div> label %s
869+
issues.remove_label_at = removed the <div class="ui label" style="color: %s\; background-color: %s">%s</div> label %s
870870
issues.add_milestone_at = `added this to the <b>%s</b> milestone %s`
871871
issues.change_milestone_at = `modified the milestone from <b>%s</b> to <b>%s</b> %s`
872872
issues.remove_milestone_at = `removed this from the <b>%s</b> milestone %s`

templates/explore/repo_list.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
</div>
3030
</div>
3131
<div class="description">
32-
{{if .DescriptionHTML}}<p class="has-emoji">{{.DescriptionHTML}}</p>{{end}}
32+
{{if .DescriptionHTML}}<p>{{.DescriptionHTML}}</p>{{end}}
3333
{{if .Topics }}
3434
<div class="ui tags">
3535
{{range .Topics}}

templates/repo/activity.tmpl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
<div class="ui green label">{{$.i18n.Tr "repo.activity.published_release_label"}}</div>
130130
{{.TagName}}
131131
{{if not .IsTag}}
132-
<a class="title has-emoji" href="{{$.RepoLink}}/src/{{.TagName | EscapePound}}">{{.Title}}</a>
132+
<a class="title" href="{{$.RepoLink}}/src/{{.TagName | EscapePound}}">{{.Title | RenderEmoji}}</a>
133133
{{end}}
134134
{{TimeSinceUnix .CreatedUnix $.Lang}}
135135
</p>
@@ -146,7 +146,7 @@
146146
{{range .Activity.MergedPRs}}
147147
<p class="desc">
148148
<div class="ui purple label">{{$.i18n.Tr "repo.activity.merged_prs_label"}}</div>
149-
#{{.Index}} <a class="title has-emoji" href="{{$.RepoLink}}/pulls/{{.Index}}">{{.Issue.Title}}</a>
149+
#{{.Index}} <a class="title" href="{{$.RepoLink}}/pulls/{{.Index}}">{{.Issue.Title | RenderEmoji}}</a>
150150
{{TimeSinceUnix .MergedUnix $.Lang}}
151151
</p>
152152
{{end}}
@@ -162,7 +162,7 @@
162162
{{range .Activity.OpenedPRs}}
163163
<p class="desc">
164164
<div class="ui green label">{{$.i18n.Tr "repo.activity.opened_prs_label"}}</div>
165-
#{{.Index}} <a class="title has-emoji" href="{{$.RepoLink}}/pulls/{{.Index}}">{{.Issue.Title}}</a>
165+
#{{.Index}} <a class="title" href="{{$.RepoLink}}/pulls/{{.Index}}">{{.Issue.Title | RenderEmoji}}</a>
166166
{{TimeSinceUnix .Issue.CreatedUnix $.Lang}}
167167
</p>
168168
{{end}}
@@ -178,7 +178,7 @@
178178
{{range .Activity.ClosedIssues}}
179179
<p class="desc">
180180
<div class="ui red label">{{$.i18n.Tr "repo.activity.closed_issue_label"}}</div>
181-
#{{.Index}} <a class="title has-emoji" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Title}}</a>
181+
#{{.Index}} <a class="title" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Title | RenderEmoji}}</a>
182182
{{TimeSinceUnix .ClosedUnix $.Lang}}
183183
</p>
184184
{{end}}
@@ -194,7 +194,7 @@
194194
{{range .Activity.OpenedIssues}}
195195
<p class="desc">
196196
<div class="ui green label">{{$.i18n.Tr "repo.activity.new_issue_label"}}</div>
197-
#{{.Index}} <a class="title has-emoji" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Title}}</a>
197+
#{{.Index}} <a class="title" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Title | RenderEmoji}}</a>
198198
{{TimeSinceUnix .CreatedUnix $.Lang}}
199199
</p>
200200
{{end}}
@@ -215,9 +215,9 @@
215215
<div class="ui green label">{{$.i18n.Tr "repo.activity.unresolved_conv_label"}}</div>
216216
#{{.Index}}
217217
{{if .IsPull}}
218-
<a class="title has-emoji" href="{{$.RepoLink}}/pulls/{{.Index}}">{{.Title}}</a>
218+
<a class="title" href="{{$.RepoLink}}/pulls/{{.Index}}">{{.Title | RenderEmoji}}</a>
219219
{{else}}
220-
<a class="title has-emoji" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Title}}</a>
220+
<a class="title" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Title | RenderEmoji}}</a>
221221
{{end}}
222222
{{TimeSinceUnix .UpdatedUnix $.Lang}}
223223
</p>

templates/repo/blame.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
</h4>
3535

3636
<div class="ui attached table unstackable segment">
37-
<div class="file-view code-view has-emoji">
37+
<div class="file-view code-view">
3838
<table>
3939
<tbody>
4040
<tr>

templates/repo/commits_list.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@
7474
<td class="message">
7575
<span class="message-wrapper">
7676
{{if $.PageIsWiki}}
77-
<span class="commit-summary has-emoji{{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{.Summary}}</span>
77+
<span class="commit-summary {{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{.Summary | RenderEmoji}}</span>
7878
{{else }}
7979
{{ $commitLink:= printf "%s/%s/%s/commit/%s" AppSubUrl $.Username $.Reponame .ID }}
80-
<span class="commit-summary has-emoji{{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{RenderCommitMessageLinkSubject .Message $.RepoLink $commitLink $.Repository.ComposeMetas}}</span>
80+
<span class="commit-summary {{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{RenderCommitMessageLinkSubject .Message $.RepoLink $commitLink $.Repository.ComposeMetas}}</span>
8181
{{end}}
8282
</span>
8383
{{if IsMultilineCommitMessage .Message}}

templates/repo/diff/comments.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
</div>
3636
</div>
3737
<div class="ui attached segment">
38-
<div class="render-content markdown has-emoji">
38+
<div class="render-content markdown">
3939
{{if .RenderedContent}}
4040
{{.RenderedContent|Str2html}}
4141
{{else}}

templates/repo/graph.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<a href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{.Rev}}">{{ .ShortRev}}</a>
2525
</code>
2626
<strong> {{.Branch}}</strong>
27-
<span class="has-emoji">{{RenderCommitMessage .Subject $.RepoLink $.Repository.ComposeMetas}}</span> by
27+
<span>{{RenderCommitMessage .Subject $.RepoLink $.Repository.ComposeMetas}}</span> by
2828
<span class="author">
2929
{{.Author}}
3030
</span>

templates/repo/home.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{{template "base/alert" .}}
66
<div class="ui repo-description">
77
<div id="repo-desc">
8-
{{if .Repository.DescriptionHTML}}<span class="description has-emoji">{{.Repository.DescriptionHTML}}</span>{{else if .IsRepositoryAdmin}}<span class="no-description text-italic">{{.i18n.Tr "repo.no_desc"}}</span>{{end}}
8+
{{if .Repository.DescriptionHTML}}<span class="description">{{.Repository.DescriptionHTML}}</span>{{else if .IsRepositoryAdmin}}<span class="no-description text-italic">{{.i18n.Tr "repo.no_desc"}}</span>{{end}}
99
<a class="link" href="{{.Repository.Website}}">{{.Repository.Website}}</a>
1010
</div>
1111
{{if .RepoSearchEnabled}}

templates/repo/issue/labels/label_list.tmpl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@
3131
<li class="item">
3232
<div class="ui grid middle aligned">
3333
<div class="four wide column">
34-
<div class="ui label" style="color: {{.ForegroundColor}}; background-color: {{.Color}}">{{svg "octicon-tag" 16}} {{.Name | RenderEmojiPlain}}</div>
34+
<div class="ui label" style="color: {{.ForegroundColor}}; background-color: {{.Color}}">{{svg "octicon-tag" 16}} {{.Name | RenderEmoji}}</div>
3535
</div>
3636
<div class="six wide column">
37-
<div class="ui has-emoji">
38-
{{.Description}}
37+
<div class="ui">
38+
{{.Description | RenderEmoji}}
3939
</div>
4040
</div>
4141
<div class="three wide column">
@@ -74,11 +74,11 @@
7474
<li class="item">
7575
<div class="ui grid middle aligned">
7676
<div class="three wide column">
77-
<div class="ui label" style="color: {{.ForegroundColor}}; background-color: {{.Color}}">{{svg "octicon-tag" 16}} {{.Name | RenderEmojiPlain}}</div>
77+
<div class="ui label" style="color: {{.ForegroundColor}}; background-color: {{.Color}}">{{svg "octicon-tag" 16}} {{.Name | RenderEmoji}}</div>
7878
</div>
7979
<div class="seven wide column">
80-
<div class="ui has-emoji">
81-
{{.Description}}
80+
<div class="ui">
81+
{{.Description | RenderEmoji}}
8282
</div>
8383
</div>
8484
<div class="three wide column">

0 commit comments

Comments
 (0)