Skip to content

Commit

Permalink
Merged PR 29263: 1.0.0 release prep
Browse files Browse the repository at this point in the history
- I've added a CHANGELOG because the README is already quite long.
- I've also added a package.json file to define the monorepo toolkit version.

Related work items: #143014, #143015
  • Loading branch information
sta1r committed Apr 28, 2021
1 parent 2898d72 commit 0167118
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# 1.0.0

### What's new
- Our initial release of extensions for Chat, Tracking and Email Capture.
70 changes: 69 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,72 @@
# dotdigital PWA Toolkit
[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](LICENSE.md)

This repository consists of a scaffolded Magento Venia store front project, together with a selection of components and extensions. We've provided a starting point for merchants and developers wishing to integrate features from our existing Magento modules into a PWA store front.
This repository provides a starting point for merchants and developers wishing to integrate features from our existing Magento modules into a [Venia storefront](https://github.com/magento/pwa-studio#venia) project.

Our extensions are only compatible with Venia; however, we hope they offer useful examples to developers integrating into other kinds of PWA frameworks.

So far, we’ve demonstrated how to integrate Chat, Tracking and Email Capture (see [Our extensions](#our-extensions) below). Future releases will deliver additional packages.

## Setup

As a minimum, you will need:

- a functioning Venia storefront, installed as per Magento’s [instructions](https://magento.github.io/pwa-studio/tutorials/)
- a Magento instance with the dotdigital integration enabled
- to install one or more of our Magento GraphQl modules (see below)

## Using our extensions

Our extensions are published separately to NPM. If you wish to use our code as is, you can add these extensions using yarn, for example:

yarn add @dotdigital/pwa-studio-tracking

### Overriding Venia

In our extensions, we’ve used PWA Studio’s [Targets and Targetables](https://magento.github.io/pwa-studio/pwa-buildpack/extensibility-framework/) to demonstrate how to extend your storefront using our code. We’ve made certain decisions about how to target and override the Venia component tree. If these don’t suit your project, you can copy our code and use pieces of it as you need.

### GraphQl

We have two GraphQl modules that support our extensions:

- [dotmailer/dotmailer-magento2-extension-graph-ql](https://github.com/dotmailer/dotmailer-magento2-extension-graph-ql/) (required for tracking and email-capture)
- [dotmailer/dotmailer-magento2-extension-chat-graph-ql](https://github.com/dotmailer/dotmailer-magento2-extension-chat-graph-ql/) (required for chat)


## Our extensions

### Chat
@dotdigital/chat adds:

- a component to deliver the chat widget
- a sign-in wrapper to update the chat profile after a customer signs in to their account

The widget will only display if Chat is enabled in Magento.

### Email Capture
@dotdigital/email-capture adds:

- a `NewsletterSignup` component. This subscribes email addresses exactly as per regular Magento; our module in Magento picks up the submission and handles the data from there. If a guest cart exists, we’ll attempt to update the quote table with the email address at submit.
- a `handleBlur` prop for the `GuestForm` component. This adds an onBlur handler to capture an email address at guest checkout.

Easy Email Capture in both contexts respects the settings in **Stores > Configuration > dotdigital > Configuration > Abandoned Carts**.

### Tracking
Our @dotdigital/pwa-studio-tracking extension will add the following types of tracking:

- Page Tracking
- ROI Tracking
- Web Behavior Tracking

Tracking scripts will only be added if the required configuration settings are enabled in Magento (see **Stores > Configuration > dotdigital > Configuration > Tracking**).

[User identification](https://support.dotdigital.com/hc/en-gb/articles/219045108-Install-Web-behavior-tracking) is currently implemented in the @dotdigital/pwa-studio-email-capture extension.


## Contribution

We welcome contributions to this toolkit. You may wish to:

- [Report a bug](https://github.com/dotmailer/ec-magento-pwa-toolkit/issues): create a GitHub issue including description, repro steps, Magento and extension version numbers
- [Fix a bug](https://github.com/dotmailer/ec-magento-pwa-toolkit/pulls): please clone and use our develop branch to submit your pull request
- Request a feature on our [roadmap](https://r1.dotdigital-pages.com/p/35E-386/the-engagement-cloud-roadmap)
8 changes: 4 additions & 4 deletions extensions/chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"url": "https://github.com/dotmailer/ec-magento-pwa-toolkit/issues"
},
"peerDependencies": {
"@apollo/client": "^3.3.11",
"@magento/peregrine": "^9.0.0",
"@magento/pwa-buildpack": "^8.0.1",
"@magento/venia-ui": "^6.0.1",
"@apollo/client": "^3.1.2",
"@magento/peregrine": "^10.0.0",
"@magento/pwa-buildpack": "^9.0.0",
"@magento/venia-ui": "^7.0.0",
"react": "^17.0.2"
},
"pwa-studio": {
Expand Down
8 changes: 4 additions & 4 deletions extensions/email-capture/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"url": "https://github.com/dotmailer/ec-magento-pwa-toolkit/issues"
},
"peerDependencies": {
"@apollo/client": "^3.3.11",
"@magento/peregrine": "^9.0.0",
"@magento/pwa-buildpack": "^8.0.1",
"@magento/venia-ui": "^6.0.1",
"@apollo/client": "^3.1.2",
"@magento/peregrine": "^10.0.0",
"@magento/pwa-buildpack": "^9.0.0",
"@magento/venia-ui": "^7.0.0",
"react": "^17.0.2"
},
"pwa-studio": {
Expand Down
6 changes: 3 additions & 3 deletions extensions/tracking/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"url": "https://github.com/dotmailer/ec-magento-pwa-toolkit/issues"
},
"peerDependencies": {
"@apollo/client": "^3.3.11",
"@magento/peregrine": "^9.0.0",
"@magento/pwa-buildpack": "^8.0.1",
"@apollo/client": "^3.1.2",
"@magento/peregrine": "^10.0.0",
"@magento/pwa-buildpack": "^9.0.0",
"@magento/venia-ui": "^7.0.0",
"react": "^17.0.2"
},
Expand Down
15 changes: 15 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "@dotdigital/ec-magento-pwa-toolkit",
"version": "1.0.0",
"description": "A toolkit for merchants integrating dotdigital's Magento modules in a Venia PWA storefront.",
"private": true,
"author": "dotdigital",
"license": "MIT",
"workspaces": [
"extensions/*"
],
"repository": "github:dotmailer/ec-magento-pwa-toolkit",
"bugs": {
"url": "https://github.com/dotmailer/ec-magento-pwa-toolkit/issues"
}
}

0 comments on commit 0167118

Please sign in to comment.