Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add single product page route/component to the marketplace #70

Merged
merged 18 commits into from
Jun 18, 2024

Conversation

wpalani
Copy link
Member

@wpalani wpalani commented May 31, 2024

Proposed changes

A new single product page component to show more details about a product (within the app) when users click on a secondary CTA of a supporting product or are redirected to the single product page route with a proper product page ID.

  • Brand plugins should consume the main component (index / <NewfoldMarketplace />) in their marketplace page instead of the one in the marketplace directory.
  • The main component will evaluate the location using React Router Dom's useMatch hook to determine which component to render (Product Page or Marketplace).
  • A loading skeleton is rendered while fetching content from the newly added product page API endpoint when the Product Page is loaded.
  • If the call is successful the API will return the HTML content of the Product Page template, which will be rendered as content.
  • If the call is not successful, We'll render the Error component to notify the user.

Demo

Secondary CTA:
marketplace-pp

Loading state:
lding-state

Error
err-state
state:

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)

Further comments

This PR aims to address part of this internal EPIC: https://jira.newfold.com/browse/PRESS0-441

@@ -31,6 +31,7 @@ jobs:
module-repo: ${{ github.repository }}
module-branch: ${{ needs.setup.outputs.branch }}
plugin-repo: 'bluehost/bluehost-wordpress-plugin'
plugin-branch: 'add/product-pages'
Copy link
Member

Choose a reason for hiding this comment

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

We'll need to remember to remove this line before merging or at least before tagging a release.

@wpalani wpalani merged commit 2d5064b into main Jun 18, 2024
1 of 6 checks passed
@wpalani wpalani deleted the add/product-pages branch June 18, 2024 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants