-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
revert(survey): Revert randomize questions & choices in surveys (#22264)
Reverts #22227 I'm reverting this to fix the issue that @jurajmajerik found with shuffling questions causing us to duplicate questions.
- Loading branch information
Showing
11 changed files
with
0 additions
and
157 deletions.
There are no files selected for viewing
Binary file removed
BIN
-104 KB
...d/__snapshots__/scenes-app-surveys--new-multi-question-survey-section--dark.png
Binary file not shown.
Binary file removed
BIN
-105 KB
.../__snapshots__/scenes-app-surveys--new-multi-question-survey-section--light.png
Binary file not shown.
Binary file modified
BIN
-2.21 KB
(97%)
...nd/__snapshots__/scenes-app-surveys--new-survey-customisation-section--dark.png
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
BIN
-2.23 KB
(97%)
...d/__snapshots__/scenes-app-surveys--new-survey-customisation-section--light.png
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
BIN
-10.4 KB
(91%)
frontend/__snapshots__/scenes-app-surveys--surveys-list--dark.png
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
BIN
-10.4 KB
(91%)
frontend/__snapshots__/scenes-app-surveys--surveys-list--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,6 @@ import { mswDecorator } from '~/mocks/browser' | |
import { toPaginatedResponse } from '~/mocks/handlers' | ||
import { | ||
FeatureFlagBasicType, | ||
MultipleSurveyQuestion, | ||
PropertyFilterType, | ||
PropertyOperator, | ||
Survey, | ||
|
@@ -44,44 +43,6 @@ const MOCK_BASIC_SURVEY: Survey = { | |
responses_limit: null, | ||
} | ||
|
||
const MOCK_SURVEY_WITH_MULTIPLE_OPTIONS: Survey = { | ||
id: '998FE805-F9EF-4F25-A5D1-B9549C4E2143', | ||
name: 'survey with multiple options', | ||
description: 'survey with multiple options description', | ||
type: SurveyType.Popover, | ||
created_at: '2023-04-27T10:04:37.977401Z', | ||
created_by: { | ||
id: 1, | ||
uuid: '01863799-062b-0000-8a61-b2842d5f8642', | ||
distinct_id: 'Sopz9Z4NMIfXGlJe6W1XF98GOqhHNui5J5eRe0tBGTE', | ||
first_name: 'Employee 427', | ||
email: '[email protected]', | ||
}, | ||
questions: [ | ||
{ | ||
type: SurveyQuestionType.MultipleChoice, | ||
question: "We're sorry to see you go. What's your reason for unsubscribing?", | ||
choices: [ | ||
'I no longer need the product', | ||
'I found a better product', | ||
'I found the product too difficult to use', | ||
'Other', | ||
], | ||
shuffleOptions: true, | ||
}, | ||
], | ||
conditions: null, | ||
linked_flag: null, | ||
linked_flag_id: null, | ||
targeting_flag: null, | ||
targeting_flag_filters: undefined, | ||
appearance: { backgroundColor: 'white', submitButtonColor: '#2C2C2C' }, | ||
start_date: null, | ||
end_date: null, | ||
archived: false, | ||
responses_limit: null, | ||
} | ||
|
||
const MOCK_SURVEY_WITH_RELEASE_CONS: Survey = { | ||
id: '0187c279-bcae-0000-34f5-4f121921f006', | ||
name: 'survey with release conditions', | ||
|
@@ -193,12 +154,9 @@ const meta: Meta = { | |
'/api/projects/:team_id/surveys/': toPaginatedResponse([ | ||
MOCK_BASIC_SURVEY, | ||
MOCK_SURVEY_WITH_RELEASE_CONS, | ||
MOCK_SURVEY_WITH_MULTIPLE_OPTIONS, | ||
]), | ||
'/api/projects/:team_id/surveys/0187c279-bcae-0000-34f5-4f121921f005/': MOCK_BASIC_SURVEY, | ||
'/api/projects/:team_id/surveys/0187c279-bcae-0000-34f5-4f121921f006/': MOCK_SURVEY_WITH_RELEASE_CONS, | ||
'/api/projects/:team_id/surveys/998FE805-F9EF-4F25-A5D1-B9549C4E2143/': | ||
MOCK_SURVEY_WITH_MULTIPLE_OPTIONS, | ||
'/api/projects/:team_id/surveys/responses_count/': MOCK_RESPONSES_COUNT, | ||
[`/api/projects/:team_id/feature_flags/${ | ||
(MOCK_SURVEY_WITH_RELEASE_CONS.linked_flag as FeatureFlagBasicType).id | ||
|
@@ -248,27 +206,6 @@ export const NewSurveyCustomisationSection: StoryFn = () => { | |
return <App /> | ||
} | ||
|
||
export const NewMultiQuestionSurveySection: StoryFn = () => { | ||
useEffect(() => { | ||
router.actions.push(urls.survey('new')) | ||
surveyLogic({ id: 'new' }).mount() | ||
surveyLogic({ id: 'new' }).actions.setSelectedSection(SurveyEditSection.Steps) | ||
surveyLogic({ id: 'new' }).actions.setSurveyValue('questions', [ | ||
{ | ||
type: SurveyQuestionType.MultipleChoice, | ||
question: "We're sorry to see you go. What's your reason for unsubscribing?", | ||
choices: [ | ||
'I no longer need the product', | ||
'I found a better product', | ||
'I found the product too difficult to use', | ||
'Other', | ||
], | ||
} as MultipleSurveyQuestion, | ||
]) | ||
}, []) | ||
return <App /> | ||
} | ||
|
||
export const NewSurveyPresentationSection: StoryFn = () => { | ||
useEffect(() => { | ||
router.actions.push(urls.survey('new')) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters