Refine client delete animation and local rule button styling
All checks were successful
Build and Deploy Gateway / build-and-push (push) Successful in 14s
Build and Deploy Gateway / deploy (push) Successful in 7s

This commit is contained in:
2026-07-12 00:21:21 +03:00
parent 4ed25301db
commit d6ba05ac7d
4 changed files with 17 additions and 14 deletions

View File

@@ -1,6 +1,6 @@
export const HARBOR_VERSIONS = Object.freeze({ export const HARBOR_VERSIONS = Object.freeze({
macClient: '0.6.10', macClient: '0.6.11',
gatewayClient: '0.6.9', gatewayClient: '0.6.10',
gatewayBackend: '0.6.0', gatewayBackend: '0.6.0',
}); });

View File

@@ -426,6 +426,7 @@ function LocalRulesPanel({
/> />
<span className="client-local-rule-status" role="status">{statusLabel}</span> <span className="client-local-rule-status" role="status">{statusLabel}</span>
<button <button
className="client-local-rule-delete"
type="button" type="button"
aria-label={`Удалить правило ${index + 1}`} aria-label={`Удалить правило ${index + 1}`}
onClick={() => onRemove(index)} onClick={() => onRemove(index)}

View File

@@ -967,7 +967,7 @@ p {
bottom: 0; bottom: 0;
left: 12px; left: 12px;
z-index: 100; z-index: 100;
background: linear-gradient(90deg, oklch(0.68 0.15 28 / 0.3), oklch(0.68 0.15 28 / 0.12) 48%, transparent); background: transparent;
opacity: 0; opacity: 0;
pointer-events: none; pointer-events: none;
transform: scaleX(0); transform: scaleX(0);
@@ -979,11 +979,11 @@ p {
position: absolute; position: absolute;
left: 0; left: 0;
right: 0; right: 0;
top: calc(var(--client-delete-strike-y) - 2px); top: calc(var(--client-delete-strike-y) - 1px);
height: 4px; height: 2px;
background: oklch(0.68 0.15 28); background: oklch(0.68 0.15 28);
clip-path: polygon(0 8%, 100% 50%, 0 92%); clip-path: polygon(0 24%, 100% 50%, 0 76%);
filter: drop-shadow(0 0 2px oklch(0.68 0.15 28 / 0.5)); filter: drop-shadow(0 0 3px oklch(0.68 0.15 28 / 0.38));
} }
.client-deletable-row.is-removing > .client-delete-strike { .client-deletable-row.is-removing > .client-delete-strike {
@@ -1205,7 +1205,7 @@ p {
text-shadow: 0 0 9px color-mix(in oklch, var(--client-accent) 22%, transparent); text-shadow: 0 0 9px color-mix(in oklch, var(--client-accent) 22%, transparent);
} }
.client-local-rule > button:last-child { .client-local-rule-delete {
width: 28px; width: 28px;
height: 32px; height: 32px;
padding: 0; padding: 0;
@@ -1217,7 +1217,7 @@ p {
transition: color 180ms ease, filter 260ms ease, transform 300ms cubic-bezier(0.16, 1, 0.3, 1); transition: color 180ms ease, filter 260ms ease, transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
} }
.client-local-rule > button:last-child:hover { .client-local-rule-delete:hover {
color: oklch(0.68 0.15 28); color: oklch(0.68 0.15 28);
filter: drop-shadow(0 0 7px oklch(0.68 0.15 28 / 0.42)); filter: drop-shadow(0 0 7px oklch(0.68 0.15 28 / 0.42));
transform: rotate(8deg) scale(1.1); transform: rotate(8deg) scale(1.1);
@@ -1225,7 +1225,7 @@ p {
.client-local-rule-enabled:focus-visible, .client-local-rule-enabled:focus-visible,
.client-rule-type-trigger:focus-visible, .client-rule-type-trigger:focus-visible,
.client-local-rule > button:last-child:focus-visible, .client-local-rule-delete:focus-visible,
.client-local-rule-add:focus-visible, .client-local-rule-add:focus-visible,
.client-local-rules-save:focus-visible, .client-local-rules-save:focus-visible,
.client-local-rules-actions button:focus-visible { .client-local-rules-actions button:focus-visible {
@@ -2996,7 +2996,7 @@ p {
grid-row: 1; grid-row: 1;
} }
.client-local-rule > button:last-child { .client-local-rule-delete {
grid-column: 3; grid-column: 3;
grid-row: 1; grid-row: 1;
} }
@@ -3080,7 +3080,7 @@ p {
.client-rule-type-list, .client-rule-type-list,
.client-rule-type-list button, .client-rule-type-list button,
.client-local-rule input, .client-local-rule input,
.client-local-rule > button:last-child, .client-local-rule-delete,
.client-local-rule-add, .client-local-rule-add,
.client-local-rule-add-slot > span, .client-local-rule-add-slot > span,
.client-local-rules-save, .client-local-rules-save,

View File

@@ -22,11 +22,13 @@ test('rule editor add latency stays constant and dirty exits are guarded', () =>
assert.match(component, /client-deletable-row/); assert.match(component, /client-deletable-row/);
assert.match(component, /className="client-delete-strike"[\s\S]*onAnimationEnd/); assert.match(component, /className="client-delete-strike"[\s\S]*onAnimationEnd/);
assert.match(component, /client-rule-delete-cross/); assert.match(component, /client-rule-delete-cross/);
assert.match(component, /className="client-local-rule-delete"/);
assert.match(styles, /\.client-deletable-row\.is-removing > \.client-delete-strike[\s\S]*client-delete-strike/); assert.match(styles, /\.client-deletable-row\.is-removing > \.client-delete-strike[\s\S]*client-delete-strike/);
assert.match(styles, /\.client-delete-strike \{[\s\S]*z-index: 100[\s\S]*linear-gradient/); assert.match(styles, /\.client-delete-strike \{[\s\S]*z-index: 100[\s\S]*background: transparent/);
assert.match(styles, /\.client-deletable-row\.is-removing > :not\(\.client-delete-strike\)[\s\S]*z-index: 0/); assert.match(styles, /\.client-deletable-row\.is-removing > :not\(\.client-delete-strike\)[\s\S]*z-index: 0/);
assert.match(styles, /\.client-deletable-row\.is-removing > \.client-local-rule-enabled[\s\S]*z-index: 101/); assert.match(styles, /\.client-deletable-row\.is-removing > \.client-local-rule-enabled[\s\S]*z-index: 101/);
assert.match(styles, /clip-path: polygon\(0 8%, 100% 50%, 0 92%\)/); assert.match(styles, /clip-path: polygon\(0 24%, 100% 50%, 0 76%\)/);
assert.doesNotMatch(styles, /client-local-rule > button:last-child/);
assert.match(styles, /@keyframes client-delete-strike[\s\S]*scaleX\(0\)[\s\S]*scaleX\(1\)/); assert.match(styles, /@keyframes client-delete-strike[\s\S]*scaleX\(0\)[\s\S]*scaleX\(1\)/);
assert.match(styles, /\.client-local-rule:has\(\.client-rule-type\.is-open\)[\s\S]*z-index: 5/); assert.match(styles, /\.client-local-rule:has\(\.client-rule-type\.is-open\)[\s\S]*z-index: 5/);
}); });