Skip to content

Commit

Permalink
🩹 Fix dark mode bg remaining issues
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Dec 22, 2022
1 parent 9149af7 commit d1b5b6e
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ export const MakeComSettings = ({ block }: Props) => {

return (
<Stack spacing={4}>
<Alert
status={webhook?.url ? 'success' : 'info'}
bgColor={webhook?.url ? undefined : 'blue.50'}
rounded="md"
>
<Alert status={webhook?.url ? 'success' : 'info'} rounded="md">
<AlertIcon />
{webhook?.url ? (
<>Your scenario is correctly configured 🚀</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export const WebhookSettings = ({
return (
<Stack spacing={4}>
{provider && (
<Alert status={'info'} bgColor={'blue.50'} rounded="md">
<Alert status={'info'} rounded="md">
<AlertIcon />
<Stack>
<Text>Head up to {provider.name} to configure this block:</Text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ export const ZapierSettings = ({ block }: Props) => {

return (
<Stack spacing={4}>
<Alert
status={webhook?.url ? 'success' : 'info'}
bgColor={webhook?.url ? undefined : 'blue.50'}
rounded="md"
>
<Alert status={webhook?.url ? 'success' : 'info'} rounded="md">
<AlertIcon />
{webhook?.url ? (
<>Your zap is correctly configured 🚀</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
PopoverArrow,
PopoverBody,
useEventListener,
useColorModeValue,
} from '@chakra-ui/react'
import { useTypebot } from '@/features/editor'
import {
Expand All @@ -36,6 +37,7 @@ type Props = {
}

export const ConditionItemNode = ({ item, isMouseOver, indices }: Props) => {
const comparisonValueBg = useColorModeValue('gray.200', 'gray.700')
const { typebot, createItem, updateItem } = useTypebot()
const { openedItemId, setOpenedItemId } = useGraph()
const ref = useRef<HTMLDivElement | null>(null)
Expand Down Expand Up @@ -106,7 +108,7 @@ export const ConditionItemNode = ({ item, isMouseOver, indices }: Props) => {
</Text>
)}
{comparison?.value && (
<Tag bgColor={'gray.200'}>
<Tag bgColor={comparisonValueBg}>
<Text noOfLines={1}>{comparison.value}</Text>
</Tag>
)}
Expand Down
13 changes: 9 additions & 4 deletions apps/builder/src/features/editor/components/PreviewDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
Flex,
FlexProps,
useColorMode,
useColorModeValue,
useEventListener,
UseToastOptions,
VStack,
Expand Down Expand Up @@ -70,7 +71,7 @@ export const PreviewDrawer = () => {
top={`0`}
h={`100%`}
w={`${width}px`}
bgColor={isDark ? 'gray.900' : 'white'}
bgColor={useColorModeValue('white', 'gray.900')}
borderLeftWidth={'1px'}
shadow="lg"
borderLeftRadius={'lg'}
Expand Down Expand Up @@ -126,7 +127,7 @@ const ResizeHandle = (props: FlexProps & { isDark: boolean }) => {
w="15px"
h="50px"
borderWidth={'1px'}
bgColor={props.isDark ? 'gray.800' : 'white'}
bgColor={useColorModeValue('white', 'gray.800')}
cursor={'col-resize'}
justifyContent={'center'}
align={'center'}
Expand All @@ -135,11 +136,15 @@ const ResizeHandle = (props: FlexProps & { isDark: boolean }) => {
>
<Box
w="2px"
bgColor={props.isDark ? 'gray.600' : 'gray.300'}
bgColor={useColorModeValue('gray.300', 'gray.600')}
h="70%"
mr="0.5"
/>
<Box w="2px" bgColor={props.isDark ? 'gray.600' : 'gray.300'} h="70%" />
<Box
w="2px"
bgColor={useColorModeValue('gray.300', 'gray.600')}
h="70%"
/>
</Flex>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
EditablePreview,
EditableInput,
Tooltip,
useColorModeValue,
} from '@chakra-ui/react'
import React, { useState } from 'react'

Expand All @@ -14,6 +15,7 @@ export const EditableTypebotName = ({
defaultName,
onNewName,
}: EditableProps) => {
const emptyNameBg = useColorModeValue('gray.100', 'gray.700')
const [currentName, setCurrentName] = useState(defaultName)

const submitNewName = (newName: string) => {
Expand All @@ -39,7 +41,7 @@ export const EditableTypebotName = ({
fontSize="14px"
minW="30px"
minH="20px"
bgColor={currentName === '' ? 'gray.100' : 'inherit'}
bgColor={currentName === '' ? emptyNameBg : 'inherit'}
/>
<EditableInput fontSize="14px" />
</Editable>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import { Box, BoxProps, Flex, Text, VStack } from '@chakra-ui/react'
import {
Box,
BoxProps,
Flex,
Text,
useColorModeValue,
VStack,
} from '@chakra-ui/react'
import { GlobeIcon, ToolIcon } from '@/components/icons'
import { TypebotInDashboard } from '@/features/dashboard'
import { EmojiOrImageIcon } from '@/components/EmojiOrImageIcon'

type Props = {
typebot: TypebotInDashboard
Expand All @@ -20,25 +28,19 @@ export const TypebotCardOverlay = ({ typebot, ...props }: Props) => {
pointerEvents="none"
borderWidth={1}
rounded="md"
bgColor="white"
bgColor={useColorModeValue('white', 'gray.700')}
shadow="lg"
opacity={0.7}
{...props}
>
<VStack spacing={4}>
<Flex
boxSize="45px"
rounded="full"
justifyContent="center"
alignItems="center"
bgColor={typebot.publishedTypebotId ? 'blue.500' : 'gray.400'}
color="white"
fontSize={'4xl'}
>
{typebot.publishedTypebotId ? (
<GlobeIcon fill="white" fontSize="20px" />
) : (
<ToolIcon fill="white" fontSize="20px" />
)}
<EmojiOrImageIcon icon={typebot.icon} boxSize={'35px'} />
</Flex>
<Text>{typebot.name}</Text>
</VStack>
Expand Down
17 changes: 14 additions & 3 deletions apps/builder/src/features/graph/components/Edges/DropOffEdge.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
import { VStack, Tag, Text, Tooltip } from '@chakra-ui/react'
import {
VStack,
Tag,
Text,
Tooltip,
useColorModeValue,
theme,
} from '@chakra-ui/react'
import { useGraph, useGroupsCoordinates } from '../../providers'
import { useTypebot } from '@/features/editor'
import { useWorkspace } from '@/features/workspace'
Expand All @@ -23,6 +30,10 @@ export const DropOffEdge = ({
groupId,
onUnlockProPlanClick,
}: Props) => {
const dropOffColor = useColorModeValue(
theme.colors.red[500],
theme.colors.red[300]
)
const { workspace } = useWorkspace()
const { groupsCoordinates } = useGroupsCoordinates()
const { sourceEndpoints, graphPosition } = useGraph()
Expand Down Expand Up @@ -82,7 +93,7 @@ export const DropOffEdge = ({
{ x: labelCoordinates.x - 300, y: labelCoordinates.y },
sourceTop ?? 0
)}
stroke="#e53e3e"
stroke={dropOffColor}
strokeWidth="2px"
markerEnd="url(#red-arrow)"
fill="none"
Expand All @@ -98,7 +109,7 @@ export const DropOffEdge = ({
isDisabled={isWorkspaceProPlan}
>
<VStack
bgColor={'red.500'}
bgColor={dropOffColor}
color="white"
rounded="md"
p="2"
Expand Down

5 comments on commit d1b5b6e

@vercel
Copy link

@vercel vercel bot commented on d1b5b6e Dec 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on d1b5b6e Dec 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

viewer-v2-alpha – ./apps/viewer

ns8.vn
yobot.me
247987.com
8jours.top
bee.cr8.ai
bot.aws.bj
bot.bbc.bj
cat.cr8.ai
finplex.be
pig.cr8.ai
sat.cr8.ai
bot.aipr.kr
docs.cr8.ai
minipost.uk
mole.cr8.ai
team.cr8.ai
wolf.cr8.ai
rhino.cr8.ai
sheep.cr8.ai
svhm.mprs.in
tiger.cr8.ai
video.cr8.ai
zebra.cr8.ai
bot.krdfy.com
goldorayo.com
rabbit.cr8.ai
signup.cr8.ai
turkey.cr8.ai
vhpage.cr8.ai
am.nigerias.io
an.nigerias.io
ar.nigerias.io
bot.enreso.org
bot.lalmon.com
chicken.cr8.ai
panther.cr7.ai
panther.cr8.ai
penguin.cr8.ai
ticketfute.com
unicorn.cr8.ai
apo.nigerias.io
apr.nigerias.io
aso.nigerias.io
bot.ageenda.com
bot.truongnguyen.live
cdd.searchcube.com.sg
chat.missarkansas.org
chatbot.ownacademy.co
sbutton.wpwakanda.com
815639944.21000000.one
aplicacao.bmind.com.br
apply.ansuraniphone.my
bbutton.wpwwakanda.com
bot.louismarcondes.com
bot.t20worldcup.com.au
c23111azqw.nigerias.io
felipewelington.com.br
form.searchcube.com.sg
gcase.barrettamario.it
info.clickasuransi.com
bot.cabinrentalagency.com
bot.fusionstarreviews.com
boyfriend-breakup.riku.ai
brigadeirosemdrama.com.br
chat.ertcrebateportal.com
chat.thisiscrushhouse.com
sellmyharleylouisiana.com
verfica.botmachine.com.br
configurator.bouclidom.com
help.atlasoutfittersk9.com
ted.meujalecobrasil.com.br
type.dericsoncalari.com.br
chatbot.berbelanjabiz.trade
designguide.techyscouts.com
presente.empresarias.com.mx
sell.sellthemotorhome.co.uk
anamnese.odontopavani.com.br
austin.channelautomation.com
bot.marketingplusmindset.com
piazzatorre.barrettamario.it
requests.swamprecordsgnv.com
type.cookieacademyonline.com
bot.brigadeirosemdrama.com.br
onboarding.libertydreamcare.ie
type.talitasouzamarques.com.br
agendamento.sergiolimajr.com.br
anamnese.clinicamegasjdr.com.br
bookings.littlepartymonkeys.com
bot.comercializadoraomicron.com
elevateyourmind.groovepages.com
yourfeedback.comebackreward.com
personal-trainer.barrettamario.it
preagendamento.sergiolimajr.com.br
studiotecnicoimmobiliaremerelli.it
download.thailandmicespecialist.com
register.thailandmicespecialist.com
viewer-v2-alpha-typebot-io.vercel.app
pesquisa.escolamodacomproposito.com.br
anamnese.clinicaramosodontologia.com.br
viewer-v2-alpha-git-main-typebot-io.vercel.app

@vercel
Copy link

@vercel vercel bot commented on d1b5b6e Dec 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on d1b5b6e Dec 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

builder-v2 – ./apps/builder

builder-v2-typebot-io.vercel.app
builder-v2-git-main-typebot-io.vercel.app
app.typebot.io

@vercel
Copy link

@vercel vercel bot commented on d1b5b6e Dec 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

docs – ./apps/docs

docs-typebot-io.vercel.app
docs-git-main-typebot-io.vercel.app
docs.typebot.io

Please sign in to comment.