Render accordion in integration readme#223916
Conversation
…n-integration-overview-page
…n-integration-overview-page
|
Pinging @elastic/security-scalability (Team:Security-Scalability) |
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/streams --include-path /api/fleet --include-path /api/dashboards --include-path /api/saved_objects/_import --include-path /api/saved_objects/_export --include-path /api/maintenance_window --update'
|
Pinging @elastic/fleet (Team:Fleet) |
elena-shostak
left a comment
There was a problem hiding this comment.
Dependency review - approved ✅
rehype-sanitize provides a granular control over sanitization of user-generated content and has good health score.
We don't have any other dependencies regarding sanitization, like DOMPurify or sanitize-html, so adopting rehype-sanitize is feasible.
|
@juliaElastic I have added a
|
…n-integration-overview-page
…n-integration-overview-page
…n-integration-overview-page
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
History
|
|
Starting backport for target branches: 8.19 |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
## Summary [Support collapsible section in Integration README](elastic/integration-experience#82) The public Integrations docs page recently added support for collapsible sections (e.g., for field tables and sample events). This PR brings the same functionality to Kibana to reduce scrolling and help users focus on the most relevant information. To display an accordion, the README should include the following markup: ``` <details> <summary>Click to expand</summary> This content is hidden by default. </details> ``` However, we do not want to modify the integration READMEs directly. Doing so would cause these tags to appear as raw HTML in older versions of Kibana Bumping the minimum supported Kibana version for each integration is also not a solution, as it would complicate backports and maintenance. #### Proposed solution Detect in Kibana parts that should be collapsible, like `exported fields` and update the markdown with the necessary markups. Similar to what the `integration-docs` does in elastic/integration-docs#342 #### Dependencies added: - `rehype-raw`: Parse and render HTML inside Markdown. - `rehype-sanitize`: Sanitize potentially unsafe HTML. #### Version pinning for compatibility - `rehype-sanitize@4.0.0`: Uses hast-util-sanitize@3+, which provides a built-in default schema and is compatible with CommonJS environments. - `rehype-raw@5.1.0`: The latest version that supports CommonJS. Later versions are ESM-only. https://github.com/user-attachments/assets/15f0822b-9b36-45e6-a47e-c8fa0dedd4c3 ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] 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 - [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 - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) ### Identify risks Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss. Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `8.19`: - [Render accordion in integration readme (#223916)](#223916) <!--- Backport version: 10.0.1 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Hanna Tamoudi","email":"hanna.tamoudi@elastic.co"},"sourceCommit":{"committedDate":"2025-06-24T11:22:55Z","message":"Render accordion in integration readme (#223916)\n\n## Summary\n\n[Support collapsible section in Integration\nREADME](https://github.com/elastic/integration-experience/issues/82)\nThe public Integrations docs page recently added support for collapsible\nsections (e.g., for field tables and sample events). This PR brings the\nsame functionality to Kibana to reduce scrolling and help users focus on\nthe most relevant information.\n\nTo display an accordion, the README should include the following markup:\n```\n<details>\n <summary>Click to expand</summary>\n This content is hidden by default.\n</details>\n```\nHowever, we do not want to modify the integration READMEs directly.\nDoing so would cause these tags to appear as raw HTML in older versions\nof Kibana\nBumping the minimum supported Kibana version for each integration is\nalso not a solution, as it would complicate backports and maintenance.\n\n#### Proposed solution\nDetect in Kibana parts that should be collapsible, like `exported\nfields` and update the markdown with the necessary markups. Similar to\nwhat the `integration-docs` does in\nhttps://github.com/elastic/integration-docs/issues/342\n\n\n#### Dependencies added:\n- `rehype-raw`: Parse and render HTML inside Markdown.\n- `rehype-sanitize`: Sanitize potentially unsafe HTML.\n\n#### Version pinning for compatibility\n- `rehype-sanitize@4.0.0`: Uses hast-util-sanitize@3+, which provides a\nbuilt-in default schema and is compatible with CommonJS environments.\n- `rehype-raw@5.1.0`: The latest version that supports CommonJS. Later\nversions are ESM-only.\n\n\n\nhttps://github.com/user-attachments/assets/15f0822b-9b36-45e6-a47e-c8fa0dedd4c3\n\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"869e162812a449742aad9ddd99f1acf838c278f1","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","enhancement","backport missing","Team:Fleet","Team:Security-Scalability","backport:version","v9.1.0","v8.19.0"],"title":"Render accordion in integration readme","number":223916,"url":"https://github.com/elastic/kibana/pull/223916","mergeCommit":{"message":"Render accordion in integration readme (#223916)\n\n## Summary\n\n[Support collapsible section in Integration\nREADME](https://github.com/elastic/integration-experience/issues/82)\nThe public Integrations docs page recently added support for collapsible\nsections (e.g., for field tables and sample events). This PR brings the\nsame functionality to Kibana to reduce scrolling and help users focus on\nthe most relevant information.\n\nTo display an accordion, the README should include the following markup:\n```\n<details>\n <summary>Click to expand</summary>\n This content is hidden by default.\n</details>\n```\nHowever, we do not want to modify the integration READMEs directly.\nDoing so would cause these tags to appear as raw HTML in older versions\nof Kibana\nBumping the minimum supported Kibana version for each integration is\nalso not a solution, as it would complicate backports and maintenance.\n\n#### Proposed solution\nDetect in Kibana parts that should be collapsible, like `exported\nfields` and update the markdown with the necessary markups. Similar to\nwhat the `integration-docs` does in\nhttps://github.com/elastic/integration-docs/issues/342\n\n\n#### Dependencies added:\n- `rehype-raw`: Parse and render HTML inside Markdown.\n- `rehype-sanitize`: Sanitize potentially unsafe HTML.\n\n#### Version pinning for compatibility\n- `rehype-sanitize@4.0.0`: Uses hast-util-sanitize@3+, which provides a\nbuilt-in default schema and is compatible with CommonJS environments.\n- `rehype-raw@5.1.0`: The latest version that supports CommonJS. Later\nversions are ESM-only.\n\n\n\nhttps://github.com/user-attachments/assets/15f0822b-9b36-45e6-a47e-c8fa0dedd4c3\n\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"869e162812a449742aad9ddd99f1acf838c278f1"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/223916","number":223916,"mergeCommit":{"message":"Render accordion in integration readme (#223916)\n\n## Summary\n\n[Support collapsible section in Integration\nREADME](https://github.com/elastic/integration-experience/issues/82)\nThe public Integrations docs page recently added support for collapsible\nsections (e.g., for field tables and sample events). This PR brings the\nsame functionality to Kibana to reduce scrolling and help users focus on\nthe most relevant information.\n\nTo display an accordion, the README should include the following markup:\n```\n<details>\n <summary>Click to expand</summary>\n This content is hidden by default.\n</details>\n```\nHowever, we do not want to modify the integration READMEs directly.\nDoing so would cause these tags to appear as raw HTML in older versions\nof Kibana\nBumping the minimum supported Kibana version for each integration is\nalso not a solution, as it would complicate backports and maintenance.\n\n#### Proposed solution\nDetect in Kibana parts that should be collapsible, like `exported\nfields` and update the markdown with the necessary markups. Similar to\nwhat the `integration-docs` does in\nhttps://github.com/elastic/integration-docs/issues/342\n\n\n#### Dependencies added:\n- `rehype-raw`: Parse and render HTML inside Markdown.\n- `rehype-sanitize`: Sanitize potentially unsafe HTML.\n\n#### Version pinning for compatibility\n- `rehype-sanitize@4.0.0`: Uses hast-util-sanitize@3+, which provides a\nbuilt-in default schema and is compatible with CommonJS environments.\n- `rehype-raw@5.1.0`: The latest version that supports CommonJS. Later\nversions are ESM-only.\n\n\n\nhttps://github.com/user-attachments/assets/15f0822b-9b36-45e6-a47e-c8fa0dedd4c3\n\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"869e162812a449742aad9ddd99f1acf838c278f1"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
## Summary Support for collapsible sections was [recently added](#223916) with functionality to collapse the exported fields table by default. This PR is a followup to that and also collapses the sample events by default as well. ## Screen recording https://github.com/user-attachments/assets/f51ea1f9-0b27-4ddb-a2ee-a994ae3bf380 Relates #223916 Addresses elastic/integration-experience#151
…8799) ## Summary Support for collapsible sections was [recently added](elastic#223916) with functionality to collapse the exported fields table by default. This PR is a followup to that and also collapses the sample events by default as well. ## Screen recording https://github.com/user-attachments/assets/f51ea1f9-0b27-4ddb-a2ee-a994ae3bf380 Relates elastic#223916 Addresses elastic/integration-experience#151
…8799) ## Summary Support for collapsible sections was [recently added](elastic#223916) with functionality to collapse the exported fields table by default. This PR is a followup to that and also collapses the sample events by default as well. ## Screen recording https://github.com/user-attachments/assets/f51ea1f9-0b27-4ddb-a2ee-a994ae3bf380 Relates elastic#223916 Addresses elastic/integration-experience#151

Summary
Support collapsible section in Integration README
The public Integrations docs page recently added support for collapsible sections (e.g., for field tables and sample events). This PR brings the same functionality to Kibana to reduce scrolling and help users focus on the most relevant information.
To display an accordion, the README should include the following markup:
However, we do not want to modify the integration READMEs directly. Doing so would cause these tags to appear as raw HTML in older versions of Kibana
Bumping the minimum supported Kibana version for each integration is also not a solution, as it would complicate backports and maintenance.
Proposed solution
Detect in Kibana parts that should be collapsible, like
exported fieldsand update the markdown with the necessary markups. Similar to what theintegration-docsdoes in https://github.com/elastic/integration-docs/issues/342Dependencies added:
rehype-raw: Parse and render HTML inside Markdown.rehype-sanitize: Sanitize potentially unsafe HTML.Version pinning for compatibility
rehype-sanitize@4.0.0: Uses hast-util-sanitize@3+, which provides a built-in default schema and is compatible with CommonJS environments.rehype-raw@5.1.0: The latest version that supports CommonJS. Later versions are ESM-only.collapse.mov
Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:breakinglabel should be applied in these situations.release_note:*label is applied per the guidelinesIdentify risks
Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss.
Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging.