Raise delete strike overlay above row content
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
export const HARBOR_VERSIONS = Object.freeze({
|
export const HARBOR_VERSIONS = Object.freeze({
|
||||||
macClient: '0.6.7',
|
macClient: '0.6.9',
|
||||||
gatewayClient: '0.6.6',
|
gatewayClient: '0.6.8',
|
||||||
gatewayBackend: '0.6.0',
|
gatewayBackend: '0.6.0',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -392,11 +392,6 @@ function LocalRulesPanel({
|
|||||||
style={{ viewTransitionName: rule.removing ? 'none' : rule._key }}
|
style={{ viewTransitionName: rule.removing ? 'none' : rule._key }}
|
||||||
inert={rule.removing ? true : undefined}
|
inert={rule.removing ? true : undefined}
|
||||||
>
|
>
|
||||||
<span
|
|
||||||
className="client-delete-strike"
|
|
||||||
aria-hidden="true"
|
|
||||||
onAnimationEnd={() => onRemoveComplete(rule._key)}
|
|
||||||
/>
|
|
||||||
<button
|
<button
|
||||||
className="client-local-rule-enabled"
|
className="client-local-rule-enabled"
|
||||||
type="button"
|
type="button"
|
||||||
@@ -436,6 +431,11 @@ function LocalRulesPanel({
|
|||||||
>
|
>
|
||||||
×
|
×
|
||||||
</button>
|
</button>
|
||||||
|
<span
|
||||||
|
className="client-delete-strike"
|
||||||
|
aria-hidden="true"
|
||||||
|
onAnimationEnd={() => onRemoveComplete(rule._key)}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|||||||
@@ -960,10 +960,11 @@ p {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.client-delete-strike {
|
.client-delete-strike {
|
||||||
|
--client-delete-strike-y: 50%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
z-index: 20;
|
z-index: 100;
|
||||||
background: radial-gradient(ellipse at center, oklch(0.68 0.15 28 / 0.3) 0%, oklch(0.68 0.15 28 / 0.12) 36%, transparent 74%);
|
background: radial-gradient(ellipse at 50% var(--client-delete-strike-y), oklch(0.68 0.15 28 / 0.3) 0%, oklch(0.68 0.15 28 / 0.12) 36%, transparent 74%);
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
transform: scaleX(0);
|
transform: scaleX(0);
|
||||||
@@ -975,7 +976,7 @@ p {
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
top: calc(50% - 2px);
|
top: calc(var(--client-delete-strike-y) - 2px);
|
||||||
height: 4px;
|
height: 4px;
|
||||||
background: oklch(0.68 0.15 28);
|
background: oklch(0.68 0.15 28);
|
||||||
clip-path: polygon(0 50%, 18% 40%, 50% 28%, 82% 40%, 100% 50%, 82% 60%, 50% 72%, 18% 60%);
|
clip-path: polygon(0 50%, 18% 40%, 50% 28%, 82% 40%, 100% 50%, 82% 60%, 50% 72%, 18% 60%);
|
||||||
@@ -986,6 +987,11 @@ p {
|
|||||||
animation: client-delete-strike 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
|
animation: client-delete-strike 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.client-deletable-row.is-removing > :not(.client-delete-strike) {
|
||||||
|
position: relative;
|
||||||
|
z-index: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.client-local-rule-enabled {
|
.client-local-rule-enabled {
|
||||||
width: 24px;
|
width: 24px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
|
|||||||
@@ -23,7 +23,8 @@ test('rule editor add latency stays constant and dirty exits are guarded', () =>
|
|||||||
assert.match(component, /className="client-delete-strike"[\s\S]*onAnimationEnd/);
|
assert.match(component, /className="client-delete-strike"[\s\S]*onAnimationEnd/);
|
||||||
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::after[\s\S]*clip-path: polygon\(0 50%[\s\S]*100% 50%/);
|
assert.match(styles, /\.client-delete-strike::after[\s\S]*clip-path: polygon\(0 50%[\s\S]*100% 50%/);
|
||||||
assert.match(styles, /\.client-delete-strike \{[\s\S]*z-index: 20[\s\S]*radial-gradient/);
|
assert.match(styles, /\.client-delete-strike \{[\s\S]*z-index: 100[\s\S]*radial-gradient/);
|
||||||
|
assert.match(styles, /\.client-deletable-row\.is-removing > :not\(\.client-delete-strike\)[\s\S]*z-index: 0/);
|
||||||
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/);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user