Giter VIP home page Giter VIP logo

front-commerce-lite-upward's People

Contributors

aloross avatar erochongit avatar hihuz avatar jahvi avatar julienpradet avatar real34 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jahvi

front-commerce-lite-upward's Issues

Add SSR for product page… and others?

The goal here is to backport the UPWARD based routing system based on the remote urlResolver to allow the product page to be accessed directly without any errors.

It should display a product specific app shell (similar to https://github.com/magento-research/pwa-studio/blob/release/2.0/packages/venia-concept/templates/product-shell.mst for instance), ideally with a JSON-LD template.

Example: https://front-commerce-lite-upward.now.sh/product/SHOE-01 must not return an error (since the page works when accessed from the HP).

In the end, this issue might allow to explore page polymorphism and be easily extensible to other type of Things.

It also is a good first step to start working on interoperability across PWA solutions.

Resources which may help

See: https://github.com/magento-research/pwa-studio/blob/981eda64fd1ce197131f10c906e3c35ada11db8c/packages/venia-concept/venia-upward.yml#L74

In Front-Commerce, the query is:

{
  matchUrls(url: "hera-pullover-hoodie.html") {
    url
    type
    identifier
    target_path
    redirect_type
  }
  categoryUrl: matchUrls(url: "women/tops-women.html") {
    url
    type
    identifier
    target_path
    redirect_type
  }
}

https://demo.front-commerce.com/graphiql?query=%7B%0A%20%20matchUrls(url%3A%20%22hera-pullover-hoodie.html%22)%20%7B%0A%20%20%20%20url%0A%20%20%20%20type%0A%20%20%20%20identifier%0A%20%20%20%20target_path%0A%20%20%20%20redirect_type%0A%20%20%7D%0A%20%20categoryUrl%3A%20matchUrls(url%3A%20%22women%2Ftops-women.html%22)%20%7B%0A%20%20%20%20url%0A%20%20%20%20type%0A%20%20%20%20identifier%0A%20%20%20%20target_path%0A%20%20%20%20redirect_type%0A%20%20%7D%0A%7D

Note: I think Magento2 does not handle 301 redirection yet, and that is something that might need to be discussed in the PWA Studio issues to find a way to redirect people (doable in the resolver directly without any changes, but it may lead to updates in the UPWARD spec to ensure it does not cause issues during the resolution)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.