Fold long page introductions to two lines with Show more
One component, PageIntro, for the text under a page's title: shown as it is when it fits in two lines, otherwise folded with a Show more, remembered per page in this browser, opened by tabbing to a link in it, unfolded in print. Used on 41 pages. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a2b43bcd5d
commit
9937ab2202
46 files changed
+307
-82
No files matched your search
@@ -8,6 +8,7 @@ import { CATEGORY_NAMES, incidentPath, SEVERITY_BADGE } from "../components/Inci
|
||||
import { formatDate, formatDateTime } from "../utils/date";
|
||||
import { readableError } from "../utils/errors";
|
||||
import { toast } from "../utils/toast";
|
||||
import PageIntro from "../components/PageIntro";
|
||||
|
||||
/** "2 h 40 min", "35 min", "3 d 4 h". */
|
||||
function span(minutes: number): string {
|
||||
@@ -196,7 +197,7 @@ export default function MonthlyReport({ user }: { user: CurrentUser }) {
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<p className="text-secondary no-print">
|
||||
<PageIntro className="no-print mb-3">
|
||||
How the {stretch} went, in one page: availability, how each service-level target did, incidents and how long they took, updates applied, restore tests and backups, and what was renewed.
|
||||
{user.role === "admin" ? (
|
||||
<>
|
||||
@@ -204,7 +205,7 @@ export default function MonthlyReport({ user }: { user: CurrentUser }) {
|
||||
It can be sent on a day of the month, and a quarter's and year's report after the month that ends it: <Link to="/settings/notifications">Settings → Notifications</Link>.
|
||||
</>
|
||||
) : null}
|
||||
</p>
|
||||
</PageIntro>
|
||||
<ErrorNotice error={error} />
|
||||
{!data && !error && <BlockSkeleton lines={6} />}
|
||||
|
||||
|
||||
Reference in new issue
Block a user