Plugin Directory

Changeset 3822100


Ignore:
Timestamp:
11/25/2026 06:14:03 AM (less than one hour ago)
Author:
webgrafia
Message:

Version 2.0.3: Replace Font Awesome with lightweight inline SVG icons

Location:
cheshire-cat-chatbot/trunk
Files:
2 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • cheshire-cat-chatbot/trunk/README.txt

    r3686652 r3822100  
    55Requires PHP: 7.4
    66Tested up to: 7.1
    7 Stable tag: 2.0.2
     7Stable tag: 2.0.3
    88License: GPLv3 or later
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
    … …  
    7070== Changelog ==
    7171
     72= 2.0.3 =
     73* Optimization: Removed Font Awesome CSS (~100KB) and webfonts in favor of lightweight inline SVG icons for significantly faster page loads.
     74
    7275= 2.0.2 =
    7376* Fix: WooCommerce single product pages now prioritize the deepest/most specific product category when inheriting predefined questions.
  • cheshire-cat-chatbot/trunk/assets/css/chat.css

    r3418551 r3822100  
    256256}
    257257
    258 #cheshire-chat-send i {
     258#cheshire-chat-send i,
     259#cheshire-chat-send svg {
    259260    pointer-events: none;
     261}
     262
     263.cheshire-icon {
     264    display: inline-block;
     265    vertical-align: middle;
     266    flex-shrink: 0;
     267}
     268
     269.cheshire-icon-spinner {
     270    animation: cheshire-spin 1s linear infinite;
     271}
     272
     273@keyframes cheshire-spin {
     274    from {
     275        transform: rotate(0deg);
     276    }
     277    to {
     278        transform: rotate(360deg);
     279    }
    260280}
    261281
  • cheshire-cat-chatbot/trunk/assets/js/chat.js

    r3686497 r3822100  
    77jQuery(document).ready(function ($) {
    88    'use strict';
     9
     10    var SEND_ICON_SVG = '<svg class="cheshire-icon cheshire-icon-send" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="1em" height="1em" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><polyline points="12 16 16 12 12 8"></polyline><line x1="8" y1="12" x2="16" y2="12"></line></svg>';
     11    var SPINNER_ICON_SVG = '<svg class="cheshire-icon cheshire-icon-spinner" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="1em" height="1em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 12a9 9 0 1 1-6.219-8.56"></path></svg>';
    912
    1013    /**
    … …  
    365368
    366369            // Re-enable the send button and restore the original icon
    367             $('#cheshire-chat-send').prop('disabled', false).html('<i class="far fa-arrow-alt-circle-right"></i>');
     370            $('#cheshire-chat-send').prop('disabled', false).html(SEND_ICON_SVG);
    368371        }
    369372
    … …  
    506509
    507510                    // Re-enable the send button and restore the original icon
    508                     $('#cheshire-chat-send').prop('disabled', false).html('<i class="far fa-arrow-alt-circle-right"></i>');
     511                    $('#cheshire-chat-send').prop('disabled', false).html(SEND_ICON_SVG);
    509512
    510513                    // Only display the complete message if we haven't just finished streaming
    … …  
    574577        // Disable the send button and change the icon to spinning
    575578        sendButton.prop('disabled', true);
    576         sendButton.html('<i class="fas fa-spinner fa-spin"></i>');
     579        sendButton.html(SPINNER_ICON_SVG);
    577580
    578581        // Clear the input field
    … …  
    659662                    // Re-enable the send button and restore the original icon
    660663                    sendButton.prop('disabled', false);
    661                     sendButton.html('<i class="far fa-arrow-alt-circle-right"></i>');
     664                    sendButton.html(SEND_ICON_SVG);
    662665
    663666                    if (response.success) {
    … …  
    676679                    // Re-enable the send button and restore the original icon
    677680                    sendButton.prop('disabled', false);
    678                     sendButton.html('<i class="far fa-arrow-alt-circle-right"></i>');
     681                    sendButton.html(SEND_ICON_SVG);
    679682
    680683                    // Handle AJAX error
    … …  
    802805
    803806    // Add icon to the send button
    804     $('#cheshire-chat-send').html('<i class="far fa-arrow-alt-circle-right"></i>');
     807    $('#cheshire-chat-send').html(SEND_ICON_SVG);
    805808
    806809    // Display predefined responses
  • cheshire-cat-chatbot/trunk/cheshire-cat-chatbot.php

    r3686652 r3822100  
    1212 * Plugin URI:        https://cheshirecat.ai/
    1313 * Description:       A WordPress plugin to integrate the Cheshire Cat AI chatbot, offering seamless conversational AI for your site.
    14  * Version:           2.0.2
     14 * Version:           2.0.3
    1515 * Author:            Marco Buttarini
    1616 * Author URI:        https://bititup.it/
    … …  
    3232
    3333// Define plugin constants.
    34 define( 'CHESHIRE_CAT_VERSION', '2.0.2' );
     34define( 'CHESHIRE_CAT_VERSION', '2.0.3' );
    3535define( 'CHESHIRE_CAT_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
    3636define( 'CHESHIRE_CAT_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
    … …  
    406406    }
    407407
    408     // Enqueue Font Awesome for icons.
    409     wp_enqueue_style(
    410         'font-awesome-css',
    411         CHESHIRE_CAT_PLUGIN_URL . 'assets/css/font-awesome/all.min.css',
    412         array(),
    413         $version
    414     );
    415 
    416408    // Add dynamic CSS based on user settings.
    417409    wp_add_inline_style( 'cheshire-chat-css', cheshirecat_generate_dynamic_css() );
    … …  
    478470        'cheshire-chat-css',
    479471        CHESHIRE_CAT_PLUGIN_URL . 'assets/css/chat.css',
    480         array(),
    481         $version
    482     );
    483 
    484     // Font Awesome is used by icons in the preview/chat UI
    485     wp_enqueue_style(
    486         'font-awesome-css',
    487         CHESHIRE_CAT_PLUGIN_URL . 'assets/css/font-awesome/all.min.css',
    488472        array(),
    489473        $version
    … …  
    564548    // Also set the page ID as a global JavaScript variable for backward compatibility
    565549    wp_add_inline_script('cheshire-chat-js', 'window.cheshire_page_id = ' . $current_page_id . ';', 'before');
    566 
    567     // Enqueue Font Awesome for icons.
    568     wp_enqueue_style(
    569         'font-awesome-css',
    570         CHESHIRE_CAT_PLUGIN_URL . 'assets/css/font-awesome/all.min.css',
    571         array(),
    572         $version
    573     );
    574550
    575551    // Add custom CSS for the playground
  • cheshire-cat-chatbot/trunk/inc/admin/style.php

    r3418553 r3822100  
    675675                                    <div id="cheshire-chat-header">
    676676                                        <button id="cheshire-chat-new" aria-label="New conversation" title="Start a new conversation" onclick="return false;">
    677                                             <i class="fas fa-plus"></i>
     677                                            <svg class="cheshire-icon cheshire-icon-plus" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="1em" height="1em" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>
    678678                                        </button>
    679679                                        <button id="cheshire-chat-close" aria-label="Close chat" onclick="return false;">
    680                                             <i class="fas fa-times"></i>
     680                                            <svg class="cheshire-icon cheshire-icon-close" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="1em" height="1em" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
    681681                                        </button>
    682682                                    </div>
    … …  
    695695                                    <div id="cheshire-chat-input-container">
    696696                                        <input type="text" id="cheshire-chat-input" placeholder="<?php echo esc_attr(get_option('cheshire_plugin_input_placeholder')); ?>">
    697                                         <button id="cheshire-chat-send" onclick="return false;"><i class="far fa-arrow-alt-circle-right"></i></button>
     697                                        <button id="cheshire-chat-send" onclick="return false;"><svg class="cheshire-icon cheshire-icon-send" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="1em" height="1em" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><polyline points="12 16 16 12 12 8"></polyline><line x1="8" y1="12" x2="16" y2="12"></line></svg></button>
    698698                                    </div>
    699699                                </div>
  • cheshire-cat-chatbot/trunk/inc/shortcodes.php

    r3617470 r3822100  
    5252        <div id="cheshire-chat-header">
    5353            <button id="cheshire-chat-new" aria-label="<?php esc_attr_e('New conversation', 'cheshire-cat-chatbot'); ?>" title="<?php esc_attr_e('Start a new conversation', 'cheshire-cat-chatbot'); ?>">
    54                 <i class="fas fa-plus"></i>
     54                <svg class="cheshire-icon cheshire-icon-plus" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="1em" height="1em" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>
    5555            </button>
    5656            <button id="cheshire-chat-close" aria-label="<?php esc_attr_e('Close chat', 'cheshire-cat-chatbot'); ?>">
    57                 <i class="fas fa-times"></i>
     57                <svg class="cheshire-icon cheshire-icon-close" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="1em" height="1em" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
    5858            </button>
    5959        </div>
Note: See TracChangeset for help on using the changeset viewer.