Skip to content

Commit c369c25

Browse files
authored
fix: Unsquish the loading spinner [IDE-1101] (#279)
The spinner is displayed while waiting for the LS to load. Refactored the CSS and HTML.
1 parent 6f5f4c7 commit c369c25

File tree

1 file changed

+16
-19
lines changed

1 file changed

+16
-19
lines changed

plugin/src/main/resources/ui/html/ScanSummaryInit.html

+16-19
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,24 @@
66
<meta charset="utf-8" />
77
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
88
<meta http-equiv="Content-Security-Policy"
9-
content="style-src 'self' 'nonce-${nonce}' 'nonce-ideNonce' https://fonts.googleapis.com;
10-
script-src 'nonce-${nonce}' https://fonts.googleapis.com;
11-
font-src 'self' https://fonts.gstatic.com;" />
9+
content="style-src 'self' 'nonce-${nonce}' 'nonce-ideNonce' https://fonts.googleapis.com;
10+
script-src 'nonce-${nonce}' https://fonts.googleapis.com;
11+
font-src 'self' https://fonts.gstatic.com;" />
1212
<style nonce=${nonce}>
13-
@import url('https://fonts.googleapis.com/css2?family=Inter&display=swap');
13+
@import url('https://fonts.googleapis.com/css2?family=Inter&display=swap');
1414

15-
:root {
16-
font-size: var(--main-font-size);
17-
--default-font: "SF Pro Text", "Segoe UI", "Ubuntu", Geneva, Verdana, Tahoma, sans-serif;
18-
--ide-background-color: var(--vscode-sideBar-background);
19-
--text-color: var(--vscode-foreground);
20-
--input-border: var(--vscode-input-border);
21-
}
22-
p { font-size:1.3rem; margin: .8rem 0; }
23-
hr { margin: 2rem 0; }
24-
body { background-color:var(--ide-background-color); color: var(--text-color); font-family: var(--default-font); }
25-
.snx-loader { display:inline-block; width: 12px; height: 12px; border: 2px solid rgba(125,125,125,.65); border-bottom-color: transparent; border-radius: 50%; margin-right:.8rem; animation: spin 1s linear infinite;
15+
:root {
16+
font-size: var(--main-font-size);
17+
--default-font: "SF Pro Text", "Segoe UI", "Ubuntu", Geneva, Verdana, Tahoma, sans-serif;
18+
--ide-background-color: var(--vscode-sideBar-background);
19+
--text-color: var(--vscode-foreground);
20+
--input-border: var(--vscode-input-border);
2621
}
27-
.size-s { width: 12px; height: 12px; border-width:2px }
22+
p { font-size:1.3rem; margin: .8rem 0; }
23+
hr { margin: 2rem 0; }
24+
body { background-color:var(--ide-background-color); color: var(--text-color); font-family: var(--default-font); }
2825

26+
.snx-loader { flex: none; display: inline-block; width: 10px; height: 10px; border: 2px solid rgba(125,125,125,.65); border-bottom-color: transparent; border-radius: 50%; margin-right:.8rem; animation: spin 1s linear infinite; }
2927
@keyframes spin {
3028
from { transform: rotate(0deg); }
3129
to { transform: rotate(360deg); }
@@ -36,18 +34,17 @@
3634
.snx-status { display:flex; align-items:center; padding: .4rem 1.2rem; background-color: rgba(255,255,255,.1); border-radius: 1rem; }
3735

3836
.snx-header { display: flex; gap:1.6rem; }
39-
.snx-message { display: flex; align-items: center }
37+
.snx-status .snx-message { display: flex; align-items: center }
4038
</style>
4139
${ideStyle}
4240
</head>
4341
<body>
44-
4542
<div class="snx-header">
4643
<h1 class="snx-title snx-h1">Snyk Security is loading...</h1>
4744
</div>
4845
<div class="snx-summary">
4946
<div class="snx-status">
50-
<span class="snx-loader size-s"></span>
47+
<span class="snx-loader"></span>
5148
<p class="snx-message">Waiting for the Snyk CLI to be downloaded and the Language Server to be initialized. </p>
5249
</div>
5350
</div>

0 commit comments

Comments
 (0)