From 6559d995a6fa6b7d517ec84a2f0aa7a93428e8c0 Mon Sep 17 00:00:00 2001 From: Kristin Bradley Date: Tue, 23 Jun 2026 10:11:42 -0700 Subject: [PATCH 1/2] HDS-6287 Update Alert web docs for Generic content blocks --- .../code-snippets/alert-generic.classic.hbs | 11 +++-- .../code-snippets/alert-generic.classic.js | 9 ++++ .../code/code-snippets/alert-generic.gts | 43 +++++++++++++------ .../alert/partials/code/component-api.md | 20 +++++++-- .../alert/partials/code/how-to-use.md | 2 +- 5 files changed, 66 insertions(+), 19 deletions(-) create mode 100644 website/docs/components/alert/partials/code/code-snippets/alert-generic.classic.js diff --git a/website/docs/components/alert/partials/code/code-snippets/alert-generic.classic.hbs b/website/docs/components/alert/partials/code/code-snippets/alert-generic.classic.hbs index f5f407d2410..5268172b546 100644 --- a/website/docs/components/alert/partials/code/code-snippets/alert-generic.classic.hbs +++ b/website/docs/components/alert/partials/code/code-snippets/alert-generic.classic.hbs @@ -1,7 +1,12 @@ Title here Description here - - [your content here] - + + [your custom content here] + + + + + [your custom footer here] + \ No newline at end of file diff --git a/website/docs/components/alert/partials/code/code-snippets/alert-generic.classic.js b/website/docs/components/alert/partials/code/code-snippets/alert-generic.classic.js new file mode 100644 index 00000000000..cb28d0d6af5 --- /dev/null +++ b/website/docs/components/alert/partials/code/code-snippets/alert-generic.classic.js @@ -0,0 +1,9 @@ +import Component from '@glimmer/component'; +import { action } from '@ember/object'; + +export default class LocalComponent extends Component { + @action + yourOnClickFunction() { + console.log('Clicked the button in the "alert"!'); + } +} diff --git a/website/docs/components/alert/partials/code/code-snippets/alert-generic.gts b/website/docs/components/alert/partials/code/code-snippets/alert-generic.gts index 87cfe9dcfa1..69488ba31c9 100644 --- a/website/docs/components/alert/partials/code/code-snippets/alert-generic.gts +++ b/website/docs/components/alert/partials/code/code-snippets/alert-generic.gts @@ -1,15 +1,34 @@ -import type { TemplateOnlyComponent } from '@ember/component/template-only'; +import Component from '@glimmer/component'; +import { on } from '@ember/modifier'; import { HdsAlert } from '@hashicorp/design-system-components/components'; -const LocalComponent: TemplateOnlyComponent = ; - -export default LocalComponent; +export default class LocalComponent extends Component { + yourOnClickFunction = () => { + console.log('Clicked the button in the "alert"!'); + }; + +} diff --git a/website/docs/components/alert/partials/code/component-api.md b/website/docs/components/alert/partials/code/component-api.md index 029c67de704..86d08a00759 100644 --- a/website/docs/components/alert/partials/code/component-api.md +++ b/website/docs/components/alert/partials/code/component-api.md @@ -15,7 +15,10 @@ `Link::Standalone` yielded as contextual component (see below). - + + A generic container yielded as contextual component (see below). + + A generic container yielded as contextual component (see below). @@ -88,9 +91,20 @@ The `Link::Standalone` component, yielded as contextual component inside the `"a -#### [A].Generic +#### [A].GenericContent + +A generic container, yielded as contextual component which renders below the Title and Description and above any Actions. + + + + Elements passed as children are yielded after all the other elements. +
The content is unstyled by default, so consumers will need to take care of layout and style of the content. +
+
+ +#### [A].GenericFooter -A generic container, yielded as contextual component. +A generic container, yielded as contextual component which at the bottom of Alert content and below any Actions. diff --git a/website/docs/components/alert/partials/code/how-to-use.md b/website/docs/components/alert/partials/code/how-to-use.md index 4cff480b8c3..d526bce687e 100644 --- a/website/docs/components/alert/partials/code/how-to-use.md +++ b/website/docs/components/alert/partials/code/how-to-use.md @@ -78,6 +78,6 @@ You can pass more than one `D.Description` contextual component to have multiple ### Generic content -Use the `Generic` contextual component to insert custom content. Generic content will appear after the title, description, and actions. Application teams will need to implement spacing, layout, and styling for generic content. +Use the `GenericContent` and `GenericFooter` contextual components to insert custom content. Generic Content will appear after the Title and Description and above the Actions while the Generic Footer will appear at the bottom of the Alert content below the actions. Application teams will need to implement spacing, layout, and styling for generic content. [[code-snippets/alert-generic]] From 028de0ea8c67d6062e3e9b0aa0ce55af24a116d5 Mon Sep 17 00:00:00 2001 From: Kristin Bradley Date: Tue, 30 Jun 2026 09:42:57 -0700 Subject: [PATCH 2/2] HDS-6287 Un-delete API docs for Generic block and set it to deprecated --- website/docs/components/alert/partials/code/component-api.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/website/docs/components/alert/partials/code/component-api.md b/website/docs/components/alert/partials/code/component-api.md index 86d08a00759..061a16e92a1 100644 --- a/website/docs/components/alert/partials/code/component-api.md +++ b/website/docs/components/alert/partials/code/component-api.md @@ -15,6 +15,9 @@ `Link::Standalone` yielded as contextual component (see below). + + A generic container yielded as contextual component (see below). + A generic container yielded as contextual component (see below).