diff --git a/src/components/Sidebar/Sidebar.scss b/src/components/Sidebar/Sidebar.scss index 2a362bb6..4f45f55d 100644 --- a/src/components/Sidebar/Sidebar.scss +++ b/src/components/Sidebar/Sidebar.scss @@ -22,14 +22,24 @@ top: 0; right: 0; } + + .sidebar-header { + background: linear-gradient(to left, rgb(58, 101, 108) 0px, rgb(0, 29, 34)); + width: 100%; + height: 60px; + + svg { + height: 30px; + } + } } .separator { z-index: 100; width: 100%; - height: 10px; - padding: 10px; + height: 5px; + padding: 5px; background: -webkit-linear-gradient(270deg, rgba(0, 0, 0, 0.35), transparent); background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent); - opacity: 0.2; + opacity: 0.3; } diff --git a/src/components/Sidebar/index.jsx b/src/components/Sidebar/index.jsx index 097397a3..bb590182 100644 --- a/src/components/Sidebar/index.jsx +++ b/src/components/Sidebar/index.jsx @@ -13,6 +13,7 @@ import APIError from '../APIError'; import ChatBox from '../ChatBox'; import Disclosure from '../Disclosure'; import MessageForm from '../MessageForm'; +import { ReactComponent as XpertLogo } from '../../assets/xpert-logo.svg'; import './Sidebar.scss'; const Sidebar = ({ @@ -76,14 +77,8 @@ const Sidebar = ({ const getSidebar = () => (
-
-

- Hi, I'm Xpert! -

-

- Stuck on a concept? Need more clarification on a complicated topic? - Let's chat! -

+
+
{disclosureAcknowledged ? (getSidebar()) : ({getMessageForm()})} diff --git a/src/widgets/Xpert.test.jsx b/src/widgets/Xpert.test.jsx index 532669f3..7c8668e3 100644 --- a/src/widgets/Xpert.test.jsx +++ b/src/widgets/Xpert.test.jsx @@ -39,7 +39,7 @@ const courseId = 'course-v1:edX+DemoX+Demo_Course'; const unitId = 'block-v1:edX+DemoX+Demo_Course+type@unit+block@unit1'; const assertSidebarElementsNotInDOM = () => { - expect(screen.queryByTestId('heading', { name: 'Hi, I\'m Xpert!' })).not.toBeInTheDocument(); + expect(screen.queryByTestId('sidebar-xpert-header')).not.toBeInTheDocument(); expect(screen.queryByRole('textbox')).not.toBeInTheDocument(); expect(screen.queryByRole('button', { name: 'submit' })).not.toBeInTheDocument(); @@ -110,7 +110,7 @@ test('clicking the call to action opens the sidebar', async () => { await user.click(screen.queryByTestId('message-button')); // assert that UI elements present in the sidebar are visible - expect(screen.getByRole('heading', { name: 'Hi, I\'m Xpert!' })).toBeVisible(); + expect(screen.getByTestId('sidebar-xpert-header')).toBeVisible(); expect(screen.getByRole('textbox')).toBeVisible(); expect(screen.getByRole('button', { name: 'submit' })).toBeVisible(); expect(screen.getByTestId('close-button')).toBeVisible(); @@ -129,7 +129,7 @@ test('clicking the toggle button opens the sidebar', async () => { await user.click(screen.queryByTestId('toggle-button')); // assert that UI elements present in the sidebar are visible - expect(screen.getByRole('heading', { name: 'Hi, I\'m Xpert!' })).toBeVisible(); + expect(screen.getByTestId('sidebar-xpert-header')).toBeVisible(); expect(screen.getByRole('textbox')).toBeVisible(); expect(screen.getByRole('button', { name: 'submit' })).toBeVisible(); expect(screen.getByTestId('close-button')).toBeVisible(); @@ -293,7 +293,7 @@ test('popup modal should open chat', async () => { await user.click(screen.queryByTestId('check-button')); // assert that UI elements present in the sidebar are visible - expect(screen.getByRole('heading', { name: 'Hi, I\'m Xpert!' })).toBeVisible(); + expect(screen.getByTestId('sidebar-xpert-header')).toBeVisible(); expect(screen.getByRole('textbox')).toBeVisible(); expect(screen.getByRole('button', { name: 'submit' })).toBeVisible(); expect(screen.getByTestId('close-button')).toBeVisible();