Improve write-review flow and require Node 22.18 for native TS stripping.

Gate login, reveal the form after a rating, and wire inline Rate this mint; drop --experimental-strip-types.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
michilis
2026-08-24 21:52:11 +02:00
co-authored by Cursor
parent c74c7fc187
commit b95aab2bcd
35 changed files with 657 additions and 145 deletions
+39
View File
@@ -1604,6 +1604,35 @@ html.modal-open, html.modal-open body { overflow: hidden; }
*/
.write-dialog { max-width: 460px; }
/*
* The login gate, and the two panels it stands in front of.
*
* `hidden` alone will not hide any of the three: they are flex columns, and an author
* `display` beats the user agent's `[hidden] { display: none }`. Each one has to take
* it back, the same way the review-by-URL steps do.
*/
.write-gate, .write-steps, .write-rest {
display: flex; flex-direction: column; gap: 14px;
}
.write-gate[hidden], .write-steps[hidden], .write-rest[hidden] { display: none; }
.write-gate-title { font-family: var(--display); font-size: 16px; font-weight: 600; }
.write-gate-lead { font-size: 13.5px; color: var(--muted); line-height: 1.55; }
/*
* The body, the identity row and the publish button arrive together, once a rating is
* chosen. A short rise rather than an appearance, so it reads as the form continuing
* rather than as the dialog changing into a different one.
*/
.write-rest:not([hidden]) { animation: reveal-rise 200ms var(--ease-out) both; }
@keyframes reveal-rise {
from { opacity: 0; transform: translateY(-6px); }
to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
.write-rest:not([hidden]) { animation: fade-in .15s both; }
}
/* Who is about to sign, said before the reader commits to writing anything. */
.write-id {
display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
@@ -1701,6 +1730,14 @@ html.modal-open, html.modal-open body { overflow: hidden; }
.write-actions { display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
/* Why the publish button is off, in the place someone looks when it is off. */
.write-why { font-size: 12.5px; color: var(--faint); margin-right: auto; }
/*
* What publishing does, under the button that does it. It used to be in the dialog's
* heading, where it was a warning about a form nobody had filled in yet; here it is
* the last thing read before the press.
*/
.write-permanent {
font-size: 12px; color: var(--faint); text-align: right; margin-top: -4px;
}
/* The button's own spinner, shown only while a publish is in flight. */
.write-spinner { display: none; }
@@ -1719,6 +1756,8 @@ html.modal-open, html.modal-open body { overflow: hidden; }
@media (max-width: 480px) {
.write-actions .btn { flex: 1; justify-content: center; }
.write-why { width: 100%; margin-right: 0; }
/* The buttons are full width down here, so the line under them is centred on both. */
.write-permanent { text-align: center; }
}
/* A disabled primary keeps its amber, dimmed. Falling back to the card colour on