Skip to content

Commit c019577

Browse files
authored
fix: FBOT-1043 quick reply button layout on fullwidth theme + change theme css append target to body (#62)
1 parent 2db2666 commit c019577

File tree

3 files changed

+48
-2
lines changed

3 files changed

+48
-2
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Chatbot</title>
6+
<link rel="preconnect" href="https://fonts.gstatic.com">
7+
<link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet">
8+
</head>
9+
<body>
10+
11+
<!-- PUT THIS CODE RIGHT BEFORE THE </BODY> TAG (you can also use some tag manager like GTM) AND REPLACE ... WITH BOT ID -->
12+
<!-- • design and behavior of webchat could be configured remotely from Feedyou Designer -->
13+
<!-- • it is needed to append #feedbot-test-mode to the URL to show chatbot window during development -->
14+
<link href="../../botchat.css" rel="stylesheet" />
15+
<script type="text/javascript">
16+
(function (f,y,b,o,t,s){(t = y.createElement(b)), (s = y.getElementsByTagName(b)[0]);t.async = 1;t.src = "../../botchat-es5.js";t.onload=function(){BotChat.App({
17+
bot: { id: "feedbot-demo-webchat" }, // try "feedbot-demo-webchat" during testing
18+
theme: { template: { type: "full-screen"} }
19+
})};s.parentNode.insertBefore(t, s);})(window, document, "script");
20+
</script>
21+
<!-- --------------------------------------------------------------------------------------- -->
22+
23+
</body>
24+
</html>

samples/feedyou/local.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Chatbot</title>
6+
<link rel="preconnect" href="https://fonts.gstatic.com">
7+
<link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet">
8+
</head>
9+
<body>
10+
11+
<!-- PUT THIS CODE RIGHT BEFORE THE </BODY> TAG (you can also use some tag manager like GTM) AND REPLACE ... WITH BOT ID -->
12+
<!-- • design and behavior of webchat could be configured remotely from Feedyou Designer -->
13+
<!-- • it is needed to append #feedbot-test-mode to the URL to show chatbot window during development -->
14+
<link href="../../botchat.css" rel="stylesheet" />
15+
<script type="text/javascript">
16+
(function (f,y,b,o,t,s){(t = y.createElement(b)), (s = y.getElementsByTagName(b)[0]);t.async = 1;t.src = "../../botchat-es5.js";t.onload=function(){BotChat.App({
17+
bot: { id: "feedbot-demo-webchat" },
18+
})};s.parentNode.insertBefore(t, s);})(window, document, "script");
19+
</script>
20+
<!-- --------------------------------------------------------------------------------------- -->
21+
22+
</body>
23+
</html>

src/App.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ export const App = async (props: AppProps, container?: HTMLElement) => {
226226
themeStyle.appendChild(
227227
document.createTextNode(getStyleForTheme(theme, remoteConfig))
228228
);
229-
document.head.appendChild(themeStyle);
229+
document.body.appendChild(themeStyle);
230230
}
231231

232232
// FEEDYOU use twemoji to make emoji compatible
@@ -412,7 +412,6 @@ const FullScreenTheme = (theme: Theme) => `
412412
413413
.wc-message-pane .wc-suggested-actions {
414414
position: absolute;
415-
bottom: 0px;
416415
z-index: 10000;
417416
background-color: white;
418417
}

0 commit comments

Comments
 (0)