Skip to content

docs: add custom panels for dashboards (#7627) - #8169

Open
florent-leborgne wants to merge 42 commits into
mainfrom
docs-issue-7627-custom-panels
Open

docs: add custom panels for dashboards (#7627)#8169
florent-leborgne wants to merge 42 commits into
mainfrom
docs-issue-7627-custom-panels

Conversation

@florent-leborgne

@florent-leborgne florent-leborgne commented Sep 2, 2026

Copy link
Copy Markdown
Member

Summary

This PR addresses #7627 with the following changes:

  • explore-analyze/visualize/custom-panels.md (new, type: how-to): documents the custom panel type. Covers when to use it, how the template and optional ES|QL query work, creation from the dashboard or from an Agent Builder conversation (one Create a custom panel section with two starting points), editing in the flyout, chat refinement with version cards, Liquid template syntax with a short sample, the theme CSS properties, dashboard interactions, the time filter connection with ?_tstart and ?_tend, and limitations.
  • explore-analyze/visualize/custom-panel-examples.md (new, child page): five complete examples, each with a screenshot followed by Prompt (when generated with chat), Query, and Template dropdowns. Sankey diagram and logo banner generated with Agent Builder chat, plus a hand-written multi-metric card with CSS-only tabs, a narrative summary, and a status board.
  • explore-analyze/images/custom-panels-*.png (9 new): the Sample Logs Ops Center dashboard built from custom panels (intro), the Add to dashboard flyout with Custom highlighted, the Create custom panel flyout, a chat-created Sankey next to its conversation, and one screenshot per example. All captured on a main build on 2 September 2026 with the templates as published.
  • explore-analyze/visualize.md: adds a Custom panels row to the panel types table, tagged stack: preview 9.6+ and serverless: preview.
  • explore-analyze/ai-features/agent-builder/agent-builder-dashboards-and-visualizations.md: adds a Custom panels row to Supported panel types with a reciprocal link to the new page.
  • explore-analyze/dashboards/create-dashboards-using-ai.md: adds a tagged paragraph stating that agents can also create custom panels.
  • explore-analyze/toc.yml: registers the new page after the Vega page, with the examples page as its child.

All UI labels were verified against Kibana origin/main on 2 September 2026 and updated for the copy changes merged in elastic/kibana#288823 on 3 September 2026 (Edit Custom panel configuration, Custom panel attachment) (i18n defaultMessage strings in x-pack/platform/plugins/shared/custom_content). Behavior claims trace to the plugin README, fetch_esql_data.ts, fill_template.ts, prepare_html.ts, edit_custom_content_flyout.tsx, handle_panel_preview.ts, and the agent_builder_dashboards generation guidance. The export-portability claim for inline SVG relies on the existing image panels page and the file saved object being non-exportable.

A live test pass on a main build (2 September 2026) covered the Add menu path, the edit flyout, chat creation and refinement including version cards, dashboard interactions, the limitations list, and every example on the examples page. Findings that changed the text: the edit action is a hover action rather than a panel menu entry, the time filter hint depends on ?_tstart/?_tend first and @timestamp second, an invalid query or template shows Failed to render panel, a missing template column renders empty or 0, the newest version card's Preview is a no-op by design, and CSS-only tabs with hidden radio inputs work inside a panel.

Hold until product confirms

Documented as if fully live, per the docs owner's decision. Not true on main yet:

  • The AddCustom entry is hidden behind dashboard.customContent.enabled (default false) since [Custom content] Temporarily hide from the UI kibana#287768. The "Start from the dashboard" procedure and the Add row descriptions assume it is visible again. Do not merge before the Presentation team re-enables it or confirms the final entry point.

Reviewer-check items

  • The theme table lists the nine --cc-color-* properties injected at HEAD. Draft [Custom content] Applies basic eui styling, improves guidelines kibana#287778 adds more (spacing, font, radius). Extend the table if that PR merges before release.
  • The Vega page lists Sankey charts as a Vega use case. The custom panels pages say Sankey diagrams are complex to build as Vega visualizations and offer a custom panel as an alternative. Confirm the wording is acceptable to the Visualizations team.
  • The two generated examples (Sankey, banner) are published verbatim as the agent produced them after refinement, including hard-coded colors in the banner. The page says why. The Sankey template is 339 lines and sits in a dropdown. The banner's single-line SVG path was wrapped at 120 characters because docs-builder's callout regex times out on very long code lines.
  • All screenshots use the dark theme. Say so if you'd rather have them in the light theme.

Resolves

Closes #7627

Generative AI disclosure

  1. Did you use a generative AI (GenAI) tool to assist in creating this contribution?
  • Yes
  • No

Tool(s) and model(s) used: Claude Code, Claude Fable 5.1. Two example templates were generated by Elastic Agent Builder (Claude Opus 4.8) during testing.


AI-generated draft created with Claude Code (Claude Fable 5.1).
Review all generated content for factual accuracy before merging.

florent-leborgne and others added 2 commits September 2, 2026 12:40
Add a page for the new custom panel type (HTML, CSS, and Liquid template
with an optional ES|QL query), link it from the panel types table and the
Agent Builder dashboard pages, and register it in the TOC.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…7627)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Elastic Docs AI PR menu

Check the box to run an AI review for this pull request.

Powered by GitHub Agentic Workflows and docs-actions. For more information, reach out to the docs team.

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Elastic Docs Style Checker (Vale)

Summary: 1 warning found

⚠️ Warnings (1): Fix when the suggestion improves clarity or correctness.
File Line Rule Message
explore-analyze/visualize/custom-panels.md 37 Elastic.Spelling 'Gantt' is a possible misspelling.

The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…7627)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
florent-leborgne and others added 3 commits September 2, 2026 17:38
…#7627)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…te (#7627)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…rsions (#7627)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
florent-leborgne and others added 3 commits September 2, 2026 22:15
)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Create custom panel flyout, a chat-created Sankey panel, and the top of a
themed dashboard built from custom panels.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…op (#7627)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Comment thread explore-analyze/visualize/custom-panels.md Outdated
Comment thread explore-analyze/visualize/custom-panels.md Outdated
Comment thread explore-analyze/visualize/custom-panels.md Outdated
Comment thread explore-analyze/visualize/custom-panels.md Outdated
Comment thread explore-analyze/visualize/custom-panels.md Outdated
florent-leborgne and others added 3 commits September 3, 2026 15:06
Co-authored-by: Florent LB <florent.leborgne@elastic.co>
…create steps (#7627)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
florent-leborgne and others added 3 commits September 3, 2026 15:22
…eps (#7627)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Use the Sample Logs Ops Center dashboard, as agreed in review.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…7627)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs review summary

Focus areas

  • Style and clarity: two Vale-flagged wording issues addressed inline (maycan/might, In additionalso). The new pages (custom-panels.md, custom-panel-examples.md) read clearly, use active voice/second person, and follow UI-writing conventions (bold UI labels, Select/In the field, enter phrasing, arrow menu paths).
  • Jargon: no unexplained Elastic-internal jargon found in the changed prose. Terms like ES|QL, Fast mode, and Liquid are linked or defined on first use.
  • Frontmatter and applies_to: both new pages have description, applies_to, and products set correctly; applies_to syntax (stack: preview 9.6+, serverless: preview) matches the pattern used elsewhere in the repo (e.g., 9.5+). No issues found.
  • Content type fit: custom-panels.md is declared and structured as a how-to (requirements, numbered creation/edit procedures, limitations). custom-panel-examples.md is a reference-style examples page without a type, consistent with sibling pages like transform-examples.md and ml-nlp-examples.md, so not flagged.
  • Contradictions: No contradictions found. The claim that Sankey diagrams are complex to build in Vega is consistent with the published Vega/Vega-Lite page, which already lists Sankey charts among unsupported Vega use cases.
  • Parent issue satisfaction: Satisfied for the docs scope described in the PR body (new how-to page, examples page, cross-links from the agent-builder and dashboards-with-AI pages, and a new panel-types table row). Note the PR itself flags two "hold until product confirms" items (the Add → Custom entry point being behind a currently-disabled flag, and a pending Kibana label-rename PR) — these are product-side blockers the author already called out, not a docs gap.

Notes

  • One inline comment (visualize.md line 41, "In addition") falls in the SLO Alerts row, which the PR diff didn't touch — flagged only because it was in the pre-fetched Vale output; feel free to disregard if out of scope for this PR.
  • Did not independently re-verify the live-UI behavior claims (hover-to-edit action, Failed to render panel error text, time-filter hint) against a running Kibana build; the PR body documents these as verified against origin/main and a live test pass, which is the expected level of rigor for this change.

Generated by Docs review agent for #8169 · copilot · sonnet50 · 119.6 AIC · ⌖ 25.8 AIC · ⊞ 18.1K

Comments that could not be inline-anchored

explore-analyze/ai-features/agent-builder/agent-builder-dashboards-and-visualizations.md:22
For best results with {{esql}}-heavy dashboard generation, use a higher-tier model such as Claude 4.6 Opus. Current testing shows that Claude 4.6 Sonnet can require more corrections for generated dashboard queries.

Vale flags may here (Elastic.WordChoice). Use can/might instead of may, since may isn't a UI term in this sentence.

explore-analyze/visualize.md:41

Vale flags "In addition" here (Elastic.Wordiness). Replace with "also" for a more minimalist, direct phrasing per the voice-and-tone guide.

@leemthompo leemthompo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve the developer documentation component of this pull request, which is quite minimal

@vishaangelova vishaangelova left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! A couple of nits maybe.

Comment thread explore-analyze/visualize/custom-panel-examples.md Outdated
Comment thread explore-analyze/visualize/custom-panel-examples.md Outdated
Comment thread explore-analyze/visualize/custom-panels.md Outdated
Comment thread explore-analyze/visualize/custom-panels.md Outdated
Comment thread explore-analyze/visualize/custom-panels.md Outdated
Comment thread explore-analyze/visualize/custom-panels.md Outdated
Comment thread explore-analyze/visualize/custom-panels.md Outdated
Comment thread explore-analyze/visualize/custom-panels.md Outdated
Co-authored-by: Visha Angelova <91186315+vishaangelova@users.noreply.github.com>
Co-authored-by: Florent LB <florent.leborgne@elastic.co>
florent-leborgne added a commit to elastic/kibana that referenced this pull request Sep 3, 2026
## Summary

@stratoula some small suggestions after a quick pass on the feature,
feel free to take or leave them :)

Copy-only changes to the custom panel (custom content) UI strings, found
while writing the user docs in elastic/docs-content#8169 and testing the
feature on `main`. No behavior change.

| String | Before | After | Why |
| --- | --- | --- | --- |
| Panel type display name
(`xpack.customContent.embeddable.typeDisplayName`) | Custom content |
Custom panel | Product name is "Custom panel" (flyout titles already say
**Create custom panel** / **Edit custom panel**). The hover action
becomes **Edit Custom panel configuration**. |
| Chat attachment label
(`xpack.customContent.agentRefine.contextAttachmentLabel`) | Custom
content panel | Custom panel | Same name everywhere. |
| Rendered panel iframe title (`xpack.customContent.iframeTitle`) |
Custom content panel | Custom panel | Same name everywhere; this is what
screen readers announce for the panel. |
| Server embeddable definition title (`server/plugin.ts`) | Custom
content | Custom panel | Panel type title in the Dashboards API schema.
|
| ES\|QL hint
(`xpack.customContent.editFlyout.esqlSection.timePickerHint`) | To
connect to the dashboard time picker, add a WHERE clause with named time
parameters. | To connect the query to the dashboard time filter, add a
WHERE clause with the named time parameters. | Kibana docs and most of
the UI say "time filter". |
| Template help text (`xpack.customContent.editFlyout.templateHelpText`)
| Liquid template filled with ES\|QL results. Each column is an object —
use row["col"].value for the raw value and row["col"].pct for its share
of the column maximum (0–100, useful for bar widths). | HTML and CSS,
with Liquid tags to insert ES\|QL results. For each row,
row["column"].value is the value and row["column"].pct is its percentage
of the column's highest value, useful for bar widths. | Leads with HTML
and CSS so a template without a query is clearly fine, drops "object"
and "raw", and says what .pct is in plain words. Same length. |
| Template placeholder
(`xpack.customContent.editFlyout.templatePlaceholderAi`) | …or use
"Generate with chat" above. | …or select Generate with chat. | Drop the
directional word, which fails accessibility guidance. |
| Empty state (`xpack.customContent.noContent.bodyNoAi`) | Use HTML,
CSS, Liquid and ES\|QL… | Use HTML, CSS, Liquid, and ES\|QL… | Serial
comma. |

The **Add** panel menu entry stays **Custom**, since the flyout is
already titled "Add panel". i18n keys are unchanged. The internal
`custom_content` type, `customContent` plugin id, and agent-facing
strings (`formatPanelContext`, `getAgentDescription`) are left as they
are.

### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials: user docs
are in elastic/docs-content#8169 and will be aligned with the final
strings.
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios: two unit tests
that assert the attachment label and the empty-state text are updated.
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/docs/extend/kibana/contributing/workflow/how-we-use-github#release-notes):
`release_note:skip`, the feature is unreleased.

### Identify risks

None. String changes only, i18n keys unchanged.

---

> Drafted with Claude Code (Claude Fable 5.1) from the docs review;
strings verified against `main` on 3 September 2026.

---------

Co-authored-by: Stratou <efstratia.kalafateli@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Follows elastic/kibana#288823.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
juliaElastic pushed a commit to juliaElastic/kibana that referenced this pull request Sep 4, 2026
## Summary

@stratoula some small suggestions after a quick pass on the feature,
feel free to take or leave them :)

Copy-only changes to the custom panel (custom content) UI strings, found
while writing the user docs in elastic/docs-content#8169 and testing the
feature on `main`. No behavior change.

| String | Before | After | Why |
| --- | --- | --- | --- |
| Panel type display name
(`xpack.customContent.embeddable.typeDisplayName`) | Custom content |
Custom panel | Product name is "Custom panel" (flyout titles already say
**Create custom panel** / **Edit custom panel**). The hover action
becomes **Edit Custom panel configuration**. |
| Chat attachment label
(`xpack.customContent.agentRefine.contextAttachmentLabel`) | Custom
content panel | Custom panel | Same name everywhere. |
| Rendered panel iframe title (`xpack.customContent.iframeTitle`) |
Custom content panel | Custom panel | Same name everywhere; this is what
screen readers announce for the panel. |
| Server embeddable definition title (`server/plugin.ts`) | Custom
content | Custom panel | Panel type title in the Dashboards API schema.
|
| ES\|QL hint
(`xpack.customContent.editFlyout.esqlSection.timePickerHint`) | To
connect to the dashboard time picker, add a WHERE clause with named time
parameters. | To connect the query to the dashboard time filter, add a
WHERE clause with the named time parameters. | Kibana docs and most of
the UI say "time filter". |
| Template help text (`xpack.customContent.editFlyout.templateHelpText`)
| Liquid template filled with ES\|QL results. Each column is an object —
use row["col"].value for the raw value and row["col"].pct for its share
of the column maximum (0–100, useful for bar widths). | HTML and CSS,
with Liquid tags to insert ES\|QL results. For each row,
row["column"].value is the value and row["column"].pct is its percentage
of the column's highest value, useful for bar widths. | Leads with HTML
and CSS so a template without a query is clearly fine, drops "object"
and "raw", and says what .pct is in plain words. Same length. |
| Template placeholder
(`xpack.customContent.editFlyout.templatePlaceholderAi`) | …or use
"Generate with chat" above. | …or select Generate with chat. | Drop the
directional word, which fails accessibility guidance. |
| Empty state (`xpack.customContent.noContent.bodyNoAi`) | Use HTML,
CSS, Liquid and ES\|QL… | Use HTML, CSS, Liquid, and ES\|QL… | Serial
comma. |

The **Add** panel menu entry stays **Custom**, since the flyout is
already titled "Add panel". i18n keys are unchanged. The internal
`custom_content` type, `customContent` plugin id, and agent-facing
strings (`formatPanelContext`, `getAgentDescription`) are left as they
are.

### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials: user docs
are in elastic/docs-content#8169 and will be aligned with the final
strings.
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios: two unit tests
that assert the attachment label and the empty-state text are updated.
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/docs/extend/kibana/contributing/workflow/how-we-use-github#release-notes):
`release_note:skip`, the feature is unreleased.

### Identify risks

None. String changes only, i18n keys unchanged.

---

> Drafted with Claude Code (Claude Fable 5.1) from the docs review;
strings verified against `main` on 3 September 2026.

---------

Co-authored-by: Stratou <efstratia.kalafateli@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New dashboard panel type: AI-generated "Custom panel"

5 participants