Skip to content

Commit a9e0aa1

Browse files
authored
chore(compass-assistant): apply patches to assistant styling COMPASS-9790 (#7284)
Fixes issues with: - minimum window size breaking workspaces when assistant - headings having bad spacing - assistant name not being bold - drawer opening with janky wrapping
1 parent f343532 commit a9e0aa1

File tree

3 files changed

+30
-9
lines changed

3 files changed

+30
-9
lines changed

packages/compass-assistant/src/assistant-chat.tsx

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,29 +71,36 @@ const assistantChatFixesStyles = css({
7171
},
7272
/** TODO(COMPASS-9751): We're adjusting styling of all the headers to a lower level than the default for chat, this should be updated in Leafygreen as well and removed from our end. */
7373
'h1, h2, h3, h4, h5, h6': {
74-
margin: 'unset',
7574
fontFamily: fontFamilies.default,
75+
margin: 'unset',
7676
},
7777
/** h4, h5, h6 -> body 1 styling */
7878
'h4, h5, h6': {
7979
fontSize: '13px',
80+
lineHeight: '15px',
81+
marginTop: '4px',
8082
},
8183
/** h1 -> h3 styling */
8284
h1: {
83-
fontSize: '24px',
84-
lineHeight: '32px',
85+
fontSize: '20px',
86+
marginTop: '8px',
8587
fontWeight: 'medium',
88+
lineHeight: '22px',
8689
},
8790
/** h2 -> subtitle styling */
8891
h2: {
8992
color: '#001E2B',
9093
fontWeight: 'semibold',
9194
fontSize: '18px',
95+
lineHeight: '20px',
96+
marginTop: '8px',
9297
},
9398
/** h3 -> body 2 styling */
9499
h3: {
95100
fontSize: '16px',
96101
fontWeight: 'semibold',
102+
lineHeight: '18px',
103+
marginTop: '4px',
97104
},
98105
});
99106
const messageFeedFixesStyles = css({
@@ -102,6 +109,12 @@ const messageFeedFixesStyles = css({
102109
overflowY: 'auto',
103110
flex: 1,
104111
padding: spacing[400],
112+
gap: spacing[400],
113+
114+
// TODO(COMPASS-9751): We're setting the font weight to 600 here as the LG styling for the Assistant header isn't set
115+
'& > div > div:has(svg[aria-label="Sparkle Icon"]) p': {
116+
fontWeight: 600,
117+
},
105118
});
106119
const chatWindowFixesStyles = css({
107120
height: '100%',

packages/compass-components/src/components/drawer/drawer/drawer.styles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ const getBaseStyles = ({ theme }: { theme: Theme }) => css`
5454
all: unset;
5555
background-color: ${color[theme].background.primary.default};
5656
border: 1px solid ${color[theme].border.secondary.default};
57-
width: 100%;
5857
max-width: ${PANEL_WIDTH}px;
5958
height: 100%;
6059
overflow: hidden;
@@ -207,6 +206,7 @@ const getInnerOpenContainerStyles = css`
207206
transition-duration: ${transitionDuration.slowest}ms;
208207
transition-timing-function: linear;
209208
opacity: 1;
209+
width: ${PANEL_WIDTH}px;
210210
`;
211211

212212
export const getInnerContainerStyles = ({

packages/compass-workspaces/src/components/workspaces.tsx

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ const workspacesContentStyles = css({
6565
minHeight: 0,
6666
});
6767

68+
const workspacesSectionStyles = css({
69+
display: 'flex',
70+
minWidth: '600px',
71+
width: '100%',
72+
});
73+
6874
type CompassWorkspacesProps = {
6975
tabs: WorkspaceTab[];
7076
activeTab?: WorkspaceTab | null;
@@ -217,11 +223,13 @@ const CompassWorkspaces: React.FunctionComponent<CompassWorkspacesProps> = ({
217223

218224
<div className={workspacesContentStyles}>
219225
<DrawerAnchor>
220-
{activeTab && workspaceTabContent ? (
221-
workspaceTabContent
222-
) : (
223-
<EmptyWorkspaceContent></EmptyWorkspaceContent>
224-
)}
226+
<div className={workspacesSectionStyles}>
227+
{activeTab && workspaceTabContent ? (
228+
workspaceTabContent
229+
) : (
230+
<EmptyWorkspaceContent></EmptyWorkspaceContent>
231+
)}
232+
</div>
225233
</DrawerAnchor>
226234
</div>
227235
</div>

0 commit comments

Comments
 (0)