Skip to content

Commit 2375d4b

Browse files
authored
Merge pull request #236 from rebeccaalpert/a11y-216
fix(ChatbotConversationHistoryNav): Focus should go to launcher on close
2 parents e0c7ea7 + b8a9b36 commit 2375d4b

File tree

4 files changed

+8
-83
lines changed

4 files changed

+8
-83
lines changed

packages/module/patternfly-docs/content/extensions/virtual-assistant/examples/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.md

-8
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,3 @@ Actions can be added to conversations with `menuItems`. Optionally, you can also
7474
```js file="./ChatbotHeaderDrawerWithActions.tsx"
7575

7676
```
77-
78-
### Drawer in header
79-
80-
This example illustrates how to use `aria-expanded` and the `<ChatbotHeaderMenu>` with the drawer.
81-
82-
```js file="./ChatbotHeaderDrawerInHeader.tsx"
83-
84-
```

packages/module/patternfly-docs/content/extensions/virtual-assistant/examples/ChatbotConversationHistoryNav/ChatbotHeaderDrawerInHeader.tsx

-62
This file was deleted.

packages/module/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.scss

+2-5
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,8 @@
111111
--pf-v6-c-drawer__panel__body--PaddingInlineEnd: var(--pf-t--global--spacer--lg);
112112

113113
overflow-y: auto;
114-
115-
display: grid;
116-
grid-template-rows: auto 1fr auto;
117-
grid-auto-rows: auto;
118-
114+
display: flex;
115+
flex-direction: column;
119116
height: 70vh;
120117
}
121118
}

packages/module/src/ChatbotConversationHistoryNav/ChatbotConversationHistoryNav.tsx

+6-8
Original file line numberDiff line numberDiff line change
@@ -202,14 +202,12 @@ export const ChatbotConversationHistoryNav: React.FunctionComponent<ChatbotConve
202202
>
203203
<DrawerContent panelContent={panelContent}>
204204
<DrawerContentBody>
205-
{isDrawerOpen && (displayMode === ChatbotDisplayMode.default || displayMode === ChatbotDisplayMode.docked) ? (
206-
<>
207-
<div className="pf-v6-c-backdrop pf-chatbot__drawer-backdrop"></div>
208-
{drawerContent}
209-
</>
210-
) : (
211-
drawerContent
212-
)}
205+
<>
206+
<div
207+
className={`${isDrawerOpen && (displayMode === ChatbotDisplayMode.default || displayMode === ChatbotDisplayMode.docked) ? 'pf-v6-c-backdrop pf-chatbot__drawer-backdrop' : undefined} `}
208+
></div>
209+
{drawerContent}
210+
</>
213211
</DrawerContentBody>
214212
</DrawerContent>
215213
</Drawer>

0 commit comments

Comments
 (0)