mirror of
https://github.com/formbricks/formbricks.git
synced 2026-05-08 06:41:45 -05:00
chore: sunset card shadow color (#6152)
This commit is contained in:
committed by
GitHub
parent
ef1be219b4
commit
6e3b224944
+2
-2
@@ -101,7 +101,7 @@ const mockProject = {
|
||||
highlightBorderColor: null,
|
||||
cardBackgroundColor: { light: "#FFFFFF", dark: "#000000" },
|
||||
cardBorderColor: { light: "#FFFFFF", dark: "#000000" },
|
||||
cardShadowColor: { light: "#FFFFFF", dark: "#000000" },
|
||||
|
||||
questionColor: { light: "#FFFFFF", dark: "#000000" },
|
||||
inputColor: { light: "#FFFFFF", dark: "#000000" },
|
||||
inputBorderColor: { light: "#FFFFFF", dark: "#000000" },
|
||||
@@ -123,7 +123,7 @@ const mockComputedStyling = {
|
||||
inputBorderColor: "#000000",
|
||||
cardBackgroundColor: "#FFFFFF",
|
||||
cardBorderColor: "#EEEEEE",
|
||||
cardShadowColor: "#AAAAAA",
|
||||
|
||||
highlightBorderColor: null,
|
||||
thankYouCardIconColor: "#007BFF",
|
||||
thankYouCardIconBgColor: "#DDDDDD",
|
||||
|
||||
@@ -8,7 +8,6 @@ export const COLOR_DEFAULTS = {
|
||||
inputBorderColor: "#cbd5e1",
|
||||
cardBackgroundColor: "#ffffff",
|
||||
cardBorderColor: "#f8fafc",
|
||||
cardShadowColor: "#000000",
|
||||
highlightBorderColor: "#64748b",
|
||||
} as const;
|
||||
|
||||
@@ -32,9 +31,6 @@ export const defaultStyling: TProjectStyling = {
|
||||
cardBorderColor: {
|
||||
light: COLOR_DEFAULTS.cardBorderColor,
|
||||
},
|
||||
cardShadowColor: {
|
||||
light: COLOR_DEFAULTS.cardShadowColor,
|
||||
},
|
||||
isLogoHidden: false,
|
||||
highlightBorderColor: undefined,
|
||||
isDarkModeEnabled: false,
|
||||
|
||||
@@ -1296,7 +1296,6 @@
|
||||
"card_arrangement_for_survey_type_derived": "Kartenanordnung für {surveyTypeDerived} Umfragen",
|
||||
"card_background_color": "Hintergrundfarbe der Karte",
|
||||
"card_border_color": "Farbe des Kartenrandes",
|
||||
"card_shadow_color": "Farbton des Kartenschattens",
|
||||
"card_styling": "Kartenstil",
|
||||
"casual": "Lässig",
|
||||
"caution_edit_duplicate": "Duplizieren & bearbeiten",
|
||||
@@ -1321,7 +1320,6 @@
|
||||
"change_the_brand_color_of_the_survey": "Markenfarbe der Umfrage ändern.",
|
||||
"change_the_placement_of_this_survey": "Platzierung dieser Umfrage ändern.",
|
||||
"change_the_question_color_of_the_survey": "Fragefarbe der Umfrage ändern.",
|
||||
"change_the_shadow_color_of_the_card": "Schattenfarbe der Karte ändern.",
|
||||
"changes_saved": "Änderungen gespeichert.",
|
||||
"character_limit_toggle_description": "Begrenzen Sie, wie kurz oder lang eine Antwort sein kann.",
|
||||
"character_limit_toggle_title": "Fügen Sie Zeichenbeschränkungen hinzu",
|
||||
@@ -2819,4 +2817,4 @@
|
||||
"understand_purchase_intention_question_3_headline": "Was, wenn überhaupt, hält Dich heute davon ab, einen Kauf zu tätigen?",
|
||||
"understand_purchase_intention_question_3_placeholder": "Tippe deine Antwort hier..."
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1296,7 +1296,6 @@
|
||||
"card_arrangement_for_survey_type_derived": "Card Arrangement for {surveyTypeDerived} Surveys",
|
||||
"card_background_color": "Card background color",
|
||||
"card_border_color": "Card border color",
|
||||
"card_shadow_color": "Card shadow color",
|
||||
"card_styling": "Card Styling",
|
||||
"casual": "Casual",
|
||||
"caution_edit_duplicate": "Duplicate & edit",
|
||||
@@ -1321,7 +1320,6 @@
|
||||
"change_the_brand_color_of_the_survey": "Change the brand color of the survey.",
|
||||
"change_the_placement_of_this_survey": "Change the placement of this survey.",
|
||||
"change_the_question_color_of_the_survey": "Change the question color of the survey.",
|
||||
"change_the_shadow_color_of_the_card": "Change the shadow color of the card.",
|
||||
"changes_saved": "Changes saved.",
|
||||
"character_limit_toggle_description": "Limit how short or long an answer can be.",
|
||||
"character_limit_toggle_title": "Add character limits",
|
||||
@@ -2819,4 +2817,4 @@
|
||||
"understand_purchase_intention_question_3_headline": "What, if anything, is holding you back from making a purchase today?",
|
||||
"understand_purchase_intention_question_3_placeholder": "Type your answer here..."
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1296,7 +1296,6 @@
|
||||
"card_arrangement_for_survey_type_derived": "Disposition des cartes pour les enquêtes {surveyTypeDerived}",
|
||||
"card_background_color": "Couleur de fond de la carte",
|
||||
"card_border_color": "Couleur de la bordure de la carte",
|
||||
"card_shadow_color": "Couleur de l'ombre de la carte",
|
||||
"card_styling": "Style de carte",
|
||||
"casual": "Décontracté",
|
||||
"caution_edit_duplicate": "Dupliquer et modifier",
|
||||
@@ -1321,7 +1320,6 @@
|
||||
"change_the_brand_color_of_the_survey": "Changez la couleur de la marque du sondage.",
|
||||
"change_the_placement_of_this_survey": "Changez le placement de cette enquête.",
|
||||
"change_the_question_color_of_the_survey": "Changez la couleur des questions du sondage.",
|
||||
"change_the_shadow_color_of_the_card": "Changez la couleur de l'ombre de la carte.",
|
||||
"changes_saved": "Modifications enregistrées.",
|
||||
"character_limit_toggle_description": "Limitez la longueur des réponses.",
|
||||
"character_limit_toggle_title": "Ajouter des limites de caractères",
|
||||
@@ -2819,4 +2817,4 @@
|
||||
"understand_purchase_intention_question_3_headline": "Qu'est-ce qui vous empêche de faire un achat aujourd'hui, s'il y a quelque chose ?",
|
||||
"understand_purchase_intention_question_3_placeholder": "Entrez votre réponse ici..."
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1296,7 +1296,6 @@
|
||||
"card_arrangement_for_survey_type_derived": "Arranjo de Cartões para Pesquisas {surveyTypeDerived}",
|
||||
"card_background_color": "Cor de fundo do cartão",
|
||||
"card_border_color": "Cor da borda do cartão",
|
||||
"card_shadow_color": "cor da sombra do cartão",
|
||||
"card_styling": "Estilização de Cartão",
|
||||
"casual": "Casual",
|
||||
"caution_edit_duplicate": "Duplicar e editar",
|
||||
@@ -1321,7 +1320,6 @@
|
||||
"change_the_brand_color_of_the_survey": "Muda a cor da marca da pesquisa.",
|
||||
"change_the_placement_of_this_survey": "Muda a posição dessa pesquisa.",
|
||||
"change_the_question_color_of_the_survey": "Muda a cor da pergunta da pesquisa.",
|
||||
"change_the_shadow_color_of_the_card": "Muda a cor da sombra do cartão.",
|
||||
"changes_saved": "Mudanças salvas.",
|
||||
"character_limit_toggle_description": "Limite o quão curta ou longa uma resposta pode ser.",
|
||||
"character_limit_toggle_title": "Adicionar limites de caracteres",
|
||||
@@ -2819,4 +2817,4 @@
|
||||
"understand_purchase_intention_question_3_headline": "O que, se é que tem algo, está te impedindo de fazer a compra hoje?",
|
||||
"understand_purchase_intention_question_3_placeholder": "Digite sua resposta aqui..."
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1296,7 +1296,6 @@
|
||||
"card_arrangement_for_survey_type_derived": "Arranjo de Cartões para Inquéritos {surveyTypeDerived}",
|
||||
"card_background_color": "Cor de fundo do cartão",
|
||||
"card_border_color": "Cor da borda do cartão",
|
||||
"card_shadow_color": "Cor da sombra do cartão",
|
||||
"card_styling": "Estilo do cartão",
|
||||
"casual": "Casual",
|
||||
"caution_edit_duplicate": "Duplicar e editar",
|
||||
@@ -1321,7 +1320,6 @@
|
||||
"change_the_brand_color_of_the_survey": "Alterar a cor da marca do inquérito",
|
||||
"change_the_placement_of_this_survey": "Alterar a colocação deste inquérito.",
|
||||
"change_the_question_color_of_the_survey": "Alterar a cor da pergunta do inquérito",
|
||||
"change_the_shadow_color_of_the_card": "Alterar a cor da sombra do cartão.",
|
||||
"changes_saved": "Alterações guardadas.",
|
||||
"character_limit_toggle_description": "Limitar o quão curta ou longa uma resposta pode ser.",
|
||||
"character_limit_toggle_title": "Adicionar limites de caracteres",
|
||||
@@ -2819,4 +2817,4 @@
|
||||
"understand_purchase_intention_question_3_headline": "O que, se alguma coisa, o está a impedir de fazer uma compra hoje?",
|
||||
"understand_purchase_intention_question_3_placeholder": "Escreva a sua resposta aqui..."
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1296,7 +1296,6 @@
|
||||
"card_arrangement_for_survey_type_derived": "'{'surveyTypeDerived'}' 問卷的卡片排列",
|
||||
"card_background_color": "卡片背景顏色",
|
||||
"card_border_color": "卡片邊框顏色",
|
||||
"card_shadow_color": "卡片陰影顏色",
|
||||
"card_styling": "卡片樣式設定",
|
||||
"casual": "隨意",
|
||||
"caution_edit_duplicate": "複製 & 編輯",
|
||||
@@ -1321,7 +1320,6 @@
|
||||
"change_the_brand_color_of_the_survey": "變更問卷的品牌顏色。",
|
||||
"change_the_placement_of_this_survey": "變更此問卷的位置。",
|
||||
"change_the_question_color_of_the_survey": "變更問卷的問題顏色。",
|
||||
"change_the_shadow_color_of_the_card": "變更卡片的陰影顏色。",
|
||||
"changes_saved": "已儲存變更。",
|
||||
"character_limit_toggle_description": "限制答案的長度或短度。",
|
||||
"character_limit_toggle_title": "新增字元限制",
|
||||
@@ -2819,4 +2817,4 @@
|
||||
"understand_purchase_intention_question_3_headline": "有什麼阻礙您今天進行購買嗎?",
|
||||
"understand_purchase_intention_question_3_placeholder": "在此輸入您的答案..."
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -39,7 +39,7 @@ describe("updateProjectBranding", () => {
|
||||
inputBorderColor: { light: "#cbd5e1" },
|
||||
cardBackgroundColor: { light: "#ffffff" },
|
||||
cardBorderColor: { light: "#f8fafc" },
|
||||
cardShadowColor: { light: "#000000" },
|
||||
|
||||
isLogoHidden: false,
|
||||
isDarkModeEnabled: false,
|
||||
background: { bg: "#fff", bgType: "color" as const },
|
||||
|
||||
@@ -56,7 +56,6 @@ describe("FormStylingSettings Component", () => {
|
||||
inputBorderColor: { light: "#cccccc" },
|
||||
cardBackgroundColor: { light: "#ffffff" },
|
||||
cardBorderColor: { light: "#eeeeee" },
|
||||
cardShadowColor: { light: "#dddddd" },
|
||||
},
|
||||
}) as UseFormReturn<TProjectStyling | TSurveyStyling>;
|
||||
|
||||
@@ -106,7 +105,6 @@ describe("FormStylingSettings Component", () => {
|
||||
inputBorderColor: { light: "#cccccc" },
|
||||
cardBackgroundColor: { light: "#ffffff" },
|
||||
cardBorderColor: { light: "#eeeeee" },
|
||||
cardShadowColor: { light: "#dddddd" },
|
||||
},
|
||||
}) as UseFormReturn<TProjectStyling | TSurveyStyling>;
|
||||
|
||||
@@ -169,7 +167,6 @@ describe("FormStylingSettings Component", () => {
|
||||
inputBorderColor: { light: "#cccccc" },
|
||||
cardBackgroundColor: { light: "#ffffff" },
|
||||
cardBorderColor: { light: "#eeeeee" },
|
||||
cardShadowColor: { light: "#dddddd" },
|
||||
},
|
||||
}) as UseFormReturn<TProjectStyling | TSurveyStyling>;
|
||||
|
||||
@@ -215,7 +212,6 @@ describe("FormStylingSettings Component", () => {
|
||||
inputBorderColor: { light: "#cccccc" },
|
||||
cardBackgroundColor: { light: "#ffffff" },
|
||||
cardBorderColor: { light: "#eeeeee" },
|
||||
cardShadowColor: { light: "#dddddd" },
|
||||
},
|
||||
}) as UseFormReturn<TProjectStyling | TSurveyStyling>;
|
||||
|
||||
@@ -261,7 +257,6 @@ describe("FormStylingSettings Component", () => {
|
||||
inputBorderColor: { light: "#cccccc" },
|
||||
cardBackgroundColor: { light: "#ffffff" },
|
||||
cardBorderColor: { light: "#eeeeee" },
|
||||
cardShadowColor: { light: "#dddddd" },
|
||||
},
|
||||
}) as UseFormReturn<TProjectStyling | TSurveyStyling>;
|
||||
|
||||
@@ -384,7 +379,6 @@ describe("FormStylingSettings Component", () => {
|
||||
inputBorderColor: { light: "#cccccc" },
|
||||
cardBackgroundColor: { light: "#ffffff" },
|
||||
cardBorderColor: { light: "#eeeeee" },
|
||||
cardShadowColor: { light: "#dddddd" },
|
||||
},
|
||||
}) as UseFormReturn<TProjectStyling | TSurveyStyling>;
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ export const FormStylingSettings = ({
|
||||
const setInputBorderColor = (color: string) => form.setValue("inputBorderColor.light", color);
|
||||
const setCardBackgroundColor = (color: string) => form.setValue("cardBackgroundColor.light", color);
|
||||
const setCardBorderColor = (color: string) => form.setValue("cardBorderColor.light", color);
|
||||
const setCardShadowColor = (color: string) => form.setValue("cardShadowColor.light", color);
|
||||
|
||||
const setBackgroundColor = (color: string) => {
|
||||
form.setValue("background", {
|
||||
bg: color,
|
||||
@@ -59,7 +59,6 @@ export const FormStylingSettings = ({
|
||||
|
||||
setCardBackgroundColor(mixColor(brandColor, "#ffffff", 0.97));
|
||||
setCardBorderColor(mixColor(brandColor, "#ffffff", 0.8));
|
||||
setCardShadowColor(brandColor);
|
||||
|
||||
if (!background || background?.bgType === "color") {
|
||||
setBackgroundColor(mixColor(brandColor, "#ffffff", 0.855));
|
||||
|
||||
@@ -82,7 +82,6 @@ const TestWrapper = ({
|
||||
isLogoHidden: false,
|
||||
cardBackgroundColor: { light: "#ffffff" },
|
||||
cardBorderColor: { light: "#e2e8f0" },
|
||||
cardShadowColor: { light: "#f1f5f9" },
|
||||
},
|
||||
}) => {
|
||||
const methods = useForm({ defaultValues });
|
||||
@@ -109,7 +108,6 @@ const TestComponent = ({
|
||||
isLogoHidden: false,
|
||||
cardBackgroundColor: { light: "#ffffff" },
|
||||
cardBorderColor: { light: "#e2e8f0" },
|
||||
cardShadowColor: { light: "#f1f5f9" },
|
||||
},
|
||||
});
|
||||
|
||||
@@ -176,7 +174,7 @@ describe("CardStylingSettings", () => {
|
||||
// Check for color picker labels
|
||||
expect(screen.getByText("environments.surveys.edit.card_background_color")).toBeInTheDocument();
|
||||
expect(screen.getByText("environments.surveys.edit.card_border_color")).toBeInTheDocument();
|
||||
expect(screen.getByText("environments.surveys.edit.card_shadow_color")).toBeInTheDocument();
|
||||
|
||||
});
|
||||
|
||||
test("renders slider for roundness adjustment", () => {
|
||||
|
||||
@@ -162,28 +162,7 @@ export const CardStylingSettings = ({
|
||||
)}
|
||||
/>
|
||||
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="cardShadowColor.light"
|
||||
render={({ field }) => (
|
||||
<FormItem className="space-y-4">
|
||||
<div>
|
||||
<FormLabel>{t("environments.surveys.edit.card_shadow_color")}</FormLabel>
|
||||
<FormDescription>
|
||||
{t("environments.surveys.edit.change_the_shadow_color_of_the_card")}
|
||||
</FormDescription>
|
||||
</div>
|
||||
|
||||
<FormControl>
|
||||
<ColorPicker
|
||||
color={field.value || COLOR_DEFAULTS.cardShadowColor}
|
||||
onChange={(color) => field.onChange(color)}
|
||||
containerClass="max-w-xs"
|
||||
/>
|
||||
</FormControl>
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
|
||||
<FormField
|
||||
control={form.control}
|
||||
|
||||
Reference in New Issue
Block a user