npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

test-react-chat-widget

v1.0.1

Published

This project is a React component to allow chat between a customer an an agent in the contact centre.

Downloads

1

Readme

test-react-chat-widget

This project is a React component to allow chat between a customer an an agent in the contact centre.

The contact centre uses EdgeTier chat which we interface with using a separate module containing a react hook. More information on how this works can be found on the edgetier-chat-hook.

The aim of this is to simplify how we add chat on to our pages, providing a consistent experience across UIs.

We also aim to automate as much as possible before sending a customer to a real contact centre agent, deflecting customers where appropriate to self serve pages to complete as many tasks as possible without intervention from our side.

The widget will also allow a customer to log in, display their bookings and contain quick links to manage my booking for those.

Widget Flow

The widget will show different "pages" based on the properties of the customer passed in.

If the customer is not logged in, it will prompt them to log in. There are two methods of logging in, email address and password, and magic login link.

If the customer is logged in and has no bookings, we will show links to the landing page or their account page.

If the customer is logged in and has bookings, we will display their bookings with links to amend them.

If the customer starts a chat, we will hide the bookings to allow the cc agent to take over.

Development

This project uses a demo page which can be used to test out changes which can be started with:

npm start

This will fire up a demo page at http://localhost:3000 which will live reload when changes are made.

The demo page provides mock functions which provide functionality which would usually be found in the application using the chat widget.

By default the demo page will not automatically communicate with EdgeTier. Instead a mock hook has been implemented which will reply to all messages after a short time delay. This prevents engineers from having to log in to chat interfaces just to develop the widget.

The widget can be tested against EdgeTier's pre-prod environment. This is useful when testing features which do not exist in our mock environment. To do this, start the demo page with

npm run start:preprod

Further documentation

Further documentation can be found in the /docs folder. Some of the more important documents are:

Project Layout

  • /public/ - This is purely to allow a demo application to be run for local development.
  • /src/ - This houses all of the code for the component.
  • /src/devTools - This folder is for any functionality which is not part of the core component, but will enhance the development experience.
  • /src/Widget.js - This is the entry point for the widget. This is what is built and exported.
  • /src/App.js - This is the entry point for the dev server. This is not part of the built bundle and is only for development purposes.