-
Notifications
You must be signed in to change notification settings - Fork 77
Add HaTS Survey prompt #2590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add HaTS Survey prompt #2590
Conversation
tnaum-ms
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me.
Here, I'm sharing an idea for an improvement (Experience API mapping), and a reminder about your //TODO about removing a timer from initSurvey
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new HaTS survey feature that prompts users to provide feedback on their NoSQL and MongoDB experiences. The changes include a new survey utilities module, integration of survey prompts and usage tracking across various views and panels, and an update to dependencies.
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/utils/surveyTypes.ts | Added type definitions for usage impact and experience kind. |
| src/utils/survey.ts | Introduced survey logic including candidate selection, prompt handling, and telemetry updates. |
| src/webviews/mongoClusters/collectionView/components/toolbar/ToolbarViewNavigation.tsx | Integrated survey ping calls for navigation interactions. |
| src/webviews/mongoClusters/documentView/documentView.tsx | Added survey ping call on document view actions. |
| src/webviews/mongoClusters/collectionView/CollectionView.tsx | Added survey ping call on view selection. |
| src/webviews/mongoClusters/collectionView/components/toolbar/ToolbarTableNavigation.tsx | Added survey ping calls in toolbar navigation actions. |
| src/panels/QueryEditorTab.ts | Integrated survey prompt calls on query actions. |
| src/webviews/mongoClusters/collectionView/collectionViewRouter.ts | Added survey prompt call after retrieving collection data. |
| src/webviews/api/configuration/appRouter.ts | Added a surveyPing mutation endpoint invoking the survey prompt mechanism. |
| src/webviews/mongoClusters/documentView/documentsViewRouter.ts | Added survey prompt call after document creation. |
| src/tree/docdb/DocumentDBItemsResourceItem.ts | Added usage tracking calls for survey within document DB items. |
| src/panels/DocumentTab.ts | Integrated a survey prompt call when opening a document tab. |
| src/tree/docdb/DocumentDBDatabaseResourceItem.ts | Added usage tracking call for survey within the database resource item. |
Comments suppressed due to low confidence (1)
src/utils/survey.ts:139
- [nitpick] The constant 'SKIP_INITIAL_SESSIONS' is used to gate the prompt based on session count, but its name may be slightly misleading. Consider renaming it to 'MIN_SESSIONS_BEFORE_PROMPT' for improved clarity.
if (sessionCount < SKIP_INITIAL_SESSIONS) {
…e calculated for each session anyway.
tnaum-ms
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reviewed the files, I read and understood survey.ts and didn't spot any issues.
I also tested the flow a few times, with the flag const DEBUG_ALWAYS_PROMPT = true; set. Didn't experience any issues.
This pull request introduces a new survey feature to gather user feedback on their experience with the NoSQL and MongoDB functionalities in the extension. The changes include adding new survey-related utilities, integrating survey prompts into various parts of the codebase, and updating dependencies.
Survey Integration:
src/utils/survey.ts: Added a new module to handle survey logic, including initializing the survey, counting usage, and prompting users based on specific criteria with two stages:initSurveyto reduce noise and not annoy users who have already engaged with the surveyRemind Me LaterpromptAfterActionEventuallyto trigger the survey prompt based on the user's actions.MongoorNoSQL), a separate score will be tracked for each experience.countExperienceUsageForSurveywith an appropriate score.Codebase Modifications:
src/extension.ts: Integrated the survey initialization functioninitSurveyto be called during the extension activation. [1] [2]src/panels/DocumentTab.ts: Added a call topromptAfterActionEventuallyto prompt users after certain actions in theDocumentTabclass. [1] [2]src/panels/QueryEditorTab.ts: Added multiple calls topromptAfterActionEventuallyto prompt users after various actions in theQueryEditorTabclass. [1] [2] [3] [4] [5] [6] [7]src/tree/docdb/DocumentDBDatabaseResourceItem.ts: Added a call tocountExperienceUsageForSurveyto track usage in theDocumentDBDatabaseResourceItemclass. [1] [2]src/tree/docdb/DocumentDBItemsResourceItem.ts: Added calls tocountExperienceUsageForSurveyto track usage in theDocumentDBItemsResourceItemclass. [1] [2]Dependency Updates:
package.json: Added a new dependency for@types/semverto support the survey feature.There are two stages for the survey prompt to show
survey.ts