-
Notifications
You must be signed in to change notification settings - Fork 45
Add page feedback collection #3705
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
Open
reakaleek
wants to merge
9
commits into
main
Choose a base branch
from
helix-chiller
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
6fa98c4
Add page feedback collection
reakaleek 265087d
Simplify page feedback retry
reakaleek 006d309
Streamline page feedback submission
reakaleek cb15a13
Redesign page feedback questionnaire
reakaleek a54536e
Adopt Elastic Ingest 0.51 for page feedback
reakaleek 2ea0737
fix: share Elasticsearch transport across adapters (per review by @Mp…
reakaleek e56fe23
fix: serialize feedback enums directly (per review by @Mpdreamz)
reakaleek 517db41
Place page feedback before page navigation
reakaleek bd1c9e5
Merge branch 'main' into helix-chiller
reakaleek File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| --- | ||
| navigation_title: Page feedback | ||
| --- | ||
|
|
||
| # Page feedback | ||
|
|
||
| The documentation site records page-level reactions and optional comments in the | ||
| `page-feedback-v1-{environment}` Elasticsearch index. The API uses the feedback | ||
| identifier as the document `_id`, so later comment submissions and reaction | ||
| changes replace the same document. | ||
|
|
||
| The thumbs-up or thumbs-down selection writes a document with the reaction after | ||
| a short debounce, so quickly changing the selection records only the final | ||
| choice. The follow-up questionnaire writes the same document again with a | ||
| structured reason, the reason-set version, and optional details. Submitting the | ||
| questionnaire flushes any pending reaction write first. This keeps abandoned | ||
| questionnaires useful while ensuring the richer submission wins. | ||
|
|
||
| Reasons are stored as keyword enum values for filtering and aggregation. | ||
| `reason_set_version` identifies the questionnaire revision that presented the | ||
| option. Display labels may change without changing their stored value. Add a new | ||
| enum value when an option's meaning changes, and retain retired values so older | ||
| clients and historical documents remain valid. | ||
|
|
||
| The current positive reasons are `accurate`, `solvedProblem`, | ||
| `easyToUnderstand`, `helpfulExamples`, and `anotherReason`. The current negative | ||
| reasons are `inaccurate`, `missingInformation`, `hardToUnderstand`, | ||
| `codeSampleErrors`, and `anotherReason`. | ||
|
|
||
| ## Provision the index | ||
|
|
||
| `PageFeedbackMapping` defines the mapping with `Elastic.Mapping` attributes. | ||
| During API startup, `PageFeedbackBootstrapService` uses | ||
| `Elastic.Ingest.Elasticsearch` to create or update environment-specific | ||
| component and index templates. The generated context uses the API assembly | ||
| version as its mapping version. Bootstrap skips unchanged mapping hashes and | ||
| prevents an older API task from replacing templates installed by a newer task | ||
| during a rolling deployment. | ||
|
|
||
| The bootstrap service and runtime gateway share one ingest channel. Feedback | ||
| upserts use `DirectWriteAsync` and await the bulk item result before the API | ||
| responds. They do not use the channel's retry overload because the browser owns | ||
| the bounded retry UX. The first successful feedback write creates the concrete | ||
| index from the templates. | ||
|
|
||
| The generated mapping disables dynamic field mapping. Fields that are not part | ||
| of `PageFeedbackDocument` remain unindexed instead of changing the schema. | ||
|
|
||
| Bootstrap failures are logged and ignored in `dev` so the local documentation | ||
| server can run without Elasticsearch. They prevent startup in `staging`, `edge`, | ||
| and `prod`. | ||
|
|
||
| Runtime credentials require permission to manage component and index templates, | ||
| create the environment's index, and write and delete its documents. | ||
|
|
||
| Template updates do not modify existing indices. For a mapping change, increment | ||
| the schema version in the index name, deploy the new template, and migrate any | ||
| documents that must be retained. Mixed task versions then write to separate | ||
| versioned indices during a rolling deployment. The assembly mapping version is | ||
| an additional downgrade guard for templates that retain the same schema-versioned | ||
| name; it does not replace index versioning. |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.