diff --git a/workspaces/intelligent-assistant/.changeset/brave-dividers-show.md b/workspaces/intelligent-assistant/.changeset/brave-dividers-show.md new file mode 100644 index 00000000000..6c4d4338b54 --- /dev/null +++ b/workspaces/intelligent-assistant/.changeset/brave-dividers-show.md @@ -0,0 +1,5 @@ +--- +'@red-hat-developer-hub/backstage-plugin-intelligent-assistant': patch +--- + +Restore missing visual separators in the notebook file attachments sidebar (RHDHBUGS-3511). Adds a horizontal divider between the notebook title and documents sections, a visible border on the drawer resize splitter, and a CSS fallback color when PatternFly theme variables are unavailable. diff --git a/workspaces/intelligent-assistant/plugins/intelligent-assistant/src/components/__tests__/DocumentSidebar.test.tsx b/workspaces/intelligent-assistant/plugins/intelligent-assistant/src/components/__tests__/DocumentSidebar.test.tsx index f01c397457f..d5e107cee95 100644 --- a/workspaces/intelligent-assistant/plugins/intelligent-assistant/src/components/__tests__/DocumentSidebar.test.tsx +++ b/workspaces/intelligent-assistant/plugins/intelligent-assistant/src/components/__tests__/DocumentSidebar.test.tsx @@ -55,6 +55,26 @@ describe('DocumentSidebar', () => { expect(screen.getByText('Test Notebook')).toBeInTheDocument(); }); + it('should render a separator between the title and documents sections', () => { + render(); + const separator = screen.getByRole('separator'); + expect(separator).toBeInTheDocument(); + expect(separator.className).toMatch(/sectionDivider/); + expect( + Array.from(document.styleSheets).some(sheet => { + try { + return Array.from(sheet.cssRules).some(rule => + rule.cssText.includes( + '--pf-t--global--border--color--default, #c7c7c7', + ), + ); + } catch { + return false; + } + }), + ).toBe(true); + }); + it('should render nothing when collapsed', () => { const { container } = render( , diff --git a/workspaces/intelligent-assistant/plugins/intelligent-assistant/src/components/notebooks/DocumentSidebar.tsx b/workspaces/intelligent-assistant/plugins/intelligent-assistant/src/components/notebooks/DocumentSidebar.tsx index 34111003bb8..7c92bb48fa0 100644 --- a/workspaces/intelligent-assistant/plugins/intelligent-assistant/src/components/notebooks/DocumentSidebar.tsx +++ b/workspaces/intelligent-assistant/plugins/intelligent-assistant/src/components/notebooks/DocumentSidebar.tsx @@ -47,9 +47,15 @@ const useStyles = makeStyles(theme => ({ display: 'flex', alignItems: 'center', justifyContent: 'space-between', - marginBottom: theme.spacing(2), gap: theme.spacing(1), }, + sectionDivider: { + borderTop: '1px solid var(--pf-t--global--border--color--default, #c7c7c7)', + marginTop: theme.spacing(2), + marginBottom: theme.spacing(2), + marginLeft: -theme.spacing(2), + marginRight: -theme.spacing(2), + }, title: { fontWeight: 500, fontSize: '1.25rem', @@ -178,6 +184,12 @@ export const DocumentSidebar = ({ +
+
{t('notebook.view.documents.count', { diff --git a/workspaces/intelligent-assistant/plugins/intelligent-assistant/src/components/notebooks/NotebookView.tsx b/workspaces/intelligent-assistant/plugins/intelligent-assistant/src/components/notebooks/NotebookView.tsx index b07d0bd4688..7dc442bce77 100644 --- a/workspaces/intelligent-assistant/plugins/intelligent-assistant/src/components/notebooks/NotebookView.tsx +++ b/workspaces/intelligent-assistant/plugins/intelligent-assistant/src/components/notebooks/NotebookView.tsx @@ -93,6 +93,7 @@ const useStyles = makeStyles(theme => ({ '& .pf-v6-c-drawer__splitter, & .pf-v5-c-drawer__splitter': { backgroundColor: 'var(--pf-t--global--background--color--floating--default)', + borderRight: '1px solid var(--pf-t--global--border--color--default)', }, }, expandStrip: {