Skip to content

Commit 64ef8d1

Browse files
committed
✨ Update CSS and JavaScript for Widget Enhancements
- 🎨 Changed the CSS class for background color in `page_head_css_theme.tpl.php` to `.widget-body` for better styling control. - 📜 Updated script version numbers in `userchat2.php` to `421` for both IE and standard React app scripts, ensuring compatibility with the latest features. - 🔄 Modified `BodyChat.js` to include a new class `popup-body` for improved layout handling in different modes, enhancing user experience. - 🔧 Incremented React app version in `settings.php` to `421` to reflect the latest updates and ensure all components are in sync. These changes aim to improve the visual consistency and functionality of the chat widget. 🚀
1 parent 967f198 commit 64ef8d1

6 files changed

Lines changed: 9 additions & 7 deletions

File tree

lhc_web/design/defaulttheme/js/widgetv2/react.app.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lhc_web/design/defaulttheme/js/widgetv2/react.app.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lhc_web/design/defaulttheme/tpl/pagelayouts/parts/page_head_css_theme.tpl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
<?php endif;?>
154154

155155
<?php if (isset($Result['theme']->bot_configuration_array['send_area_background']) && $Result['theme']->bot_configuration_array['send_area_background'] != '') : ?>
156-
.mobile-body, .desktop-body{
156+
.widget-body{
157157
background-color: #<?php echo htmlspecialchars($Result['theme']->bot_configuration_array['send_area_background']);?>!important;
158158
}
159159
<?php endif;?>

lhc_web/design/defaulttheme/tpl/pagelayouts/userchat2.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,14 @@
106106
) : ?>
107107
<?php if (!isset($Result['voice_call'])) : ?>
108108
<script <?php isset($Result['app_scope']) ? print 'scope="' . htmlspecialchars($Result['app_scope']) . '"' : '' ?> src="<?php echo erLhcoreClassDesign::design('js/widgetv2/vendor.ie.js')?>?v=a9_<?php echo $staticVersion;?>"></script>
109-
<script <?php isset($Result['app_scope']) ? print 'scope="' . htmlspecialchars($Result['app_scope']) . '"' : '' ?> src="<?php echo erLhcoreClassDesign::design('js/widgetv2/react.app.ie.js')?>?t=420_<?php echo $staticVersion;?>"></script>
109+
<script <?php isset($Result['app_scope']) ? print 'scope="' . htmlspecialchars($Result['app_scope']) . '"' : '' ?> src="<?php echo erLhcoreClassDesign::design('js/widgetv2/react.app.ie.js')?>?t=421_<?php echo $staticVersion;?>"></script>
110110
<?php else : ?>
111111
<script <?php isset($Result['app_scope']) ? print 'scope="' . htmlspecialchars($Result['app_scope']) . '"' : '' ?> src="<?php echo erLhcoreClassDesign::design('js/voice/voice.call.js')?>?t=3_<?php echo $staticVersion;?>"></script>
112112
<?php endif; ?>
113113
<?php else : ?>
114114
<?php if (!isset($Result['voice_call'])) : ?>
115115
<script <?php isset($Result['app_scope']) ? print 'scope="' . htmlspecialchars($Result['app_scope']) . '"' : '' ?> src="<?php echo erLhcoreClassDesign::design('js/widgetv2/vendor.js')?>?v=a9_<?php echo $staticVersion;?>"></script>
116-
<script <?php isset($Result['app_scope']) ? print 'scope="' . htmlspecialchars($Result['app_scope']) . '"' : '' ?> src="<?php echo erLhcoreClassDesign::design('js/widgetv2/react.app.js')?>?t=420_<?php echo $staticVersion;?>"></script>
116+
<script <?php isset($Result['app_scope']) ? print 'scope="' . htmlspecialchars($Result['app_scope']) . '"' : '' ?> src="<?php echo erLhcoreClassDesign::design('js/widgetv2/react.app.js')?>?t=421_<?php echo $staticVersion;?>"></script>
117117
<?php else : ?>
118118
<script <?php isset($Result['app_scope']) ? print 'scope="' . htmlspecialchars($Result['app_scope']) . '"' : '' ?> src="<?php echo erLhcoreClassDesign::design('js/voice/voice.call.js')?>?t=2_<?php echo $staticVersion;?>"></script>
119119
<?php endif; ?>

lhc_web/design/defaulttheme/widget/react-app/src/components/BodyChat.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,14 @@ class BodyChat extends Component {
179179
return <Suspense fallback="..."><ProactiveInvitation setBotPayload={this.setBotPayload} /></Suspense>
180180
}
181181

182-
var className = 'd-flex flex-column flex-grow-1 reset-container-margins';
182+
var className = 'd-flex flex-column flex-grow-1 reset-container-margins widget-body';
183183

184184
if (this.props.chatwidget.get('mode') == 'widget') {
185185
className = className + (this.props.chatwidget.get('isMobile') == true ? ' mobile-body' : ' desktop-body');
186186
} else if (this.props.chatwidget.get('mode') == 'embed') {
187187
className = className + (this.props.chatwidget.get('isMobile') == true ? ' mobile-embed-body' : ' desktop-embed-body');
188+
} else {
189+
className = className + " popup-body";
188190
}
189191

190192
if (this.props.chatwidget.hasIn(['chat_ui','msg_expand']) && this.props.chatwidget.get('mode') == 'embed') {

lhc_web/modules/lhwidgetrestapi/settings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@
581581
$outputResponse['wv'] = 276;
582582

583583
// React APP versions
584-
$outputResponse['v'] = 420;
584+
$outputResponse['v'] = 421;
585585

586586
$cfg = erConfigClassLhConfig::getInstance();
587587

0 commit comments

Comments
 (0)