-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🚸 (pictureChoice) Allow dynamic picture choice with… (#865)
… string variables <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ### Summary by CodeRabbit - Refactor: Updated `GoogleSheetsNodeContent` component to use the `options` prop instead of `action`, and integrated the `useTypebot` hook for better functionality. - Style: Improved UI text and layout in `GoogleSheetsSettings.tsx`, enhancing user experience when selecting rows. - Refactor: Simplified rendering logic in `BlockNodeContent.tsx` by directly calling `GoogleSheetsNodeContent` component, improving code readability. - Bug Fix: Enhanced `injectVariableValuesInPictureChoiceBlock` function to handle different types of values for titles, descriptions, and picture sources, fixing issues with variable value injection. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
- Loading branch information
1 parent
d46e801
commit 76f4954
Showing
4 changed files
with
59 additions
and
32 deletions.
There are no files selected for viewing
36 changes: 28 additions & 8 deletions
36
...lder/src/features/blocks/integrations/googleSheets/components/GoogleSheetsNodeContent.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,33 @@ | ||
import React from 'react' | ||
import { Text } from '@chakra-ui/react' | ||
import { GoogleSheetsAction } from '@typebot.io/schemas' | ||
import { Stack, Text } from '@chakra-ui/react' | ||
import { GoogleSheetsAction, GoogleSheetsOptions } from '@typebot.io/schemas' | ||
import { useTypebot } from '@/features/editor/providers/TypebotProvider' | ||
import { SetVariableLabel } from '@/components/SetVariableLabel' | ||
|
||
type Props = { | ||
action?: GoogleSheetsAction | ||
options?: GoogleSheetsOptions | ||
} | ||
|
||
export const GoogleSheetsNodeContent = ({ action }: Props) => ( | ||
<Text color={action ? 'currentcolor' : 'gray.500'} noOfLines={1}> | ||
{action ?? 'Configure...'} | ||
</Text> | ||
) | ||
export const GoogleSheetsNodeContent = ({ options }: Props) => { | ||
const { typebot } = useTypebot() | ||
return ( | ||
<Stack> | ||
<Text color={options?.action ? 'currentcolor' : 'gray.500'} noOfLines={1}> | ||
{options?.action ?? 'Configure...'} | ||
</Text> | ||
{typebot && | ||
options?.action === GoogleSheetsAction.GET && | ||
options?.cellsToExtract | ||
.map((mapping) => mapping.variableId) | ||
.map((variableId, idx) => | ||
variableId ? ( | ||
<SetVariableLabel | ||
key={variableId + idx} | ||
variables={typebot.variables} | ||
variableId={variableId} | ||
/> | ||
) : null | ||
)} | ||
</Stack> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76f4954
There was a problem hiding this comment.
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:
landing-page-v2 – ./apps/landing-page
home.typebot.io
landing-page-v2-typebot-io.vercel.app
landing-page-v2-git-main-typebot-io.vercel.app
get-typebot.com
www.typebot.io
www.get-typebot.com
76f4954
There was a problem hiding this comment.
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
docs-git-main-typebot-io.vercel.app
docs-typebot-io.vercel.app
76f4954
There was a problem hiding this comment.
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
app.typebot.io
builder-v2-git-main-typebot-io.vercel.app
builder-v2-typebot-io.vercel.app
76f4954
There was a problem hiding this comment.
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 – ./apps/viewer
bet7k.online
bot.afric.ai
bot.grace.bj
bot.tobb.pro
cinecorn.com
ezbooking.ai
projektelco.com
proscale.com.br
sellmycarbr.com
share.bot.gives
svhmapp.mprs.in
typebot.aloe.do
acordo-certo.com
app-liberado.pro
ask.pemantau.org
batepapo.digital
bot.contakit.com
bot.imovfast.com
bot.piccinato.co
chat.sifucrm.com
chat.syncwin.com
chatonlineja.com
clo.closeer.work
cockroach.cr8.ai
demo.chatjer.com
desafioem21d.com
digitando.online
faqs.nigerias.io
feiraodehoje.com
georgemarttt.com
go.chatbotcv.com
haymanevents.com
kw.wpwakanda.com
localamor.online
lojamundobox.com
my.skillbrow.com
myrentalhost.com
silvercop.com.br
silvercop.online
stan.vselise.com
typebot.aloe.bot
vidalimentar.com
voicehelp.cr8.ai
web.bjogador.com
webwhatsapp.work
whatisappweb.com
www.pantaflow.ai
zap.fundviser.in
acordocorreto.com
akses.sifucrm.com
analistamines.com
app.bouclidom.com
app.chatforms.net
appbotcontato.com
appmillion.online
viewer-v2-typebot-io.vercel.app
mdb.assessoria.aloisio.progenbr.com
mdb.assessoria.girotto.progenbr.com
mdb.assessoria.marinho.progenbr.com
mdb.assessoria.rodrigo.progenbr.com
register.thailandmicespecialist.com
mdb.assessoria.desideri.progenbr.com
mdb.assessoria.fernanda.progenbr.com
mdb.assessoria.jbatista.progenbr.com
mdb.assessoria.mauricio.progenbr.com
mdb.evento.autocadastro.progenbr.com
form.shopmercedesbenzsouthorlando.com
mdb.evento.equipeinterna.progenbr.com
bot.studiotecnicoimmobiliaremerelli.it
mdb.assessoria.boaventura.progenbr.com
mdb.assessoria.jtrebesqui.progenbr.com
pesquisa.escolamodacomproposito.com.br
anamnese.clinicaramosodontologia.com.br
gabinete.baleia.formulario.progenbr.com
mdb.assessoria.carreirinha.progenbr.com
chrome-os-inquiry-system.itschromeos.com
mdb.assessoria.paulomarques.progenbr.com
viewer-v2-git-main-typebot-io.vercel.app
main-menu-for-itschromeos.itschromeos.com
mdb.assessoria.qrcode.ademir.progenbr.com
mdb.assessoria.qrcode.arthur.progenbr.com
mdb.assessoria.qrcode.danilo.progenbr.com
mdb.assessoria.qrcode.marcao.progenbr.com
mdb.assessoria.qrcode.marcio.progenbr.com
mdb.assessoria.qrcode.aloisio.progenbr.com
mdb.assessoria.qrcode.girotto.progenbr.com
mdb.assessoria.qrcode.marinho.progenbr.com
mdb.assessoria.qrcode.rodrigo.progenbr.com
mdb.assessoria.carlosalexandre.progenbr.com
mdb.assessoria.qrcode.desideri.progenbr.com
mdb.assessoria.qrcode.fernanda.progenbr.com
mdb.assessoria.qrcode.jbatista.progenbr.com
mdb.assessoria.qrcode.mauricio.progenbr.com
mdb.assessoria.fernanda.regional.progenbr.com
mdb.assessoria.qrcode.boaventura.progenbr.com
mdb.assessoria.qrcode.jtrebesqui.progenbr.com
mdb.assessoria.qrcode.carreirinha.progenbr.com
mdb.assessoria.qrcode.paulomarques.progenbr.com
mdb.assessoria.qrcode.carlosalexandre.progenbr.com
mdb.assessoria.qrcode.fernanda.regional.progenbr.com