From f8c9ab1f6038258fee350d3950230104f3ea2d53 Mon Sep 17 00:00:00 2001 From: 1aurend Date: Mon, 13 Oct 2025 13:08:11 -0700 Subject: [PATCH 1/2] [B] Fix typo in transition --- components/templates/lists/items/Card/Card.module.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/templates/lists/items/Card/Card.module.css b/components/templates/lists/items/Card/Card.module.css index c1ce79ca..25e04bef 100644 --- a/components/templates/lists/items/Card/Card.module.css +++ b/components/templates/lists/items/Card/Card.module.css @@ -159,7 +159,7 @@ a:hover &, a:focus-visible & { transform: scale(101%); - transition: scale 170ms ease-in filter 170ms ease-in; + transition: transform 170ms ease-in, filter 170ms ease-in; filter: drop-shadow(1px 0px var(--border-color)) drop-shadow(0px 1px var(--border-color)) drop-shadow(0px -1px var(--border-color)) From d8d08e66c4ca286c065fabc1d1aaaf1b8a643598 Mon Sep 17 00:00:00 2001 From: 1aurend Date: Mon, 13 Oct 2025 14:48:49 -0700 Subject: [PATCH 2/2] [E] Replace processing message w/ empty message --- .../(pages)/collections/[slug]/layout.tsx | 2 +- .../(pages)/communities/[slug]/layout.tsx | 6 +- .../(pages)/items/[slug]/layout.tsx | 2 +- components/templates/Detail/Full/Full.tsx | 8 +-- .../templates/Detail/Summary/Summary.tsx | 55 ++++++++----------- .../templates/MainLayout/MainLayout.tsx | 4 +- components/templates/Metadata/Metadata.tsx | 4 +- .../ProcessingCheck/EmptyMessage.tsx | 25 +++++++++ .../ProcessingCheck/ProcessingCheck.tsx | 4 +- components/templates/ProcessingCheck/index.ts | 1 + lib/locales/en.json | 4 +- 11 files changed, 66 insertions(+), 49 deletions(-) create mode 100644 components/templates/ProcessingCheck/EmptyMessage.tsx diff --git a/app/[frontend]/(pages)/collections/[slug]/layout.tsx b/app/[frontend]/(pages)/collections/[slug]/layout.tsx index 4bba3f41..f840f055 100644 --- a/app/[frontend]/(pages)/collections/[slug]/layout.tsx +++ b/app/[frontend]/(pages)/collections/[slug]/layout.tsx @@ -39,9 +39,9 @@ export default async function CollectionTemplateLayout({ return ( + {layouts.hero && } {slug && } - {layouts.hero && } {children} diff --git a/app/[frontend]/(pages)/communities/[slug]/layout.tsx b/app/[frontend]/(pages)/communities/[slug]/layout.tsx index d6eda736..a688c1fa 100644 --- a/app/[frontend]/(pages)/communities/[slug]/layout.tsx +++ b/app/[frontend]/(pages)/communities/[slug]/layout.tsx @@ -41,10 +41,10 @@ export default async function CommunityLayout({ return ( + {showNavBar && ( + + )} - {showNavBar && ( - - )} {layouts.hero && } {children} diff --git a/app/[frontend]/(pages)/items/[slug]/layout.tsx b/app/[frontend]/(pages)/items/[slug]/layout.tsx index 97262f61..297eea2a 100644 --- a/app/[frontend]/(pages)/items/[slug]/layout.tsx +++ b/app/[frontend]/(pages)/items/[slug]/layout.tsx @@ -46,12 +46,12 @@ export default async function ItemLayout({ return ( + {hero && } {googleScholarData && ( )} {slug && } - {hero && } diff --git a/components/templates/Detail/Full/Full.tsx b/components/templates/Detail/Full/Full.tsx index a9132c76..6677afeb 100644 --- a/components/templates/Detail/Full/Full.tsx +++ b/components/templates/Detail/Full/Full.tsx @@ -6,7 +6,7 @@ import Container from "@/components/layout/Container"; import { FullDetailFragment$key } from "@/relay/FullDetailFragment.graphql"; import { useSharedBlockFragment } from "@/components/templates/shared/shared.slots.graphql"; import BlockSlotWrapper from "@/components/templates/mdx/BlockSlotWrapper"; -import { ProcessingMessage } from "@/components/templates/ProcessingCheck"; +import EmptyMessage from "@/components/templates/ProcessingCheck/EmptyMessage"; import type { HeroBackground } from "@/types/graphql-schema"; import TOC from "./TOC"; import styles from "./Full.module.css"; @@ -41,7 +41,7 @@ export default function FullVariant({ {body?.valid && !!body.content ? ( ) : ( - + )} ) : ( @@ -61,9 +61,7 @@ export default function FullVariant({ ) : (
- +
)} diff --git a/components/templates/Detail/Summary/Summary.tsx b/components/templates/Detail/Summary/Summary.tsx index acacece5..8476fa03 100644 --- a/components/templates/Detail/Summary/Summary.tsx +++ b/components/templates/Detail/Summary/Summary.tsx @@ -8,7 +8,6 @@ import Container from "@/components/layout/Container"; import BlockSlotWrapper from "@/components/templates/mdx/BlockSlotWrapper"; import InlineSlotWrapper from "@/components/templates/mdx/InlineSlotWrapper"; import { SummaryDetailFragment$key } from "@/relay/SummaryDetailFragment.graphql"; -import { ProcessingMessage } from "@/components/templates/ProcessingCheck"; import type { HeroBackground } from "@/types/graphql-schema"; import Announcements from "./Announcements"; import styles from "./Summary.module.css"; @@ -28,7 +27,7 @@ export default function Summary({ const subheader = useSharedInlineFragment(slots?.subheader); const summary = useSharedBlockFragment(slots?.summary); - const showNoContent = + const hideTemplate = !detailDefinition?.showAnnouncements && (!header || header?.empty) && (!subheader || subheader?.empty) && @@ -36,40 +35,32 @@ export default function Summary({ if (entity?.__typename === "%other") return null; - return ( + return !hideTemplate ? ( - {showNoContent ? ( -
- +
+
+ {header?.valid && !!header.content && ( +

+ +

+ )} + {subheader?.valid && !!subheader.content && ( +

+ +

+ )} + {summary?.valid && !!summary.content && ( + + )}
- ) : ( - <> -
-
- {header?.valid && !!header.content && ( -

- -

- )} - {subheader?.valid && !!subheader.content && ( -

- -

- )} - {summary?.valid && !!summary.content && ( - - )} -
- {detailDefinition?.showAnnouncements && !!entity?.announcements && ( -
- -
- )} + {detailDefinition?.showAnnouncements && !!entity?.announcements && ( +
+
- - )} + )} +
- ); + ) : null; } const fragment = graphql` diff --git a/components/templates/MainLayout/MainLayout.tsx b/components/templates/MainLayout/MainLayout.tsx index 56bf4542..28c93bd0 100644 --- a/components/templates/MainLayout/MainLayout.tsx +++ b/components/templates/MainLayout/MainLayout.tsx @@ -1,7 +1,7 @@ "use client"; import { graphql, useFragment } from "react-relay"; -import { ProcessingMessage } from "@/components/templates/ProcessingCheck"; +import EmptyMessage from "@/components/templates/ProcessingCheck/EmptyMessage"; import Container from "@/components/layout/Container"; import TemplateFactory from "@/components/templates/Factory"; import { @@ -33,7 +33,7 @@ export default function MainLayout({ return allHidden || !renderedTemplates ? ( - + ) : (
diff --git a/components/templates/Metadata/Metadata.tsx b/components/templates/Metadata/Metadata.tsx index 93ca74be..1bb64a60 100644 --- a/components/templates/Metadata/Metadata.tsx +++ b/components/templates/Metadata/Metadata.tsx @@ -11,7 +11,7 @@ import { import InlineSlotWrapper from "@/components/templates/mdx/InlineSlotWrapper"; import BlockSlotWrapper from "@/components/templates/mdx/BlockSlotWrapper"; import Container from "@/components/layout/Container"; -import { ProcessingMessage } from "@/components/templates/ProcessingCheck"; +import EmptyMessage from "@/components/templates/ProcessingCheck/EmptyMessage"; import styles from "./Metadata.module.css"; export default function MetadataTemplate({ @@ -57,7 +57,7 @@ export default function MetadataTemplate({ ) : ( - + ); } diff --git a/components/templates/ProcessingCheck/EmptyMessage.tsx b/components/templates/ProcessingCheck/EmptyMessage.tsx new file mode 100644 index 00000000..f4328700 --- /dev/null +++ b/components/templates/ProcessingCheck/EmptyMessage.tsx @@ -0,0 +1,25 @@ +"use client"; + +import { Trans } from "react-i18next"; +import NoContent from "@/components/layout/messages/NoContent"; + +export default function EmptyMessage({ entityType }: { entityType?: string }) { + const i18nKey = + entityType === "item" ? "messages.empty_item" : "messages.empty"; + const noContentMessage = ( +
+ , +

, +

, + ]} + /> +
+ ); + + return ; +} diff --git a/components/templates/ProcessingCheck/ProcessingCheck.tsx b/components/templates/ProcessingCheck/ProcessingCheck.tsx index dd6e3c14..02ba1404 100644 --- a/components/templates/ProcessingCheck/ProcessingCheck.tsx +++ b/components/templates/ProcessingCheck/ProcessingCheck.tsx @@ -4,7 +4,7 @@ import { PropsWithChildren } from "react"; import { graphql, useFragment } from "react-relay"; import { ProcessingCheckFragment$key } from "@/relay/ProcessingCheckFragment.graphql"; import Container from "@/components/layout/Container"; -import ProcessingMessage from "./ProcessingMessage"; +import EmptyMessage from "./EmptyMessage"; import styles from "./ProcessingCheck.module.css"; type Props = PropsWithChildren & { @@ -19,7 +19,7 @@ export default function ProcessingCheck({ data, children, entityType }: Props) { return allHidden || !templates?.length ? ( - + ) : ( children diff --git a/components/templates/ProcessingCheck/index.ts b/components/templates/ProcessingCheck/index.ts index 244e646c..359bd770 100644 --- a/components/templates/ProcessingCheck/index.ts +++ b/components/templates/ProcessingCheck/index.ts @@ -1,3 +1,4 @@ export { default } from "./ProcessingCheck"; export { default as ProcessingMessage } from "./ProcessingMessage"; +export { default as EmptyMessage } from "./EmptyMessage"; diff --git a/lib/locales/en.json b/lib/locales/en.json index f704684c..c73de651 100644 --- a/lib/locales/en.json +++ b/lib/locales/en.json @@ -270,7 +270,9 @@ "error": "An error occured.", "content": "There was an error rendering this content.", "admin_content": "There was an error rendering this content: {{error}}", - "processing": "<0>Content Currently Being Processed<1>This {{entity}} was recently updated and is being processed before it can be displayed. Please check back in a few minutes.<2>If this message persists, please contact support for assistance." + "processing": "<0>Content Currently Being Processed<1>This {{entity}} was recently updated and is being processed before it can be displayed. Please check back in a few minutes.<2>If this message persists, please contact support for assistance.", + "empty": "<0>This {{entity}} is empty.<1>Please check back soon for updates.<2>If this message persists, please contact support for assistance.", + "empty_item": "<0>This {{entity}} has no content.<1>Please check back soon for updates.<2>If this message persists, please contact support for assistance." }, "analytics": { "regions": {