Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
1365ded
feat: Modify interfaces
NathanZlion Feb 19, 2026
9729e22
feat: Add Test Pages
NathanZlion Feb 19, 2026
646b48d
feat: Add column grouping util functions to create tree
NathanZlion Feb 19, 2026
791d85b
chore: Update snapshots
NathanZlion Feb 21, 2026
1dcf9f5
chore: Add colSpan, rowSpan, and scope to th-element
NathanZlion Feb 23, 2026
6fe44df
fix: Add SimplePage for test page
NathanZlion Feb 23, 2026
b376653
fix: Fix Axe violation for heading one availability, and AriaLabel vi…
NathanZlion Feb 23, 2026
35f3a2c
chore: Add fields for first and last for sticky
NathanZlion Feb 25, 2026
0ffe437
feat: Add column grouping support with nested headers, colspan/rowspa…
NathanZlion Feb 25, 2026
512fc79
fix: Fix failing unit tests for row count and single row render condi…
NathanZlion Feb 26, 2026
f8c56da
fix: Address some A11Y and codecov issues
NathanZlion Feb 26, 2026
ea026fb
feat: Add empty cells to push column down
NathanZlion Feb 26, 2026
e75812c
fix: Unit tests pass
NathanZlion Feb 26, 2026
6d7d8d2
chore: Make page easy to test
NathanZlion Feb 26, 2026
5a4db7e
feat: Implement Collection Preference for hierarchical lists
NathanZlion Feb 26, 2026
f97e430
fix: Ensure collection preference works for multi-depth
NathanZlion Feb 26, 2026
43bfcbd
test
NathanZlion Mar 3, 2026
508f8b9
chore: Minor design updates
NathanZlion Mar 6, 2026
f620cc4
chore: Add playground style controls and customer pages for demo
NathanZlion Mar 6, 2026
0786d89
chore: Minor changes to focus cell
NathanZlion Mar 6, 2026
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
101 changes: 22 additions & 79 deletions package-lock.json

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

70 changes: 70 additions & 0 deletions pages/collection-preferences/multi-level-reorder.page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
import React from 'react';

import CollectionPreferences, { CollectionPreferencesProps } from '~components/collection-preferences';

import { contentDisplayPreferenceI18nStrings } from '../common/i18n-strings';
import {
baseProperties,
contentDensityPreference,
customPreference,
pageSizePreference,
wrapLinesPreference,
} from './shared-configs';

const columnOptions: CollectionPreferencesProps.ContentDisplayOption[] = [
// ungroupdd
{ id: 'name', label: 'Name', alwaysVisible: true },
{ id: 'status', label: 'Status' },

// performance
{ id: 'cpuUtilization', label: 'CPU (%)', groupId: 'performance' },
{ id: 'memoryUtilization', label: 'Memory (%)', groupId: 'performance' },
{ id: 'networkIn', label: 'Network In (MB/s)', groupId: 'performance' },
{ id: 'networkOut', label: 'Network Out (MB/s)', groupId: 'performance' },

// config
{ id: 'instanceType', label: 'Instance Type', groupId: 'configuration' },
{ id: 'availabilityZone', label: 'Availability Zone', groupId: 'configuration' },
{ id: 'region', label: 'Region', groupId: 'configuration' },

// cost
{ id: 'monthlyCost', label: 'Monthly Cost ($)', groupId: 'cost' },
{ id: 'spotPrice', label: 'Spot Price ($/hr)', groupId: 'cost' },
{
id: 'reservedCost',
label:
'Reserved Instance Cost - Long text to verify wrapping behavior and ensure the reordering feature works correctly with extended content',
groupId: 'cost',
},
];

const columnGroups: CollectionPreferencesProps.ContentDisplayOptionGroup[] = [
{ id: 'metrics', label: 'Metrics' },
{ id: 'performance', label: 'Performance', groupId: 'metrics' },
{ id: 'configuration', label: 'Configuration' },
{ id: 'cost', label: 'Cost' },
];

export default function App() {
return (
<>
<h1>Multi-level Reorder Preferences</h1>
<CollectionPreferences
{...baseProperties}
pageSizePreference={pageSizePreference}
wrapLinesPreference={wrapLinesPreference}
contentDensityPreference={contentDensityPreference}
customPreference={customPreference}
contentDisplayPreference={{
title: 'Column preferences',
description: 'Customize the columns visibility and order.',
options: columnOptions,
groups: columnGroups,
...contentDisplayPreferenceI18nStrings,
}}
/>
</>
);
}
Loading
Loading