Skip to content

Commit

Permalink
feat(surveys): Allow customers to edit zIndex of the survey popup (#2…
Browse files Browse the repository at this point in the history
…5240)

This commit adds a new input field for the zIndex of the survey popup.
  • Loading branch information
Phanatic authored Sep 26, 2024
1 parent b5fbf6d commit 210e96d
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions frontend/src/scenes/surveys/SurveyCustomization.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,20 @@ export function Customization({ appearance, surveyQuestionItem, onAppearanceChan
onChange={(submitButtonTextColor) => onAppearanceChange({ ...appearance, submitButtonTextColor })}
disabled={!surveysStylingAvailable}
/>

<LemonField.Pure
label="Survey form zIndex"
info="If the survey popup is hidden behind another overlapping UI element, set this value higher than the overlapping element's zIndex."
>
<LemonInput
type="text"
value={appearance?.zIndex}
onChange={(zIndex) => onAppearanceChange({ ...appearance, zIndex })}
disabled={!surveysStylingAvailable}
placeholder="99999"
defaultValue="99999"
/>
</LemonField.Pure>
{surveyQuestionItem.type === SurveyQuestionType.Open && (
<>
<div className="mt-2">Placeholder text</div>
Expand Down
1 change: 1 addition & 0 deletions frontend/src/scenes/surveys/surveyActivityDescriber.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ const surveyActionsMapping: Record<
widgetSelector: 'widget selector',
widgetLabel: 'widget label',
widgetColor: 'widget color',
zIndex: 'survey form zIndex',
}

Object.entries(fieldNameMapping).forEach(([field, readableFieldName]) => {
Expand Down
1 change: 1 addition & 0 deletions frontend/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2730,6 +2730,7 @@ export interface SurveyAppearance {
thankYouMessageCloseButtonText?: string
autoDisappear?: boolean
position?: string
zIndex?: string
shuffleQuestions?: boolean
surveyPopupDelaySeconds?: number
// widget only
Expand Down

0 comments on commit 210e96d

Please sign in to comment.