Skip to content
This repository has been archived by the owner on Jan 30, 2025. It is now read-only.

Feature - eCommerce #174

Merged
merged 5 commits into from
Aug 16, 2022
Merged

Feature - eCommerce #174

merged 5 commits into from
Aug 16, 2022

Conversation

aulisius
Copy link
Contributor

@aulisius aulisius commented Jul 29, 2022

Proposed changes

This adds the eCommerce module to the plugin. Users of the plugin who are the on the eCommerce plans will be redirected to the new dashboard instead of the current /home/onboarding screens.

Type of Change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • Linting and tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Pending Items

  • Brand specific CSS tokens can be loaded via the module itself.

package.json Outdated
@@ -13,6 +13,7 @@
"author": "David Ryan <dryanpress@chat.wordpress.org>",
"license": "GPL-2.0-or-later",
"dependencies": {
"@newfold-labs/wp-module-ecommerce": "newfold-labs/wp-module-ecommerce#v0.2.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What exactly is this dependency referencing? I see the module package.json points to dist/index.js (https://github.com/newfold-labs/wp-module-ecommerce/blob/trunk/package.json#L7), but that doesn't exist in the repo and I don't see any packages released (https://github.com/newfold-labs/wp-module-ecommerce/packages).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npm lets you specify git sources as package url. You can refer to the npm install documentation for more details.

npm does the following things for the given package

"@newfold-labs/wp-module-ecommerce": "newfold-labs/wp-module-ecommerce#v0.2.0"
  • Search for newfold-labs/wp-module-ecommerce repo on GitHub
  • Check if repo has a commit ref or tag with the value v0.2.0
  • Download code from that commit
  • Check if downloaded package.json file has a prepare script.
  • Trigger the prepare script
  • Clean up remaining files based on what files targets in package.json

In our case, the prepare script triggers the commands to produce the dist/ folder which contains the needed build artifacts.

src/app/store/selectors.js Outdated Show resolved Hide resolved
Copy link
Member

@wpscholar wpscholar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aulisius I've created a new feature/e-commerce branch in the main Bluehost repo. I've already merged the latest version of master into that branch. Since we've recently updated to a new version of React Router DOM, there may be an issue with the e-commerce onboarding page not loading (I couldn't see any of the new functionality except the "Site Status" in the admin bar).

So, here are a few things to do:

  • Convert this PR to a draft
  • Pull down the latest changes from the Bluehost feature/ecommerce branch to your local feature/ecommerce branch.
  • Update your PR to merge into the Bluehost feature/ecommerce branch instead of master.
  • Look into why the e-commerce onboarding page isn't displaying
  • Update the README.md to include what steps are required to trigger the e-commerce onboarding flow from a development perspective. For example, making sure the install date is a particular value, the database information for plan type is set, etc.
  • Update the DTS build to use wp-scripts
  • Address any remaining TODOs in the code (I'm seeing this)
  • Tag a new release of the e-commerce module once you're done making changes
  • Update the e-commerce module version in the Bluehost plugin
  • Move this PR from draft to ready for review

@aulisius
Copy link
Contributor Author

@wpscholar regarding Update the DTS build to use wp-scripts, Does wp-scripts let you emit libraries instead of generated bundles that require to be loaded separately by PHP?

@aulisius aulisius marked this pull request as draft August 12, 2022 12:50
@wpscholar
Copy link
Member

@aulisius Correct.

Here is the documentation for wp-scripts: https://developer.wordpress.org/block-editor/reference-guides/packages/packages-scripts/

@aulisius aulisius changed the base branch from master to feature/ecommerce August 12, 2022 18:36
@aulisius aulisius marked this pull request as ready for review August 12, 2022 19:02
@0aveRyan 0aveRyan merged commit f9dc696 into bluehost:feature/ecommerce Aug 16, 2022
@aulisius aulisius deleted the feature/ecommerce branch August 16, 2022 23:54
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants