@friendemic/catalyst-chat-widget v0.3.1-next.1
DISTRIBUTION
NOTE:
public/index.htmlshould be updated to reflect changes toexample/snippet.html&example/snippet-example.html
See snippet.html for distribution snippet
TESTING A SPECIFIC VERSION
NOTE: Update the
app_idvalue insnippet.htmlto override the production Application
- Update snippet.html URLs to use a specific npm version
- Update
app_idto use the Staging enviornment
app_id: '70C5B4F2-A7CF-4BD6-81C4-68841DE927CC', // Staging
https://cdn.jsdelivr.net/npm/@friendemic/catalyst-chat-widget@1.2.3-next.4/build/static/css/main.css
https://cdn.jsdelivr.net/npm/@friendemic/catalyst-chat-widget@1.2.3-next.4/build/static/js/main.jsPUBLISHING
NOTE: See root README.md
MIGRATION
From version 0.2.6 => 0.2.8
All previous active systems should remain supported
Changes were made to ratain support for previous configuration techniques
New snippet looks like this:
<html>
<head>
<link rel="stylesheet" href="https://unpkg.com/@friendemic/catalyst-chat-widget@latest/build/static/css/main.css" />
</head>
<body>
<!-- place at bottom in root of <body /> element -->
<div id="friendemic_chat_widget" data-client-id="PLACE_ULID"></div>
<script src="https://unpkg.com/@friendemic/catalyst-chat-widget@latest/build/static/js/main.js"></script>
</body>
</html>- The
data-client-idhtml attribute contains the place ulid that identifies which configuration to load. - If
window.CS_WIDGET_CONFIGexists and the request to Glovebox fails, the window config object will be used. - If no configuration can be found, something has gone completely ✋🤧🤚 wonko and the widget will be hidden.
From version 0.2.* => 0.3.0
Minor bump due to refactor
<div id="friendemic_chat_widget" data-client-id="ULID"></div>System now uses data-client-id="ULID" falling back to window.CS_WIDGET_CONFIG if fetch to glovebox fails.
From version 0.2.* => 0.2.6
No action is required
Changes are set up to prepare for API, but allows for the previous systems to function
Updated the .env to state both prod and staging APP_IDs for sendbird:
REACT_APP_SENDBIRD_APP_ID_STAGING="" # applies in development enviornment
REACT_APP_SENDBIRD_APP_ID="" # applies during build for productionAdded new window variables
CS_WIDGET_CONFIG: Deprecated will be removedCS_CLIENT_ID: Currently a noop- Used in fetch to retrieve config from non-existent API
- If this has a value, it will fail and use
CS_WIDGET_CONFIGas a fallback
CS_WIDGET_MOCK:- Mock response from faked API, default timeout of 1000ms
window.CS_WIDGET_MOCK = false;
window.CS_CLIENT_ID = '';
window.CS_WIDGET_CONFIG = {};These options are attempted in order.
MOCK
- If
window.CS_WIDGET_MOCK - Uses the mocked API response
FETCH
- If
window.CS_CLIENT_IDexists, attempt to use it. - If the fetch fails, see if there's a
window.CS_WIDGET_CONFIG - If
window.CS_WIDGET_CONFIGdoes NOT exist -- don't render the widget
CONFIG
- If
window.CS_CLIENT_IDdoes NOT exist - Checks for a
window.CS_WIDGET_CONFIG - If
window.CS_WIDGET_CONFIGdoes NOT exist -- don't render the widget
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago