Skip to content

Accept multiple reasons per page feedback submission - #4054

Merged
theletterf merged 4 commits into
mainfrom
page-feedback-multi-select
Sep 8, 2026
Merged

theletterf merged 4 commits into
mainfrom
page-feedback-multi-select

Conversation

@theletterf

@theletterf theletterf commented Sep 7, 2026 •

Copy link
Copy Markdown
Member

Readers can pick several reasons when they rate a page instead of only one, and two new reasons cover stale content and findability. Each feedback record now stores a list of reasons rather than a single value.

Affects: Site UI, Docs API

Prompt summary: The ask was to review our page feedback options against comparable documentation sites and close whatever gaps that turned up. The review showed our option list derives from Stripe's, so this branch covers the reasons Stripe has no equivalent for and the single-select limit that was discarding signal. A later pass tightened the wording so that no two reasons describe the same problem.

Why

A page can fail in more than one way at the same time. The questionnaire accepts one reason, so a reader who finds a page both hard to understand and out of date can record only one of those problems. The list also offers no way to report content that describes an older version, and the positive side has no findability signal to match missingInformation on the negative side. Microsoft Learn collects several reasons at once, and GitLab collects staleness.

What

Several reasons per submission

The questionnaire takes a list of reasons, so a reader checks every box that applies. Submit stays disabled until at least one box is checked. Switching between Yes and No keeps the boxes that exist in both sets and drops the rest.

New reasons for staleness and findability

The list gains outOfDate for a page that describes an older version of a product, which the previous options had no way to report. It also gains easyToFind, a positive counterpart to missingInformation. Both carry their own copy on API reference pages.

A sharper split between wrong and stale

A reader who found a page wrong had to work out why before picking a reason, because two options said much the same thing. The "Inaccurate" label becomes "Technically incorrect" and its description covers only how the product works, while "Out of date" names the version gap. The positive "Accurate" option follows the same line and no longer claims the page is up to date. Stored values are untouched, so this part is copy only.

One comment field

A single comment covers the whole submission and keeps its text when the reader switches reaction. The previous design held a separate comment draft per option, which does not map onto a form where several options can be active together.

Stored shape

The document field becomes the multi-valued reasons keyword and reason_set_version moves to 2, so a query can tell the two shapes apart. Elasticsearch indexes a keyword array without a mapping change beyond the rename. The index has not reached production, so no migration is needed.

Out of scope: The endpoint does not cap the length of the reasons array or reject duplicate values. The form can only send known values, so this matters only for a handcrafted request.

Verify

dotnet test tests/Elastic.Documentation.Api.Tests/ --filter PageFeedback
cd src/Elastic.Documentation.Site && npm test -- PageFeedback

To see the widget, serve the repo's own docs with the flag on and open /development/page-feedback:

FEATURE_PAGE_FEEDBACK=true dotnet run --project src/tooling/docs-builder serve --path docs --port 4001

🤖 Generated with Claude Code

https://claude.ai/code/session_013qFe4JZUeEXN58iihNVsRf

Related to #4342

A reader whose page is both hard to understand and out of date could record
only one of those signals. The questionnaire now takes several reasons at
once, and one comment field covers the whole submission.

Two reasons are new. `outOfDate` separates stale content from content that
was never correct. `easyToFind` gives findability a positive counterpart.
The stored field changes from `reason` to the multi-valued `reasons`, and
`reason_set_version` moves to `2`. The index has not reached production, so
no migration is needed.

Co-Authored-By: Claude Opus 5 <[email protected]>
@theletterf
theletterf requested a review from a team as a code owner September 7, 2026 15:04
@theletterf
theletterf requested a review from reakaleek September 7, 2026 15:04
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

theletterf and others added 3 commits September 7, 2026 17:14
Both negative reasons told the reader the page was wrong, so choosing between
them meant diagnosing the cause first. The "Inaccurate" label becomes
"Technically incorrect", and its description now covers only how the product
works. "Out of date" names the version gap directly.

This is copy only. The stored `inaccurate` and `outOfDate` values do not
change, so `reason_set_version` stays at `2`.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013qFe4JZUeEXN58iihNVsRf
The "Accurate" description claimed the page was correct and up to date, which
spans the two axes its negative counterparts now separate. It describes only
how the product works, leaving staleness to "Out of date".

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013qFe4JZUeEXN58iihNVsRf
@theletterf
theletterf merged commit 334ee30 into main Sep 8, 2026
32 checks passed
@theletterf
theletterf deleted the page-feedback-multi-select branch September 8, 2026 08:20
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.

2 participants