Skip to content

Commit

Permalink
Optimize off-screen content rendering using content-visibility (#361)
Browse files Browse the repository at this point in the history
Co-authored-by: Dan <[email protected]>
  • Loading branch information
mosch and dan-lee authored Nov 21, 2024
1 parent 5110d78 commit a925d0c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/zudoku/src/lib/plugins/openapi/OperationList.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ResultOf } from "@graphql-typed-document-node/core";
import type { CSSProperties } from "react";
import { useQuery } from "urql";
import { CategoryHeading } from "../../components/CategoryHeading.js";
import { DeveloperHint } from "../../components/DeveloperHint.js";
Expand Down Expand Up @@ -154,7 +155,7 @@ export const OperationList = () => {
{result.data.schema.tags
.filter((tag) => tag.operations.length > 0)
.map((tag) => (
<div key={tag.name}>
<div key={tag.name} className="[content-visibility:auto]">
{tag.name && <CategoryHeading>{tag.name}</CategoryHeading>}
{tag.description && (
<Markdown
Expand Down

0 comments on commit a925d0c

Please sign in to comment.