patternfly / patternfly/chatbot
[Chatbot] - Support customizable padding and spacing for ChatbotConversationHistoryNav sidebar layout
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6
- Forks
- 37
- Avg merge
- 3d 19h
- Merged PRs (30d)
- 5
Description
Chatbot Component Area
Layout (Chat Drawer, Header, Persona)
Describe the feature
When using ChatbotConversationHistoryNav, there is no clean API to customize the padding and spacing of the conversation history sidebar elements. Consumers currently must override internal PatternFly CSS class names (e.g., pf-v6-c-drawer__head, pf-v6-c-menu__group-title, pf-v6-c-menu__item, pf-v6-c-menu-toggle) to achieve design requirements.
This is fragile because:
- Selectors must be duplicated for both
pf-v5andpf-v6prefixes to support version transitions - Overrides break silently when PatternFly upgrades change internal class names
- CSS variable overrides like
--pf-v6-c-menu__item--PaddingInlineStartare implementation details not meant for public use
Specific gaps:
-
Drawer head padding — No prop to control
paddingInlineStart/paddingInlineEndon the drawer header and heading container. Consumers override.pf-v6-c-drawer__headand.pf-chatbot__heading-containerdirectly. -
Conversation list item padding — No prop to control inline padding on conversation menu items and group titles. Consumers override
--pf-v6-c-menu__group-title--PaddingInlineStartand--pf-v6-c-menu__item--PaddingInlineStarton.pf-chatbot__menu-item-headerand.pf-chatbot__menu-item. -
Menu toggle hover visibility — No built-in support for showing the per-conversation options menu toggle only on hover. Consumers must manually set
opacity: 0on.pf-chatbot__menu-item .pf-v6-c-menu-toggleandopacity: 1on hover.
Proposed API additions:
-
drawerHeadProps.styleordrawerHeadProps.className— Allow styling the drawer head container -
menuItemProps.paddingInlineor a CSS variable contract — Allow controlling conversation list item spacing -
menuToggleVisibility: 'always' | 'hover'— Control whether the options menu toggle is always visible or only on hover
Related: #834 (custom close/collapse icon and positioning)
Expected Data Structure
<ChatbotConversationHistoryNav
// Drawer head padding customization
drawerHeadProps={{
style: {
paddingInlineStart: 'var(--pf-t--global--spacer--lg)',
paddingInlineEnd: 'var(--pf-t--global--spacer--lg)',
},
}}
// Conversation list item spacing
menuItemPaddingInline="var(--pf-t--global--spacer--md)"
// Options menu toggle visibility
menuToggleVisibility="hover"
/>
Alternatively, expose stable CSS custom properties that consumers can override without targeting internal class names:
--pf-chatbot__drawer-head--PaddingInlineStart
--pf-chatbot__drawer-head--PaddingInlineEnd
--pf-chatbot__menu-item--PaddingInlineStart
--pf-chatbot__menu-item--PaddingInlineEnd
--pf-chatbot__menu-group-title--PaddingInlineStart
--pf-chatbot__menu-group-title--PaddingInlineEnd
Conversational Flow
-
These are layout/styling concerns, not interaction-dependent
-
The conversation history sidebar is always rendered when the drawer is open
-
Padding and spacing affect all conversation items (both pinned and recent sections)
-
Menu toggle hover visibility affects every conversation item's options kebab menu
-
None of these are streaming-dependent
Visuals & Mockups
Current workaround in consumer code (fragile CSS overrides):
// Drawer head padding override (duplicated for v5 and v6)
'& .pf-v6-c-drawer__head, & .pf-v5-c-drawer__head': {
paddingInlineStart: 'var(--pf-t--global--spacer--lg)',
paddingInlineEnd: 'var(--pf-t--global--spacer--lg)',
},
// Menu item padding override
'& .pf-chatbot__menu-item': {
'--pf-v6-c-menu__item--PaddingInlineStart': 'var(--pf-t--global--spacer--md)',
'--pf-v6-c-menu__item--PaddingInlineEnd': 'var(--pf-t--global--spacer--md)',
},
// Menu toggle hover-only visibility
'& .pf-chatbot__menu-item .pf-v6-c-menu-toggle': {
opacity: 0,
transition: 'opacity 0.15s ease-in-out',
},
'& .pf-chatbot__menu-item:hover .pf-v6-c-menu-toggle': {
opacity: 1,
},
Conversational Accessibility
No accessibility impact — these are purely visual/layout customizations. The menu toggle hover visibility should ensure the toggle remains keyboard-accessible (visible on focus) even when hidden visually on mouse-out.
Validation
-
This request aligns with PatternFly AI/Chatbot design guidelines.
-
I have searched for existing chatbot-specific components.
Jira Issue: PF-4289
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the ChatbotConversationHistoryNav entry point and trace how the drawer head, conversation menu items, group titles, and menu toggles are rendered. Confirm the API design with maintainers because the issue presents both prop-based and CSS-variable alternatives. Done means consumers can customize the listed spacing and hover visibility without targeting PatternFly internals, while preserving keyboard access.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100