Skip to content

Commit 93c12af

Browse files
author
shleewhite
committed
chore: update showcase examples
1 parent 9d7f390 commit 93c12af

File tree

4 files changed

+86
-99
lines changed

4 files changed

+86
-99
lines changed

showcase/app/components/mock/app/main/generic-advanced-table.gts

Lines changed: 81 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -519,95 +519,93 @@ export default class MockAppMainGenericAdvancedTable extends Component<MockAppMa
519519
}
520520

521521
<template>
522-
<div class="mock-app-main-generic-advanced-table-wrapper">
523-
<HdsAdvancedTable
524-
@columns={{this.demoColumns}}
525-
@model={{this.demoModel}}
526-
@hasStickyHeader={{true}}
527-
@isSelectable={{true}}
528-
@isStriped={{true}}
529-
@onSelectionChange={{this.onSelectionChange}}
530-
@hasStickyFirstColumn={{true}}
531-
>
532-
<:body as |B|>
533-
{{! @glint-expect-error }}
534-
<B.Tr @selectionKey={{get B.data "name"}}>
535-
<B.Th>
536-
<HdsLinkInline @href="www.google.com">
537-
{{! @glint-expect-error }}
538-
{{get B.data "name"}}
539-
</HdsLinkInline>
540-
</B.Th>
541-
<B.Td>
542-
<HdsLinkInline @href="www.google.com">
543-
{{! @glint-expect-error }}
544-
{{get B.data "project-name"}}
545-
</HdsLinkInline>
546-
</B.Td>
547-
<B.Td>
548-
<HdsLinkInline @href="www.google.com">
549-
{{! @glint-expect-error }}
550-
{{get B.data "current-run-id"}}
551-
</HdsLinkInline>
552-
</B.Td>
553-
<B.Td>
554-
<HdsBadge
555-
@type="outlined"
556-
{{! @glint-expect-error }}
557-
@text={{get B.data "run-status"}}
558-
{{! @glint-expect-error }}
559-
@color={{get B.data "run-status-color"}}
560-
/>
561-
</B.Td>
562-
<B.Td>
522+
<HdsAdvancedTable
523+
@columns={{this.demoColumns}}
524+
@model={{this.demoModel}}
525+
@maxHeight="600px"
526+
@isSelectable={{true}}
527+
@isStriped={{true}}
528+
@onSelectionChange={{this.onSelectionChange}}
529+
@hasStickyFirstColumn={{true}}
530+
>
531+
<:body as |B|>
532+
{{! @glint-expect-error }}
533+
<B.Tr @selectionKey={{get B.data "name"}}>
534+
<B.Th>
535+
<HdsLinkInline @href="www.google.com">
563536
{{! @glint-expect-error }}
564-
{{get B.data "current-run-applied"}}
565-
</B.Td>
566-
<B.Td>
537+
{{get B.data "name"}}
538+
</HdsLinkInline>
539+
</B.Th>
540+
<B.Td>
541+
<HdsLinkInline @href="www.google.com">
567542
{{! @glint-expect-error }}
568-
{{get B.data "vcs-repo"}}
569-
</B.Td>
570-
<B.Td>
571-
<HdsLinkInline @href="www.google.com">
572-
{{! @glint-expect-error }}
573-
{{get B.data "module-count"}}
574-
</HdsLinkInline>
575-
</B.Td>
576-
<B.Td>
543+
{{get B.data "project-name"}}
544+
</HdsLinkInline>
545+
</B.Td>
546+
<B.Td>
547+
<HdsLinkInline @href="www.google.com">
577548
{{! @glint-expect-error }}
578-
{{get B.data "modules"}}
579-
</B.Td>
580-
<B.Td>
581-
<HdsLinkInline @href="www.google.com">
582-
{{! @glint-expect-error }}
583-
{{get B.data "provider-count"}}
584-
</HdsLinkInline>
585-
</B.Td>
586-
<B.Td>
549+
{{get B.data "current-run-id"}}
550+
</HdsLinkInline>
551+
</B.Td>
552+
<B.Td>
553+
<HdsBadge
554+
@type="outlined"
587555
{{! @glint-expect-error }}
588-
{{get B.data "providers"}}
589-
</B.Td>
590-
<B.Td>
556+
@text={{get B.data "run-status"}}
591557
{{! @glint-expect-error }}
592-
{{get B.data "terraform-version"}}
593-
</B.Td>
594-
<B.Td>
595-
<HdsLinkInline @href="www.google.com">
596-
{{! @glint-expect-error }}
597-
{{get B.data "state-terraform-version"}}
598-
</HdsLinkInline>
599-
</B.Td>
600-
<B.Td>
558+
@color={{get B.data "run-status-color"}}
559+
/>
560+
</B.Td>
561+
<B.Td>
562+
{{! @glint-expect-error }}
563+
{{get B.data "current-run-applied"}}
564+
</B.Td>
565+
<B.Td>
566+
{{! @glint-expect-error }}
567+
{{get B.data "vcs-repo"}}
568+
</B.Td>
569+
<B.Td>
570+
<HdsLinkInline @href="www.google.com">
601571
{{! @glint-expect-error }}
602-
{{get B.data "created"}}
603-
</B.Td>
604-
<B.Td>
572+
{{get B.data "module-count"}}
573+
</HdsLinkInline>
574+
</B.Td>
575+
<B.Td>
576+
{{! @glint-expect-error }}
577+
{{get B.data "modules"}}
578+
</B.Td>
579+
<B.Td>
580+
<HdsLinkInline @href="www.google.com">
605581
{{! @glint-expect-error }}
606-
{{get B.data "updated"}}
607-
</B.Td>
608-
</B.Tr>
609-
</:body>
610-
</HdsAdvancedTable>
611-
</div>
582+
{{get B.data "provider-count"}}
583+
</HdsLinkInline>
584+
</B.Td>
585+
<B.Td>
586+
{{! @glint-expect-error }}
587+
{{get B.data "providers"}}
588+
</B.Td>
589+
<B.Td>
590+
{{! @glint-expect-error }}
591+
{{get B.data "terraform-version"}}
592+
</B.Td>
593+
<B.Td>
594+
<HdsLinkInline @href="www.google.com">
595+
{{! @glint-expect-error }}
596+
{{get B.data "state-terraform-version"}}
597+
</HdsLinkInline>
598+
</B.Td>
599+
<B.Td>
600+
{{! @glint-expect-error }}
601+
{{get B.data "created"}}
602+
</B.Td>
603+
<B.Td>
604+
{{! @glint-expect-error }}
605+
{{get B.data "updated"}}
606+
</B.Td>
607+
</B.Tr>
608+
</:body>
609+
</HdsAdvancedTable>
612610
</template>
613611
}

showcase/app/styles/mock-components/app.scss

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,3 @@
4242
gap: 12px;
4343
margin-bottom: 12px;
4444
}
45-
46-
.mock-app-main-generic-advanced-table-wrapper {
47-
// TODO remove after https://hashicorp.atlassian.net/browse/HDS-4751 is done
48-
display: grid;
49-
height: 600px;
50-
overflow: auto;
51-
}

showcase/app/styles/showcase-pages/advanced-table.scss

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,13 @@ body.components-advanced-table {
2222
.shw-component-advanced-table-cell-content-div {
2323
display: flex;
2424
align-items: center;
25-
25+
2626
.hds-icon {
2727
flex: none;
2828
margin-right: 5px;
2929
}
3030
}
3131

32-
.shw-component-advanced-table-fixed-height-wrapper {
33-
height: 400px;
34-
}
35-
3632
.shw-component-advanced-table-fixed-width-wrapper {
3733
width: 400px;
3834
}
@@ -77,4 +73,4 @@ body.components-advanced-table {
7773
animation: shw-component-table-user-bounce 1s infinite ease-in-out;
7874
}
7975

80-
}
76+
}

showcase/app/templates/components/advanced-table.hbs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@
174174
(hash key="email" label="Email")
175175
(hash key="role" label="Role")
176176
}}
177-
@hasStickyHeader={{true}}
177+
@maxHeight="400px"
178178
@isStriped={{true}}
179179
>
180180
<:body as |B|>
@@ -250,7 +250,7 @@
250250

251251
<Shw::Text::H2>Sticky header and sticky column</Shw::Text::H2>
252252

253-
<div class="shw-component-advanced-table-fixed-dimensions-wrapper">
253+
<div class="shw-component-advanced-table-fixed-width-wrapper">
254254
<Hds::AdvancedTable
255255
@isSelectable={{true}}
256256
@onSelectionChange={{this.onMultiSelectUsersSelectionChange__demo3}}
@@ -261,7 +261,7 @@
261261
(hash key="email" label="Email")
262262
(hash key="role" label="Role")
263263
}}
264-
@hasStickyHeader={{true}}
264+
@maxHeight="400px"
265265
@hasStickyFirstColumn={{true}}
266266
@isStriped={{true}}
267267
>

0 commit comments

Comments
 (0)