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

PDP Package.layout implementation #517

Closed
aaronjudd opened this issue Nov 12, 2015 · 1 comment
Closed

PDP Package.layout implementation #517

aaronjudd opened this issue Nov 12, 2015 · 1 comment
Assignees
Milestone

Comments

@aaronjudd
Copy link
Contributor

aaronjudd commented Nov 12, 2015

The goal of this feature is to allow repositioning (layout) of functional blocks on the PDP page, as well as the addition, removal and permission based viewing of blocks as necessary.

We'll need to refactor the Product Detail Page to use ReactionTemplates, using Packages.layout entries to define different product types and associate layout and templates with the PDP based on the product's Product.type entry.

This will make the PDP less rigid, and makes implementation much simpler for #152, #343, #330, #191, #368, #367, #443, #500, #516 , #225.

ProductDetail.html will become a layout loader page, essentially just:

{{#each reactionTemplate provides=product.type}}
    {{> Template.dynamic template=template}}
{{/each}}

and we add a new layout entry in register.js for the simple PDP layout:

 {
    template: "simpleProduct",
    label: "Simple Product",
    provides: "simple",
    audience: ["guest", "anonymous"]
  }

assuming type = simple, and where we've created a new product layout template:

<template name="simpleProduct">
  ...
  <div class="col-sm-7 pdp-right-column">
    {{#each reactionTemplate provides=product.type container="pdp-right-column"}}
        <div class="row">
            {{> Template.dynamic template=template}}
        </div>
    {{/each}}
    </div>
...
<template>

the individual blocks get moved into their own templates:

<template name="productDescription">
   <div class="product-description">
     {{> fieldComponent field="description" value=description type="textarea"}}
   </div>
</template>

The register.js will get a new layout entry for each PDP template:

 {
    template: "productDescription",
    label: "Description",
    container: "pdp-right-column",
    audience: ["guest", "anonymous"],
    position: "2"
  }
@aaronjudd
Copy link
Contributor Author

@mikemurray have you considered this during your updates.. let's discuss...

@aaronjudd aaronjudd modified the milestones: Product Management, v0.14.0 Jun 28, 2016
@aaronjudd aaronjudd added backlog and removed ready labels Jun 28, 2016
@aaronjudd aaronjudd modified the milestones: v0.15.0, Product Management, UI / UX Review Jul 21, 2016
@aaronjudd aaronjudd added ready and removed backlog labels Jul 21, 2016
@aaronjudd aaronjudd modified the milestones: v0.17.0, v0.19.0 Sep 21, 2016
@aaronjudd aaronjudd self-assigned this Sep 21, 2016
@aaronjudd aaronjudd modified the milestones: v0.17.0, v0.18.0 Oct 19, 2016
@aaronjudd aaronjudd removed their assignment Oct 20, 2016
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

No branches or pull requests

3 participants