From 503154d7b220be0ebcfff5d58e6348293a98ff63 Mon Sep 17 00:00:00 2001 From: Beatrix <68532117+abeatrix@users.noreply.github.com> Date: Tue, 10 Sep 2024 09:04:14 -0700 Subject: [PATCH] Chat: add unique identifiers to CollapsiblePanel components (#5532) This PR adds an id prop to the History Chat items that allows dev identify chat history by period in E2E test - Adds an `id` prop to the `CollapsiblePanel` component to provide a unique identifier - Updates the `Collapsible` and `CollapsibleContent` components to use the `id` prop - Ensures each `CollapsiblePanel` in the `HistoryTab` has a unique identifier based on the period ## Test plan Green CI - Everything should works the same. ## Changelog --- vscode/webviews/components/CollapsiblePanel.tsx | 4 ++++ vscode/webviews/tabs/HistoryTab.tsx | 1 + 2 files changed, 5 insertions(+) diff --git a/vscode/webviews/components/CollapsiblePanel.tsx b/vscode/webviews/components/CollapsiblePanel.tsx index 40695074aab7..240398388872 100644 --- a/vscode/webviews/components/CollapsiblePanel.tsx +++ b/vscode/webviews/components/CollapsiblePanel.tsx @@ -12,9 +12,11 @@ interface CollapsiblePanelProps { className?: string contentClassName?: string initialOpen?: boolean + id?: string } export const CollapsiblePanel: React.FC = ({ + id, storageKey, title, children, @@ -28,6 +30,7 @@ export const CollapsiblePanel: React.FC = ({ return ( = ({
= ({
{chats.map(([period, chats]) => (