Skip to content
This repository has been archived by the owner on Feb 5, 2025. It is now read-only.

Commit

Permalink
fix: launcher spacing to chat (COR-4256) (#472)
Browse files Browse the repository at this point in the history
<!-- You can erase any parts of this template not applicable to your Pull Request. -->

**Fixes or implements VF-XXX**

### Brief description. What is this change?

<!-- Build up some context for your teammates on the changes made here and potential tradeoffs made and/or highlight any topics for discussion -->

### Implementation details. How do you make this change?

<!-- Explain the way/approach you follow to make this change more deeply in order to help your teammates to understand much easier this change -->

### Setup information

<!-- Notes regarding local environment. These should note any new configurations, new environment variables, etc. -->

### Deployment Notes

<!-- Notes regarding deployment the contained body of work. These should note any db migrations, etc. -->

### Related PRs

<!-- List related PRs against other branches -->

- https://github.com/voiceflow/XXXXXXXXX/pull/123

### Checklist

- [ ] Breaking changes have been communicated, including:
    - New required environment variables
    - Renaming of interfaces (API routes, request/response interface, etc)
- [ ] New environment variables have [been deployed](https://www.notion.so/voiceflow/Add-Environment-Variables-be1b0136479f45f1adece7995a7adbfb)
- [ ] Appropriate tests have been written
    - Bug fixes are accompanied by an updated or new test
    - New features are accompanied by a new test
  • Loading branch information
gillyb committed Dec 18, 2024
1 parent 89e2607 commit 7cd52c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/chat/src/components/Launcher/styles.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { buttonStyles } from '../Button/styles.css';
import { fadeInSlideUp } from '../UserResponse/styles.css';

export const LAUNCHER_SIZE = 48;
export const LAUNCHER_WIDTH_LABEL_SIZE = 40;
export const LAUNCHER_WITH_LABEL_SIZE = 40;

export const launcherContainer = style({
width: 'fit-content',
Expand Down
4 changes: 2 additions & 2 deletions packages/chat/src/views/ChatWidget/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import clsx from 'clsx';
import { useContext, useEffect, useLayoutEffect, useState } from 'react';

import { Launcher } from '@/components/Launcher';
import { LAUNCHER_SIZE, LAUNCHER_WIDTH_LABEL_SIZE } from '@/components/Launcher/styles.css';
import { LAUNCHER_SIZE, LAUNCHER_WITH_LABEL_SIZE } from '@/components/Launcher/styles.css';
import { Proactive } from '@/components/Proactive';
import { ClassName } from '@/constants';
import { RuntimeStateAPIContext, RuntimeStateContext } from '@/contexts';
Expand Down Expand Up @@ -67,7 +67,7 @@ export const ChatWidget: React.FC<ChatWidgetProps> = ({ shadowRoot, chatAPI, rea

const side = assistant.common.position;
const position = { bottom: `${assistant.common.bottomSpacing}px`, [side]: `${assistant.common.sideSpacing}px` };
const launcherButtonSize = assistant.common.launcher.type === 'label' ? LAUNCHER_WIDTH_LABEL_SIZE : LAUNCHER_SIZE;
const launcherButtonSize = assistant.common.launcher.type === 'icon' ? LAUNCHER_SIZE : LAUNCHER_WITH_LABEL_SIZE;
const chatHeight = `calc(100% - ${launcherButtonSize + LAUNCHER_MARGIN + parseInt(assistant.common.bottomSpacing, 10) + 20}px)`;

const widgetPosition = {
Expand Down

0 comments on commit 7cd52c4

Please sign in to comment.