Skip to content

Commit 3e60b59

Browse files
committed
Still show helper text while loading template gallery
1 parent 489d87a commit 3e60b59

File tree

3 files changed

+18
-8
lines changed

3 files changed

+18
-8
lines changed

services/backend-api/client/src/features/templates/components/TemplateGalleryModal/TemplateGalleryLoadingSkeleton.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { TemplateGalleryLayout } from "./TemplateGalleryLayout";
88
export const TemplateGalleryLoadingSkeleton = () => {
99
return (
1010
<Box>
11-
<Skeleton height="20px" width="70%" mb={4} />
1211
<TemplateGalleryLayout
1312
templateList={
1413
<VStack spacing={3} align="stretch" p={1}>

services/backend-api/client/src/features/templates/components/TemplateGalleryModal/index.tsx

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ import { convertTemplateMessageComponentToPreviewInput } from "./templatePreview
4343
import { TemplateGalleryLayout } from "./TemplateGalleryLayout";
4444
import { MessageComponentRoot } from "../../../../pages/MessageBuilder/types";
4545

46+
const TEMPLATE_GALLERY_HELPER_TEXT =
47+
"Pick a starting point for your message layout. You can customize everything after applying.";
48+
4649
export interface Article {
4750
id: string;
4851
title?: string;
@@ -418,7 +421,14 @@ const TemplateGalleryModalComponent = (props: TemplateGalleryModalProps) => {
418421
}
419422

420423
if (isLoadingArticles) {
421-
return <TemplateGalleryLoadingSkeleton />;
424+
return (
425+
<>
426+
<Text color="gray.400" mb={4}>
427+
{TEMPLATE_GALLERY_HELPER_TEXT}
428+
</Text>
429+
<TemplateGalleryLoadingSkeleton />
430+
</>
431+
);
422432
}
423433

424434
return (
@@ -429,10 +439,11 @@ const TemplateGalleryModalComponent = (props: TemplateGalleryModalProps) => {
429439
Some templates are unavailable until your feed has articles
430440
</Alert>
431441
)}
432-
<Text color="gray.400" mb={4}>
433-
Pick a starting point for your message layout. You can customize everything after
434-
applying.
435-
</Text>
442+
{!hasNoFeedFields && (
443+
<Text color="gray.400" mb={4}>
444+
{TEMPLATE_GALLERY_HELPER_TEXT}
445+
</Text>
446+
)}
436447
<TemplateGalleryLayout
437448
templateList={
438449
<Box as="fieldset">

services/backend-api/client/src/features/templates/constants/templates.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ export const RICH_EMBED_TEMPLATE: Template = {
5454
id: "rich-embed-title",
5555
name: "Title",
5656
content: linkField
57-
? `## [{{title}}]({{${linkField}}})${authorField ? "\n**{{author}}**" : ""}`
58-
: `## {{title}}${authorField ? "\n**{{author}}**" : ""}`,
57+
? `### [{{title}}]({{${linkField}}})${authorField ? "\n**{{author}}**" : ""}`
58+
: `### {{title}}${authorField ? "\n**{{author}}**" : ""}`,
5959
};
6060

6161
const headerComponent = hasImage

0 commit comments

Comments
 (0)