Skip to content

[v13] add onboarding survey#29397

Merged
michellescripts merged 5 commits intobranch/v13from
michelle/v13-backport-survey
Jul 21, 2023
Merged

[v13] add onboarding survey#29397
michellescripts merged 5 commits intobranch/v13from
michelle/v13-backport-survey

Conversation

@michellescripts
Copy link
Copy Markdown
Contributor

@michellescripts michellescripts changed the title Michelle/v13 backport survey [v13] add onboarding survey Jul 21, 2023
michellescripts and others added 5 commits July 21, 2023 09:19
* update protos

* create Posthog event for onboarding questionnaire submit
* Fix panic when fetching user preferences

Closes #28740

* Prevent overwriting mismatched types in user preferences

* Add error handling to user preferences service

* GCI imports

* Refactor user preferences test and logic

This commit updates the approach for comparing equality in user preferences test. It introduces the use of the "go-cmp" library which provides more flexibility in handling comparison of struct elements, thus helping to catch any unexpected changes that could be overlooked with the standard equality checking. We also revised the logic to handle default preferences by overwriting values for better efficiency and readability, also removing unnecessary checking and merging of values.

* Add comments to overwriteValues method in userpreferences.go

Added detailed comments to better explain the overwriteValues function in userpreferences.go file. The comments clarify how the function uses proto.Ranges to iterate over fields and only overwrite non-nil/empty fields.

* Apply some magic to preferences test

* Change the import to avoid go.mod changed and match our other imports
* Display a survey during onboarding

- Adds user context wrapper to the Welcome flow in order to update preferences
- Sets selected resources on user preferences

* imports & describes

* named enums

* remove onboard survey from oss

- will be moved to /e
- export shared types

* refactor welcome

- move new credential to welcome prop

* refactor new credentails

- container passes questionnaire to component

* remove survey ls dispatch

* pr feedback

* Revert "pr feedback"

This reverts commit 060f34fb60242856f233df6a1006c5192ea321fb.
@michellescripts michellescripts force-pushed the michelle/v13-backport-survey branch from 4499ffb to 29ac6b3 Compare July 21, 2023 15:19
@michellescripts michellescripts marked this pull request as ready for review July 21, 2023 15:19
@github-actions github-actions Bot requested a review from gzdunek July 21, 2023 15:20
@michellescripts michellescripts added this pull request to the merge queue Jul 21, 2023
Merged via the queue into branch/v13 with commit ba8e3a5 Jul 21, 2023
@michellescripts michellescripts deleted the michelle/v13-backport-survey branch July 21, 2023 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants