feat: rich text in headlines (#6685)

Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Dhruwang <dhruwangjariwala18@gmail.com>
This commit is contained in:
Anshuman Pandey
2025-10-16 15:59:46 +05:30
committed by GitHub
parent df191de1b4
commit 36c5fc4a65
100 changed files with 1523 additions and 1002 deletions
@@ -91,7 +91,7 @@ export const mockSurvey: TSurvey = {
createdBy: "cm98dg3xm000019hpubj39vfi",
status: "inProgress",
welcomeCard: {
html: {
subheader: {
default: "Thanks for providing your feedback - let's go!",
},
enabled: false,
@@ -168,6 +168,7 @@ export const mockSurvey: TSurvey = {
triggers: [],
segment: null,
followUps: mockFollowUps,
metadata: {},
};
export const mockContactQuestion: TSurveyContactInfoQuestion = {
@@ -1,4 +1,3 @@
import { parseRecallInfo } from "@/lib/utils/recall";
import { describe, expect, test, vi } from "vitest";
import { TAttributes } from "@formbricks/types/attributes";
import { TLanguage } from "@formbricks/types/project";
@@ -8,6 +7,7 @@ import {
TSurveyQuestion,
TSurveyQuestionTypeEnum,
} from "@formbricks/types/surveys/types";
import { parseRecallInfo } from "@/lib/utils/recall";
import { replaceAttributeRecall } from "./utils";
vi.mock("@/lib/utils/recall", () => ({
@@ -62,6 +62,7 @@ const baseSurvey: TSurvey = {
autoComplete: null,
segment: null,
pin: null,
metadata: {},
};
const attributes: TAttributes = {
@@ -102,7 +103,7 @@ describe("replaceAttributeRecall", () => {
welcomeCard: {
enabled: true,
headline: { default: "Welcome, recall:name!" },
html: { default: "<p>Some content</p>" },
subheader: { default: "<p>Some content</p>" },
buttonLabel: { default: "Start" },
timeToFinish: false,
showResponseCount: false,
@@ -206,7 +207,7 @@ describe("replaceAttributeRecall", () => {
welcomeCard: {
enabled: true,
headline: { default: "Welcome!" },
html: { default: "<p>Some content</p>" },
subheader: { default: "<p>Some content</p>" },
buttonLabel: { default: "Start" },
timeToFinish: false,
showResponseCount: false,