Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove fomantic loader module #26670

Merged
merged 13 commits into from Aug 25, 2023
1 change: 0 additions & 1 deletion options/locale/locale_en-US.ini
Expand Up @@ -598,7 +598,6 @@ overview = Overview
following = Following
follow = Follow
unfollow = Unfollow
heatmap.loading = Loading Heatmap…
user_bio = Biography
disabled_public_activity = This user has disabled the public visibility of the activity.
email_visibility.limited = Your email address is visible to all authenticated users
Expand Down
6 changes: 4 additions & 2 deletions templates/repo/diff/image_diff.tmpl
Expand Up @@ -2,7 +2,7 @@
<tr>
<td colspan="2">
<div class="image-diff" data-path-before="{{.root.BeforeRawPath}}/{{PathEscapeSegments .file.OldName}}" data-path-after="{{.root.RawPath}}/{{PathEscapeSegments .file.Name}}">
<div class="ui secondary pointing tabular top attached borderless menu new-menu">
<div class="ui secondary pointing tabular top attached borderless menu new-menu gt-mb-0">
wxiaoguang marked this conversation as resolved.
Show resolved Hide resolved
<div class="new-menu-inner">
<a class="item active" data-tab="diff-side-by-side-{{.file.Index}}">{{.root.locale.Tr "repo.diff.image.side_by_side"}}</a>
{{if and .blobBase .blobHead}}
Expand Down Expand Up @@ -74,7 +74,9 @@
</div>
{{end}}
</div>
<div class="ui active centered inline loader gt-mb-4"></div>
<div class="img-diff-spinner gt-df gt-jc gt-py-4">
silverwind marked this conversation as resolved.
Show resolved Hide resolved
{{template "shared/spinner" dict "Size" 64}}
</div>
silverwind marked this conversation as resolved.
Show resolved Hide resolved
</div>
</td>
</tr>
Expand Down
1 change: 1 addition & 0 deletions templates/shared/spinner.tmpl
@@ -0,0 +1 @@
<div class="is-loading gt-dib" style="width: {{.Size}}px; height: {{.Size}}px"></div>
delvh marked this conversation as resolved.
Show resolved Hide resolved
4 changes: 2 additions & 2 deletions templates/user/auth/webauthn.tmpl
Expand Up @@ -10,8 +10,8 @@
{{template "base/alert" .}}
<p>{{.locale.Tr "webauthn_sign_in"}}</p>
</div>
<div class="ui attached segment">
<div class="ui active indeterminate inline loader"></div>
<div class="ui attached segment gt-df gt-ac gt-jc gt-gap-2 gt-py-3">
{{template "shared/spinner" dict "Size" 40}}
{{.locale.Tr "webauthn_press_button"}}
</div>
<div class="ui attached segment">
Expand Down
5 changes: 1 addition & 4 deletions templates/user/heatmap.tmpl
@@ -1,14 +1,11 @@
{{if .HeatmapData}}
<div id="user-heatmap"
<div class="is-loading gt-df gt-ac" id="user-heatmap-container"
data-heatmap-data="{{JsonUtils.EncodeToString .HeatmapData}}"
data-locale-total-contributions="{{$.locale.Tr "heatmap.number_of_contributions_in_the_last_12_months" ($.locale.PrettyNumber .HeatmapTotalContributions)}}"
data-locale-no-contributions="{{.locale.Tr "heatmap.no_contributions"}}"
data-locale-more="{{.locale.Tr "heatmap.more"}}"
data-locale-less="{{.locale.Tr "heatmap.less"}}"
>
<div slot="loading">
<div class="ui active centered inline indeterminate text loader" id="loading-heatmap">{{.locale.Tr "user.heatmap.loading"}}</div>
</div>
</div>
<div class="divider"></div>
{{end}}
2 changes: 1 addition & 1 deletion tests/integration/privateactivity_test.go
Expand Up @@ -82,7 +82,7 @@ func testPrivateActivityHelperHasVisibleActivitiesFromPublic(t *testing.T) bool
// heatmap UI helpers

func testPrivateActivityHelperHasVisibleHeatmapInHTMLDoc(htmlDoc *HTMLDoc) bool {
return htmlDoc.doc.Find("#user-heatmap").Length() > 0
return htmlDoc.doc.Find("#user-heatmap-container").Length() > 0
}

func testPrivateActivityHelperHasVisibleProfileHeatmapFromSession(t *testing.T, session *TestSession) bool {
Expand Down
5 changes: 4 additions & 1 deletion web_src/css/features/heatmap.css
@@ -1,8 +1,11 @@
#user-heatmap-container {
min-height: 140px;
}

#user-heatmap {
width: 100%;
font-size: 9px;
position: relative;
min-height: 125px;
}

#user-heatmap text {
Expand Down
4 changes: 0 additions & 4 deletions web_src/css/user.css
Expand Up @@ -58,10 +58,6 @@
}
}

.user.profile #loading-heatmap {
margin-bottom: 1em;
}

.user.profile .ui.secondary.stackable.pointing.menu {
flex-wrap: wrap;
}
Expand Down