Skip to content
Draft

wip #3440

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
fb0a82b
Image compression, Github action: Change frequency (HDS-5693) (#3433)
Dec 15, 2025
7380afc
chore: add deps
Dec 15, 2025
c1e94f2
chore: update copyright
Dec 15, 2025
f78f765
feat: convert docTrackEvent modifier to ts
Dec 15, 2025
1e54748
feat: convert event tracking service to ts
Dec 15, 2025
f553ab8
feat: convert DocBadge to gts
Dec 15, 2025
41808ee
feat: convert DocBanner to gts
Dec 15, 2025
e54651a
feat: convert DocCards components to gts
Dec 15, 2025
4bc6466
feat: convert DocColorCard component to gts
Dec 15, 2025
7500e58
feat: convert DocColorSwatch to gts
Dec 15, 2025
d8311bd
feat: convert DocContentHdsPrinciples to gts
Dec 15, 2025
885ff0d
feat: convert DocDoDont to gts
Dec 15, 2025
2e00f15
feat: convert DocWcagList to gts
Dec 15, 2025
9e33e34
feat: convert DynamicTemplateError to gts
Dec 15, 2025
13598f5
feat: convert DocLayout to gts
Dec 15, 2025
a690d3a
feat: convert DocLinkWithIcon to gts
Dec 15, 2025
0d7fa01
feat: convert DocFormSelectGroupType to gts
Dec 15, 2025
48644f4
feat: convert DocPageBanner to gts
Dec 15, 2025
2b9ea51
feat: convert DocPageCover to gts
Dec 15, 2025
b16f69b
feat: convert DocPageSidecar to gts
Dec 15, 2025
13057a0
feat: convert DocPageTabs to gts
Dec 15, 2025
3718fb8
feat: convert DocPageHeader to gts
Dec 15, 2025
7c2b684
feat: convert DocPageHeaderNavItem to gts
Dec 15, 2025
113ab17
feat: convert DocPlaceholder to gts
Dec 15, 2025
b9a183b
feat: convert DocScrollToTop to gts
Dec 15, 2025
ce375fb
feat: convert DocTokenPreview to gts
Dec 15, 2025
5e09b60
feat: convert DocTokensList components to gts
Dec 15, 2025
810aea2
feat: convert PowerSelect components to gts
Dec 15, 2025
a69667b
fix: few straggler issues
Dec 15, 2025
e418f44
fix: issue where task wasnt properly registered
Dec 15, 2025
354846b
fix: lint errors
Dec 16, 2025
0b72354
wip
Dec 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci-compress-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Compress Images
on:
workflow_dispatch:
schedule:
- cron: "00 23 * * 0"
- cron: "0 23 1 * *" # monthly: 23:00 UTC on day 1 of each month

env:
NODE_VERSION: "24.x"
Expand Down
13 changes: 13 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -21,34 +21,49 @@ export const TYPES = [
'outlined-inverted',
];

export default class DocBadgeComponent extends Component {
constructor() {
super(...arguments);
type BadgeType = (typeof TYPES)[number];

interface DocBadgeSignature {
Args: {
type?: BadgeType;
size?: 'large' | 'medium';
};
Blocks: {
default: [];
};
Element: HTMLDivElement;
}

export default class DocBadge extends Component<DocBadgeSignature> {
get type() {
const type = this.args.type ?? 'neutral';

assert(
`@type for "Doc::Badge" must be one of the following: ${TYPES.join(
', ',
)}; received: ${this.args.type}`,
TYPES.includes(this.args.type),
TYPES.includes(type),
);
}

get type() {
return this.args.type ?? 'neutral';
return type;
}

get size() {
return this.args.size ?? 'large';
}

get classNames() {
let classes = ['doc-badge'];
const classes = ['doc-badge'];

// add a class based on the @type argument
classes.push(`doc-badge--type-${this.type}`);

// add a class based on the @size argument
classes.push(`doc-badge--size-${this.size}`);

return classes.join(' ');
}

<template>
<div class={{this.classNames}} ...attributes>
{{yield}}
</div>
</template>
}
8 changes: 0 additions & 8 deletions website/app/components/doc/badge/index.hbs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@

import Component from '@glimmer/component';
import { assert } from '@ember/debug';
import type Owner from '@ember/owner';

import { HdsIcon } from '@hashicorp/design-system-components/components';
import type { HdsIconSignature } from '@hashicorp/design-system-components/components/hds/icon/index';

export const TYPES = [
'info',
Expand All @@ -16,9 +20,21 @@ export const TYPES = [
'callout',
];

export default class DocBannerComponent extends Component {
constructor() {
super(...arguments);
type BannerTypes = (typeof TYPES)[number];

interface DocBannerComponentSignature {
Args: {
type: BannerTypes;
};
Blocks: {
default: [];
};
Element: HTMLDivElement;
}

export default class DocBanner extends Component<DocBannerComponentSignature> {
constructor(owner: Owner, args: DocBannerComponentSignature['Args']) {
super(owner, args);
assert(
`@type for "Doc::Banner" must be one of the following: ${TYPES.join(
', ',
Expand All @@ -28,7 +44,7 @@ export default class DocBannerComponent extends Component {
}

get icon() {
let icon;
let icon: HdsIconSignature['Args']['name'] | undefined;
switch (this.args.type) {
case 'info':
case 'information':
Expand All @@ -53,11 +69,22 @@ export default class DocBannerComponent extends Component {
}

get classNames() {
let classes = ['doc-banner'];
const classes = ['doc-banner'];

// add a class based on the @type argument
classes.push(`doc-banner--type-${this.args.type}`);

return classes.join(' ');
}

<template>
<div class={{this.classNames}} ...attributes>
{{#if this.icon}}
<HdsIcon class="doc-banner__icon" @name={{this.icon}} @size="24" />
{{/if}}
<div class="doc-banner__content">
{{yield}}
</div>
</div>
</template>
}
11 changes: 0 additions & 11 deletions website/app/components/doc/banner/index.hbs

This file was deleted.

119 changes: 119 additions & 0 deletions website/app/components/doc/cards/card.gts
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
/**
* Copyright IBM Corp. 2021, 2025
* SPDX-License-Identifier: MPL-2.0
*/

import Component from '@glimmer/component';
import { LinkTo } from '@ember/routing';

import DocBadge from 'website/components/doc/badge';

interface Status {
deprecated?: boolean;
updated?: boolean;
added?: boolean;
}

export interface DocCardsCardSignature {
Args: {
image?: string;
title: string;
caption?: string;
status?: Status;
route?: string;
model?: unknown;
href?: string;
layout?: 'vertical' | 'horizontal';
};
Blocks: {
default: [];
};
Element: HTMLLIElement;
}

export default class DocCardsCard extends Component<DocCardsCardSignature> {
get classNames() {
const classes = ['doc-cards-card'];
const layout = this.args.layout ?? 'vertical';

// add a class based on the @layout argument, default = 'vertical'
classes.push(`doc-cards-card--layout-${layout}`);

return classes.join(' ');
}

<template>
<li class={{this.classNames}} ...attributes>
{{#if @route}}
<LinkTo
class="doc-cards-card__link"
@route={{@route}}
@model={{@model}}
>
<img
class="doc-cards-card__image"
src={{@image}}
alt=""
role="presentation"
/>
<div class="doc-cards-card__details">
<p class="doc-cards-card__title">{{@title}}</p>
{{#if @status.deprecated}}
<DocBadge
class="doc-cards-card__badge"
@type="warning-inverted"
@size="medium"
>Deprecated</DocBadge>
{{else if @status.updated}}
<DocBadge
class="doc-cards-card__badge"
@type="neutral-inverted"
@size="medium"
>Updated</DocBadge>
{{else if @status.added}}
<DocBadge
class="doc-cards-card__badge"
@type="information-inverted"
@size="medium"
>Added</DocBadge>
{{/if}}
<p class="doc-cards-card_description">{{@caption}}</p>
</div>
</LinkTo>
{{/if}}
{{#if @href}}
<a class="doc-cards-card__link" href={{@href}}>
<img
class="doc-cards-card__image"
src={{@image}}
alt=""
role="presentation"
/>
<div class="doc-cards-card__details">
<p class="doc-cards-card__title">{{@title}}</p>
{{#if @status.deprecated}}
<DocBadge
class="doc-cards-card__badge"
@type="warning-inverted"
@size="medium"
>Deprecated</DocBadge>
{{else if @status.updated}}
<DocBadge
class="doc-cards-card__badge"
@type="neutral-inverted"
@size="medium"
>Updated</DocBadge>
{{else if @status.added}}
<DocBadge
class="doc-cards-card__badge"
@type="information-inverted"
@size="medium"
>Added</DocBadge>
{{/if}}
<p class="doc-cards-card_description">{{@caption}}</p>
</div>
</a>
{{/if}}
</li>
</template>
}
39 changes: 0 additions & 39 deletions website/app/components/doc/cards/card.hbs

This file was deleted.

18 changes: 0 additions & 18 deletions website/app/components/doc/cards/card.js

This file was deleted.

Loading
Loading