Skip to content

Commit 276a22f

Browse files
committed
Merge branch 'ui-optimization' into test
2 parents 2372699 + 5d1b9dc commit 276a22f

File tree

15 files changed

+263
-199
lines changed

15 files changed

+263
-199
lines changed

ui/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"dependencies": {
2020
"@codemirror/lang-markdown": "^6.2.4",
2121
"@codemirror/language-data": "^6.5.0",
22-
"@codemirror/state": "^6.4.1",
22+
"@codemirror/state": "^6.5.0",
2323
"@codemirror/view": "^6.26.1",
2424
"axios": "^1.7.7",
2525
"bootstrap": "^5.3.2",
@@ -80,9 +80,9 @@
8080
"eslint-plugin-promise": "^6.0.0",
8181
"eslint-plugin-react": "^7.33.2",
8282
"eslint-plugin-react-hooks": "^4.6.0",
83-
"husky": "^8.0.1",
83+
"husky": "^9.1.7",
8484
"js-yaml": "^4.1.0",
85-
"lint-staged": "^13.2.3",
85+
"lint-staged": "^15.5.0",
8686
"postcss": "^8.0.0",
8787
"prettier": "^3.1.0",
8888
"purgecss-webpack-plugin": "^4.1.3",

ui/pnpm-lock.yaml

Lines changed: 159 additions & 116 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ui/src/common/_variable.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
$link-hover-decoration: none;
2121
$enable-negative-margins: true;
22-
$blue: #0033FF !default;
23-
$placeholder-opacity-max: .2;
24-
$placeholder-opacity-min: .1;
22+
$blue: #0033ff !default;
23+
$placeholder-opacity-max: 0.2;
24+
$placeholder-opacity-min: 0.1;
2525
$enable-smooth-scroll: false;

ui/src/common/color.scss

Lines changed: 36 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
* under the License.
1818
*/
1919

20-
21-
2220
:root {
2321
--an-side-nav-link: rgba(0, 0, 0, 0.65);
2422
--an-toolbar-divider: rgba(0, 0, 0, 0.1);
@@ -29,46 +27,45 @@
2927
--an-212529: #212529;
3028
--an-gray-300: var(--bs-gray-300);
3129
--an-white: #fff;
32-
--an-inbox-warning:#fff3cd80;
30+
--an-inbox-warning: #fff3cd80;
3331
--an-f5: #f5f5f5;
34-
--an-answer-item-border-top: rgba(0, 0, 0, .125);
32+
--an-answer-item-border-top: rgba(0, 0, 0, 0.125);
3533
--an-answer-inbox-nav-border-top: var(--bs-border-color);
36-
--an-comment-item-border-bottom: var(--bs-colors-gray-200, #E9ECEF);
34+
--an-comment-item-border-bottom: var(--bs-colors-gray-200, #e9ecef);
3735
--an-editor-toolbar-hover: #f8f9fa;
3836
--ans-editor-toolbar-focus: #dae0e5;
3937
--an-editor-placeholder-color: #6c757d;
40-
--an-side-nav-link-hover-color: rgba(0, 0, 0, .85);
38+
--an-side-nav-link-hover-color: rgba(0, 0, 0, 0.85);
4139
--an-invite-answer-item-active: #e9ecef;
4240
--an-alert-exist-color: #055160;
4341
}
4442

43+
[data-bs-theme='dark'] {
44+
--an-side-nav-link: rgba(255, 255, 255, 0.65);
45+
--an-toolbar-divider: rgba(255, 255, 255, 0.3);
46+
--an-ced4da: var(--bs-border-color);
47+
--an-e9ecef: #161b22;
48+
--an-pre: #161b22;
49+
--an-6c757d: var(--bs-body-color);
50+
--an-212529: var(--bs-body-color);
51+
--an-gray-300: #161b22;
52+
--an-white: #000;
53+
--an-inbox-warning: #38363180;
54+
--an-f5: var(--bs-body-bg);
55+
--an-answer-item-border-top: var(--bs-border-color);
56+
--an-answer-inbox-nav-border-top: var(--bs-border-color);
57+
--an-comment-item-border-bottom: var(--bs-border-color);
58+
--an-editor-toolbar-hover: var(--bs-tertiary-bg);
59+
--ans-editor-toolbar-focus: var(--bs-tertiary-bg);
60+
--an-editor-placeholder-color: var(--bs-body-color);
61+
--an-side-nav-link-hover-color: var(--bs-body-color);
62+
--an-invite-answer-item-active: var(--bs-tertiary-bg);
63+
--an-alert-exist-color: #60cee4;
64+
}
4565

46-
[data-bs-theme="dark"] {
47-
--an-side-nav-link: rgba(255, 255, 255, 0.65);
48-
--an-toolbar-divider: rgba(255, 255, 255, 0.3);
49-
--an-ced4da: var(--bs-border-color);
50-
--an-e9ecef: #161b22;
51-
--an-pre: #161b22;
52-
--an-6c757d: var(--bs-body-color);
53-
--an-212529: var(--bs-body-color);
54-
--an-gray-300: #161b22;
55-
--an-white: #000;
56-
--an-inbox-warning:#38363180;
57-
--an-f5: var(--bs-body-bg);
58-
--an-answer-item-border-top: var(--bs-border-color);
59-
--an-answer-inbox-nav-border-top: var(--bs-border-color);
60-
--an-comment-item-border-bottom: var(--bs-border-color);
61-
--an-editor-toolbar-hover: var(--bs-tertiary-bg);
62-
--ans-editor-toolbar-focus: var(--bs-tertiary-bg);
63-
--an-editor-placeholder-color: var(--bs-body-color);
64-
--an-side-nav-link-hover-color: var(--bs-body-color);
65-
--an-invite-answer-item-active: var(--bs-tertiary-bg);
66-
--an-alert-exist-color: #60cee4;
67-
}
68-
69-
[data-bs-theme="dark"] {
66+
[data-bs-theme='dark'] {
7067
.link-dark {
71-
color: rgba(var(--bs-emphasis-color-rgb),0.8)!important;
68+
color: rgba(var(--bs-emphasis-color-rgb), 0.8) !important;
7269
}
7370
/** CodeMirror **/
7471

@@ -81,18 +78,20 @@
8178
border-left-color: var(--bs-body-color);
8279
}
8380
.ͼ2.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground {
84-
background-color: #3E4451;
81+
background-color: #3e4451;
8582
}
86-
/** link color **/
83+
/** link color **/
8784
.ͼc {
8885
color: rgb(60, 138, 233);
8986
}
9087
.ͼ5 {
9188
color: var(--bs-body-color);
9289
}
9390

94-
.ͼ2 .cm-selectionBackground {background: #3E4451;}
95-
/** CodeMirror end **/
91+
.ͼ2 .cm-selectionBackground {
92+
background: #3e4451;
93+
}
94+
/** CodeMirror end **/
9695

9796
.bg-light {
9897
background-color: rgba(0, 0, 0, 0.5) !important;
@@ -103,7 +102,8 @@
103102
}
104103
/** side nav **/
105104
#sideNav {
106-
.nav-link:hover, .nav-link.active {
105+
.nav-link:hover,
106+
.nav-link.active {
107107
background-color: #2b3035 !important;
108108
}
109109
}
@@ -136,5 +136,4 @@
136136
.view-level3 {
137137
color: $orange-100;
138138
}
139-
140139
}

ui/src/components/AccordionNav/index.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919

2020
.collapse-indicator {
21-
transition: all .2s ease;
21+
transition: all 0.2s ease;
2222
}
2323

2424
.expanding .collapse-indicator {

ui/src/components/Header/index.scss

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@
2020
@import 'bootstrap/scss/functions';
2121
@import 'bootstrap/scss/variables';
2222
#header {
23-
transform: translate3d(0,0,0);
23+
transform: translate3d(0, 0, 0);
2424
--bs-navbar-padding-y: 0.75rem;
2525
background: var(--bs-primary);
26-
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15), 0 0.125rem 0.25rem rgb(0 0 0 / 8%);
26+
box-shadow:
27+
inset 0 -1px 0 rgba(0, 0, 0, 0.15),
28+
0 0.125rem 0.25rem rgb(0 0 0 / 8%);
2729
.logo {
2830
max-height: 2rem;
2931
}
@@ -45,7 +47,7 @@
4547
}
4648

4749
.lg-none {
48-
display: none!important;
50+
display: none !important;
4951
}
5052

5153
.hr {
@@ -58,8 +60,8 @@
5860
padding-left: 42px;
5961
box-shadow: none;
6062
color: #fff;
61-
background-color: rgba(255, 255, 255, .2);
62-
border: $border-width $border-style rgba(255, 255, 255, .2);
63+
background-color: rgba(255, 255, 255, 0.2);
64+
border: $border-width $border-style rgba(255, 255, 255, 0.2);
6365
&:focus {
6466
border: $border-width $border-style $border-color;
6567
}
@@ -82,7 +84,7 @@
8284
padding-left: 42px;
8385
box-shadow: none;
8486
color: var(--bs-body-color);
85-
background-color: rgba(255, 255, 255, .2);
87+
background-color: rgba(255, 255, 255, 0.2);
8688
border: $border-width $border-style #dee2e6;
8789
&:focus {
8890
border: $border-width $border-style $border-color;
@@ -97,7 +99,7 @@
9799
}
98100

99101
.maxw-400 {
100-
max-width: 400px;;
102+
max-width: 400px;
101103
}
102104

103105
.search-wrap {
@@ -109,21 +111,18 @@
109111
}
110112
}
111113

112-
113114
@media (max-width: 991.9px) {
114115
#header {
115116
.nav-grow {
116-
flex-grow: 1!important;
117+
flex-grow: 1 !important;
117118
}
118119

119120
.lg-none {
120-
display: flex!important;
121+
display: flex !important;
121122
}
122123

123124
.maxw-400 {
124125
max-width: 100%;
125126
}
126127
}
127-
128128
}
129-

ui/src/components/InitialLoadingPlaceholder/index.scss

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
// Same as spin in `public/index.html`
2121

2222
@keyframes _initial-loading-spin {
23-
to { transform: rotate(360deg) }
23+
to {
24+
transform: rotate(360deg);
25+
}
2426
}
2527

2628
.InitialLoadingPlaceholder {
@@ -44,10 +46,10 @@
4446
display: inline-block;
4547
width: 2rem;
4648
height: 2rem;
47-
vertical-align: -.125em;
48-
border: .25rem solid currentColor;
49+
vertical-align: -0.125em;
50+
border: 0.25rem solid currentColor;
4951
border-right-color: transparent;
50-
color: rgba(108, 117, 125, .75);
52+
color: rgba(108, 117, 125, 0.75);
5153
border-radius: 50%;
5254
animation: 0.75s linear infinite _initial-loading-spin;
5355
}

ui/src/components/QueryGroup/index.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
display: none;
2525
}
2626

27-
2827
@media screen and (max-width: 768px) {
2928
.md-show {
3029
display: none !important;

0 commit comments

Comments
 (0)