You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature Request]: Enable linking to dropdowns #1759
ai-triagedIssue received an initial assessment through AI-powered current code and architecture checks.ai:eng-questionAI triage raised an architecture/engineering question.ai:ux-questionAI triage raised a UX / frontend question for a human to decide.closed-staleenhancementstale
I want to link to specific dropdowns from other pages + PMs want to send customers to specific dropdowns rather than having them scan a whole page. Can we get the ability to add custom anchors to dropdowns?
Automated investigation against the current codebase. A human still needs to confirm before any code change.
Original concern
Authors/PMs want to deep-link to a specific {dropdown} so a URL fragment scrolls to and expands that dropdown — i.e. custom anchors on dropdowns.
Findings
src/Elastic.Markdown/Myst/Directives/Admonition/AdmonitionBlock.cs:41 — the dropdown directive already reads a :name: option into CrossReferenceName (DropdownBlock derives from AdmonitionBlock, line 10).
src/Elastic.Markdown/Myst/Directives/Dropdown/DropdownView.cshtml:3 — that value is emitted as the id on the <details> element: <details class="dropdown ..." id="@Model.CrossReferenceName" ...>. So :::{dropdown} Title + :name: my-anchor renders <details id="my-anchor">, and page#my-anchor already targets it. There is no auto-generated id when :name: is omitted.
src/Elastic.Documentation.Site/Assets/open-details-with-anchor.ts:7-23 — on navigation, if window.location.hash resolves to an element whose closest('details') exists, it sets closestDetails.open = true and scrolls to it — but only for non-Chrome browsers (line 13); Chrome is assumed to handle this natively. Wired up on every page load via main.ts:122 (openDetailsWithAnchor() in the htmx:load handler).
docs/syntax/dropdowns.md (whole file) — documents open and applies_to but not:name:, so the existing anchor capability is effectively undiscoverable to writers.
Unlike headings and code blocks (e.g. src/Elastic.Markdown/Myst/CodeBlocks/Code.cshtml:8 renders a ¶ headerlink), the dropdown title has no visible/copyable anchor link, so even where an id exists there's no UI to grab the deep link.
Verdict
Partially done
The underlying mechanism already exists: a dropdown with :name: renders a stable id, and a frontend shim expands the <details> when you land on its fragment (non-Chrome; Chrome relied upon natively). What's missing is the user-visible polish that makes this a real feature: :name: is undocumented, there's no auto-generated anchor, and there's no clickable/copyable anchor affordance on the dropdown title. The dedicated work for exactly this — PR #1765 ("Add deeplink anchors to dropdown directive", branch add-deeplink-anchors-dropdown) — was closed unmerged on 2026-02-11 (the "mothballed PR" referenced in the thread); it turned the inherited :name: into a title anchor link and added docs, but deliberately omitted a visual indicator to avoid "polluting the design." That design tension is why this isn't a clean quick fix.
Proposal
Open decisions, grouped by audience:
UX — Should the dropdown title expose a copyable anchor affordance (a ¶ headerlink like headings/code blocks, a hover icon, or click-title-to-copy), or stay invisible as PR Add deeplink anchors to dropdown directive #1765 chose? This is the call that stalled Add deeplink anchors to dropdown directive #1765. Should the dropdown also auto-open + smooth-scroll consistently in Chrome (the shim currently skips Chrome)?
Eng — Decide whether to auto-generate stable ids for dropdowns (slug from title) vs. requiring :name:, and how to keep them stable/unique across edits. Confirm cross-browser open-on-hash behavior: the shim only fires for non-Chrome (open-details-with-anchor.ts:13) and assumes Chrome's native behavior — worth verifying against current Chrome plus find-in-page interplay. If reviving PR Add deeplink anchors to dropdown directive #1765, rebase it onto current main.
Smaller, lower-risk follow-up regardless of the above: document the existing :name: option in docs/syntax/dropdowns.md so authors can use the capability that already ships.
Related issues
Part of a dropdown cluster: #1261 (Dropdown improvements, open) and #1280 (Improve accordion ES|QL functions list, open) — both already ai-triaged. #1261 references this issue as related. Maintainers may want to plan a coherent dropdown UX pass across all three.
Notes
Mothballed fix: PR #1765 (CLOSED, not merged, 2026-02-11). Its branch origin/add-deeplink-anchors-dropdown still exists on the remote and could be rebased/reopened rather than rewritten from scratch.
Suggested follow-up issue (for a human to confirm): a doc-only task to document :name: for dropdowns, decoupled from the contentious anchor-UI decision.
ai-triagedIssue received an initial assessment through AI-powered current code and architecture checks.ai:eng-questionAI triage raised an architecture/engineering question.ai:ux-questionAI triage raised a UX / frontend question for a human to decide.closed-staleenhancementstale
Activity
KOTungseth commentedon May 14, 2026
@theletterf do we have a status on this?
theletterf commentedon May 16, 2026
Nope. PR was mothballed.
technige commentedon May 18, 2026
@theletterf can we move this out of "in progress"?
theletterf commentedon May 18, 2026
Indeed! Moved to Backlog.
cotti commentedon Jun 3, 2026
AI triage
Automated investigation against the current codebase. A human still needs to confirm before any code change.
Original concern
Authors/PMs want to deep-link to a specific
{dropdown}so a URL fragment scrolls to and expands that dropdown — i.e. custom anchors on dropdowns.Findings
src/Elastic.Markdown/Myst/Directives/Admonition/AdmonitionBlock.cs:41— the dropdown directive already reads a:name:option intoCrossReferenceName(DropdownBlockderives fromAdmonitionBlock, line 10).src/Elastic.Markdown/Myst/Directives/Dropdown/DropdownView.cshtml:3— that value is emitted as theidon the<details>element:<details class="dropdown ..." id="@Model.CrossReferenceName" ...>. So:::{dropdown} Title+:name: my-anchorrenders<details id="my-anchor">, andpage#my-anchoralready targets it. There is no auto-generated id when:name:is omitted.src/Elastic.Documentation.Site/Assets/open-details-with-anchor.ts:7-23— on navigation, ifwindow.location.hashresolves to an element whoseclosest('details')exists, it setsclosestDetails.open = trueand scrolls to it — but only for non-Chrome browsers (line 13); Chrome is assumed to handle this natively. Wired up on every page load viamain.ts:122(openDetailsWithAnchor()in thehtmx:loadhandler).docs/syntax/dropdowns.md(whole file) — documentsopenandapplies_tobut not:name:, so the existing anchor capability is effectively undiscoverable to writers.src/Elastic.Markdown/Myst/CodeBlocks/Code.cshtml:8renders a¶headerlink), the dropdown title has no visible/copyable anchor link, so even where an id exists there's no UI to grab the deep link.Verdict
Partially done
The underlying mechanism already exists: a dropdown with
:name:renders a stableid, and a frontend shim expands the<details>when you land on its fragment (non-Chrome; Chrome relied upon natively). What's missing is the user-visible polish that makes this a real feature::name:is undocumented, there's no auto-generated anchor, and there's no clickable/copyable anchor affordance on the dropdown title. The dedicated work for exactly this — PR #1765 ("Add deeplink anchors to dropdown directive", branchadd-deeplink-anchors-dropdown) — was closed unmerged on 2026-02-11 (the "mothballed PR" referenced in the thread); it turned the inherited:name:into a title anchor link and added docs, but deliberately omitted a visual indicator to avoid "polluting the design." That design tension is why this isn't a clean quick fix.Proposal
Open decisions, grouped by audience:
¶headerlink like headings/code blocks, a hover icon, or click-title-to-copy), or stay invisible as PR Add deeplink anchors to dropdown directive #1765 chose? This is the call that stalled Add deeplink anchors to dropdown directive #1765. Should the dropdown also auto-open + smooth-scroll consistently in Chrome (the shim currently skips Chrome)?:name:, and how to keep them stable/unique across edits. Confirm cross-browser open-on-hash behavior: the shim only fires for non-Chrome (open-details-with-anchor.ts:13) and assumes Chrome's native behavior — worth verifying against current Chrome plus find-in-page interplay. If reviving PR Add deeplink anchors to dropdown directive #1765, rebase it onto currentmain.Smaller, lower-risk follow-up regardless of the above: document the existing
:name:option indocs/syntax/dropdowns.mdso authors can use the capability that already ships.Related issues
Part of a dropdown cluster: #1261 (Dropdown improvements, open) and #1280 (Improve accordion ES|QL functions list, open) — both already
ai-triaged. #1261 references this issue as related. Maintainers may want to plan a coherent dropdown UX pass across all three.Notes
origin/add-deeplink-anchors-dropdownstill exists on the remote and could be rebased/reopened rather than rewritten from scratch.:name:for dropdowns, decoupled from the contentious anchor-UI decision.github-actions commentedon Sep 14, 2026
This issue is stale because it has been open 90 days with no activity. Remove the
stalelabel, or leave a comment, or this will be closed in 14 days.