Restore the read marker fade by using a valid CSS easing function (#34485)

* Restore the read marker fade by using a valid CSS easing function

* Drop postcss-easings

The read marker was the last thing that could have used a named easing, and
its style now lives in shared-components, which vite builds without the
plugin. Nothing in the tree names an easing any more, so the plugin, its type
shim and the dependency all go.
This commit is contained in:
hayyaksi
2026-08-12 17:11:05 +03:00
committed by GitHub
parent b30a9a18dc
commit fc0f0d4e61
6 changed files with 18 additions and 29 deletions
@@ -22,7 +22,8 @@
border-top: solid 1px var(--cpd-color-icon-accent-tertiary);
border-bottom: solid 1px var(--cpd-color-icon-accent-tertiary);
will-change: width, opacity;
/* cubic-bezier(0.12, 0, 0.39, 0) is ease-in-sine, spelled out because CSS has no name for it. */
transition:
width 400ms easeinsine 1s,
opacity 400ms easeinsine 1s;
width 400ms cubic-bezier(0.12, 0, 0.39, 0) 1s,
opacity 400ms cubic-bezier(0.12, 0, 0.39, 0) 1s;
}
@@ -71,6 +71,21 @@ describe("ReadMarker", () => {
expect(onGhostTransitionEnd).toHaveBeenCalledTimes(1);
});
it("gives the ghost marker a transition the browser accepts", () => {
render(
<ul>
<ReadMarker eventId="$ghost" kind="ghost" />
</ul>,
);
// An unparseable easing drops the whole shorthand, so the ghost would vanish instantly
// and never fire transitionend.
const style = getComputedStyle(screen.getByRole("separator"));
expect(style.transitionProperty).toBe("width, opacity");
expect(style.transitionDuration).toBe("0.4s, 0.4s");
expect(style.transitionDelay).toBe("1s, 1s");
});
it("wires the current marker ref", () => {
const onCurrentMarkerRef = vi.fn();