Skip to content

Commit

Permalink
feat(surveys): Custom and tab widget (#19223)
Browse files Browse the repository at this point in the history
* add widget to surveys UI

* add widget to survey appearance

* add beta tag and flag

* fix template titles

* Update UI snapshots for `chromium` (2)

* migration for type

* migration file

* move widget customization into customization panel

* fix migration conflict

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
liyiy and github-actions[bot] authored Dec 13, 2023
1 parent 74a06f1 commit 255f6b1
Show file tree
Hide file tree
Showing 17 changed files with 400 additions and 163 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.
Binary file modified frontend/__snapshots__/scenes-app-surveys--new-survey.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions frontend/src/lib/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ export const FEATURE_FLAGS = {
NETWORK_PAYLOAD_CAPTURE: 'network-payload-capture', // owner: #team-replay
FEATURE_FLAG_COHORT_CREATION: 'feature-flag-cohort-creation', // owner: @neilkakkar #team-feature-success
INSIGHT_HORIZONTAL_CONTROLS: 'insight-horizontal-controls', // owner: @benjackwhite
SURVEYS_WIDGETS: 'surveys-widgets', // owner: @liyiy
SCHEDULED_CHANGES_FEATURE_FLAGS: 'scheduled-changes-feature-flags', // owner: @jurajmajerik #team-feature-success
ALWAYS_SHOW_SEEKBAR_PREVIEW: 'always-show-seekbar-preview', // owner: #team-replay
SESSION_REPLAY_MOBILE: 'session-replay-mobile', // owner: #team-replay
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/scenes/notebooks/Nodes/NotebookNodeSurvey.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const Component = ({ attributes }: NotebookNodeProps<NotebookNodeSurveyAttribute

<div className="w-full flex flex-col items-center">
<SurveyAppearance
type={survey.questions[0].type}
surveyType={survey.type}
surveyQuestionItem={survey.questions[0]}
appearance={survey.appearance || defaultSurveyAppearance}
/>
Expand Down
19 changes: 19 additions & 0 deletions frontend/src/scenes/surveys/SurveyAppearance.scss
Original file line number Diff line number Diff line change
Expand Up @@ -303,3 +303,22 @@
.bottom-section {
margin-top: 14px;
}

.ph-survey-widget-tab {
position: fixed;
top: 50%;
right: 0;
z-index: 9999999;
min-width: 40px;
padding: 8px 12px;
font-weight: 500;
text-align: center;
cursor: pointer;
border-radius: 3px 3px 0 0;
transform: rotate(-90deg) translate(0, -100%);
transform-origin: right top;
}

.ph-survey-widget-tab:hover {
padding-bottom: 13px;
}
Loading

0 comments on commit 255f6b1

Please sign in to comment.