Repository navigation
Add an Edit page button and a site problem feedback reason - #4056
Merged
Merged
Conversation
A reader who finishes a page does not look back at the right rail, and the rail hides both links below the `lg` breakpoint. The bottom row puts them where the reader already is, beside the feedback buttons. The right-rail copies stay, so either one works. The "Learn how to contribute" link leaves the rail. It points at general guidance rather than at this page, so it does not earn a slot next to three page-specific actions. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013qFe4JZUeEXN58iihNVsRf
Contributor
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4056/ Sample changed pages: |
The row holds four controls that do the same kind of thing, so they now share one appearance. `.page-actions__action` copies the box that `.page-feedback__choice` draws, and hover turns the border and text `--color-blue-elastic` instead of the green and red the feedback buttons use. Short labels follow from the button shape. "Report a docs issue" and "Edit this page" read as prose next to two one-word buttons, so the pair becomes "Edit page" and "Report issue". The rail keeps the long labels, where the extra words still help. Edit comes first because a reader who wants to act on a page usually edits it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013qFe4JZUeEXN58iihNVsRf
A button that opens a GitHub issue form asks a lot of a reader who just wants to say that something is broken. The negative questionnaire already collects that kind of report, so the sixth negative reason is now `siteProblem`, labelled "Something is broken". It covers a dead link, a control that does nothing, or a search that returns nothing, which `inaccurate` and `codeSampleErrors` never described. The bottom row keeps "Edit page" alone. The rail still carries "Report a docs issue" for a reader who does want to file one. `REASON_SET_VERSION` moves to 3 because the negative set changed. A query that counts site faults must not read a version 2 document as an absence of them. The endpoint validates reasons per reaction, so the new value also joins `PageFeedbackReason` and the `ThumbsDown` list; without both a submission would fail with `400`. The `reasons` field is a keyword, so no mapping change and no reindex. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013qFe4JZUeEXN58iihNVsRf
A reader cannot tell a page that was never right from a page that stopped being right, and should not have to. "Technically incorrect" now reads "The page is wrong about how the product works, or describes an older version", and the negative questionnaire drops to six options. `outOfDate` stays in `PageFeedbackReason` and on the `ThumbsDown` list. Historical documents hold the value, and a browser running a cached bundle still submits it, so removing either one would answer a live reader with `400`. Only the browser's reason set loses it. `REASON_SET_VERSION` stays at 3. Version 3 has not shipped, so this joins it rather than inventing a version 4 that no browser ever presented. Against version 2 the negative set now differs twice: version 2 offered `outOfDate` and lacked `siteProblem`. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013qFe4JZUeEXN58iihNVsRf
"The page is wrong about how the product works, or describes an older version" spent six words restating the label. It now reads "The page is wrong or describes an older version." Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013qFe4JZUeEXN58iihNVsRf
Member
Author
|
@reakaleek Ready for review |
reakaleek
approved these changes
Sep 8, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Every docs page now ends with an "Edit page" button, right aligned on the row with the feedback prompt and styled to match Yes and No. The negative questionnaire gains a "Something is broken" reason for faults in the site rather than the content, "Out of date" folds into "Technically incorrect", and "Learn how to contribute" leaves the right rail.
Affects: Site UI, Docs API, Navigation
Prompt summary: The ask was to put the "Edit this page" and "Report an issue" links at the bottom of the page, on the same row as the feedback buttons and right aligned. The rail copies stay rather than move, so a reader can act from either place. The "Learn how to contribute" link goes. A follow-up ask turned the two links into buttons that match Yes and No, shortened their labels, and put edit first. A third ask dropped the "Report issue" button and asked whether a reader could instead report a site glitch through the feedback options. A fourth removed "Out of date" and folded it into "Technically incorrect".
Why
A reader who reaches the end of a page has already scrolled past the right rail. The rail list carries
hidden md:flex, so a phone reader sees no CTA at all, andreport-an-issuestays hidden until thelgbreakpoint. The moment someone wants to act on a page is the moment they finish reading, and nothing there offers a way to do it.Reporting a broken link or a dead control was worse. The only route was a GitHub issue form, which asks a lot of a reader who just wants to flag a glitch, and none of the negative reasons fit:
inaccurateandcodeSampleErrorsare both about the words on the page.At the other end, two reasons asked for a distinction the reader cannot make. Telling a page that was never right from one that stopped being right needs the page's history, so
outOfDateandinaccuratecollapse into one option.What
An Edit page button under the article
The bottom of every docs page now carries an "Edit page" button, right aligned on the row with the feedback prompt.
.page-actions__actionreproduces the box that.page-feedback__choicedraws, so the three controls on the row share a border, a radius, padding, and a colour. Hover parts company: this one turns--color-blue-elastic, not the green and red the feedback buttons use. A new_PageActionsslice renders it, and its gate matches_TableOfContents.cshtml, so a page that shows the rail copy shows this one too.Six negative reasons instead of six different ones
siteProblem, labelled "Something is broken", reports a fault in the site: a dead link, a control that does nothing, or a search that returns nothing.outOfDateleaves the questionnaire and "Technically incorrect" absorbs it, now reading "The page is wrong about how the product works, or describes an older version".REASON_SET_VERSIONmoves to 3 for both changes at once, since version 3 has not shipped. Against version 2 the negative set differs twice, so a query that counts either reason must scope itself to a version.A retired reason is not a deleted one
outOfDatestays inPageFeedbackReasonand on theThumbsDownallowlist. Historical documents hold the value, and a browser running a cached bundle still submits it, so dropping either would answer a live reader with400.Put_MultipleReasons_RecordsAllReasonssends it and is the guard.A new reason has to pass three gates
The endpoint validates each reason against the reaction it arrives with, so
siteProblemjoins the enum and theThumbsDownbranch ofIsReasonValidForReaction. Without both, a submission returns400. Thereasonsfield is akeyword, so neither the addition nor the retirement needs a mapping change or a reindex.The feedback row shares its top border
page-feedback.csssets the top border and spacing on thepage-feedbackelement itself, which would stop at the left column once the row holds two children. A.page-outrowrapper takes those over and zeroes them on the element. ApiExplorer and Codex renderpage-feedbackunwrapped, so their spacing is untouched, and:has(*)keeps the border off the wrapper when both partials render nothing.Out of scope: Codex renders
page-feedbackunwrapped in_MarkdownLayout.cshtml, so internal docs get no bottom row. The ApiExplorer layouts have no edit URL on their view model, so they are unchanged too. The?editreveal inmain.tsmoved to$$optionalso it clears the class on both.edit-this-pagecopies rather than the first.Verify
To see both changes, build the assets and serve with the flags on:
Open
http://localhost:3000/syntax/admonitionsand scroll to the end of the article. "Edit page" should match the height and centre line of Yes and No. Click No: six options, no "Out of date", and "Something is broken" fifth above "Another reason". Submitting locally returns503because there is no Elasticsearch, so the endpoint tests are the proof for the payload.🤖 Generated with Claude Code
https://claude.ai/code/session_013qFe4JZUeEXN58iihNVsRf
Related to #4342