Code Monkey home page Code Monkey logo

cornerstone's Introduction

Cornerstone

tests

Stencil's Cornerstone theme is the building block for BigCommerce theme developers to get started quickly developing premium quality themes on the BigCommerce platform.

Stencil Utils

Stencil-utils is our supporting library for our events and remote interactions.

JS API

When writing theme JavaScript (JS) there is an API in place for running JS on a per page basis. To properly write JS for your theme, the following page types are available to you:

  • "pages/account/addresses"
  • "pages/account/add-address"
  • "pages/account/add-return"
  • "pages/account/add-wishlist"
  • "pages/account/recent-items"
  • "pages/account/download-item"
  • "pages/account/edit"
  • "pages/account/return-saved"
  • "pages/account/returns"
  • "pages/account/payment-methods"
  • "pages/auth/login"
  • "pages/auth/account-created"
  • "pages/auth/create-account"
  • "pages/auth/new-password"
  • "pages/blog"
  • "pages/blog-post"
  • "pages/brand"
  • "pages/brands"
  • "pages/cart"
  • "pages/category"
  • "pages/compare"
  • "pages/errors"
  • "pages/gift-certificate/purchase"
  • "pages/gift-certificate/balance"
  • "pages/gift-certificate/redeem"
  • "global"
  • "pages/home"
  • "pages/order-complete"
  • "pages/page"
  • "pages/product"
  • "pages/search"
  • "pages/sitemap"
  • "pages/subscribed"
  • "pages/account/wishlist-details"
  • "pages/account/wishlists"

These page types will correspond to the pages within your theme. Each one of these page types map to an ES6 module that extends the base PageManager abstract class.

    export default class Auth extends PageManager {
        constructor() {
            // Set up code goes here; attach to internals and use internals as you would 'this'
        }
    }

JS Template Context Injection

Occasionally you may need to use dynamic data from the template context within your client-side theme application code.

Two helpers are provided to help achieve this.

The inject helper allows you to compose a JSON object with a subset of the template context to be sent to the browser.

{{inject "stringBasedKey" contextValue}}

To retrieve the parsable JSON object, just call {{jsContext}} after all of the {{@inject}} calls.

For example, to setup the product name in your client-side app, you can do the following if you're in the context of a product:

{{inject "myProductName" product.title}}

<script>
// Note the lack of quotes around the jsContext handlebars helper, it becomes a string automatically.
var jsContext = JSON.parse({{jsContext}}); // jsContext would output "{\"myProductName\": \"Sample Product\"}" which can feed directly into your JavaScript

console.log(jsContext.myProductName); // Will output: Sample Product
</script>

You can compose your JSON object across multiple pages to create a different set of client-side data depending on the currently loaded template context.

The stencil theme makes the jsContext available on both the active page scoped and global PageManager objects as this.context.

Polyfilling via Feature Detection

Cornerstone implements this strategy for polyfilling.

In templates/components/common/polyfill-script.html there is a simple feature detection script which can be extended to detect any recent JS features you intend to use in your theme code.

If any one of the conditions is not met, an additional blocking JS bundle configured in assets/js/polyfills.js will be loaded to polyfill modern JS features before the main bundle executes.

This intentionally prioritizes the experience of the 90%+ of shoppers who are on modern browsers in terms of performance, while maintaining compatibility (at the expense of additional JS download+parse for the polyfills) for users on legacy browsers.

Static assets

Some static assets in the Stencil theme are handled with Grunt if required. This means you have some dependencies on grunt and npm. To get started:

First make sure you have Grunt installed globally on your machine:

npm install -g grunt-cli

and run:

npm install

Note: package-lock.json file was generated by Node version 18 and npm version 9. The app supports Node 18 as well as multiple versions of npm, but we should always use those versions when updating package-lock.json, unless it is decided to upgrade those, and in this case the readme should be updated as well. If using a different version for node OR npm, please delete the package-lock.json file prior to installing node packages and also prior to pushing to github.

If updating or adding a dependency, please double check that you are working on Node version 18 and npm version 9 and run npm update <package_name> or npm install <package_name> (avoid running npm install for updating a package). After updating the package, please make sure that the changes in the package-lock.json reflect only the updated/new package prior to pushing the changes to github.

Icons

Icons are delivered via a single SVG sprite, which is embedded on the page in templates/layout/base.html. It is generated via a grunt task grunt svgstore.

The task takes individual SVG files for each icon in assets/icons and bundles them together, to be inlined on the top of the theme, via an ajax call managed by svg-injector. Each icon can then be called in a similar way to an inline image via:

<svg><use xlink:href="#icon-svgFileName" /></svg>

The ID of the SVG icon you are calling is based on the filename of the icon you want, with icon- prepended. e.g. xlink:href="#icon-facebook".

Simply add your new icon SVG file to the icons folder, and run grunt svgstore, or just grunt.

License

(The MIT License) Copyright (C) 2015-present BigCommerce Inc. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

cornerstone's People

Contributors

bc-alexsaiannyi avatar bc-chris-roper avatar bc-jz avatar bc-ravijayaramappa avatar bc-svc-local avatar bc-tymurbiedukhin avatar bc-vlad-dlogush avatar bc-williamkwon avatar bc-yevhenii-buliuk avatar bookernath avatar christensenep avatar davidchin avatar dependabot[bot] avatar haubc avatar hegrec avatar jairo-bc avatar jbruni avatar johnhebron avatar junedkazi avatar mattolson avatar mcampa avatar meenie avatar mjschock avatar pascalzajac avatar sacr3dc0w avatar sandeepgraju avatar sherrybc avatar sitaggart avatar ubersmake avatar yurytut1993 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cornerstone's Issues

List View - Description - Fix Special Characters and Line Returns

Great to have a List View now, thanks (fixed in STENCIL-3194) - I've just activated it in our test store.

You can see from the below screenshot that special characters are not displaying correctly. Not using the H4 formatting is probably OK, but the line returns should be acknowledged - if not as returns, then with some kind of separator.

image

Second screenshot shows what that description looks like on the Product page with all of its formatted text intact. (Note - the product name "Kiwi Shoe Polish GSG" is further up the page offscreen in this screenshot, but it is displaying OK.)

image

All screenshots from Win10/Chrome.

Styling for checkout page (Checkout Type: One-page checkout).

Today, I noticed that checkout page doesn't showing any changes when i editing in the checkout.css file.
It still showing styles of the Big Commerce.
I have view source code then i see <link href="/stencil/theme/1/css/checkout.css" type="text/css" rel="stylesheet"> but this file is empty.
Is there a way to fix this?

Issue with Google recaptcha api script

Hello,

I am facing issue with the stencil theme, when enabling Captcha from the admin. we are getting random code in top of the product detail page. I found issue with script loding on product detail page for Recaptcha API.

error

<script type="text/javascript" src="http://cdn6.bigcommerce.com/r-a2832a4688ce29764def846020ed5b29c4ced5ef/<script src="https://www.google.com/recaptcha/api.js" async defer></script>?cf708"></script>

Let me know anyone has a solution for this.

Thanks,
Minank Mori

Linking to IDs in tabbed sections do not open those tabs

Expected behavior

Visiting http://cornerstone-light-demo.mybigcommerce.com/all/orbit-terrarium-large/#tab-similar should open the #tab-similar section automatically.

Actual behavior

Site scrolls to the reviews section, but does not open the tab.

Steps to reproduce behavior

Visit http://cornerstone-light-demo.mybigcommerce.com/all/orbit-terrarium-large/#tab-similar
page will not open #tab-similar section

See http://arcade-natural-demo.mybigcommerce.com/trekking-axe-classic/#product-tab-information for a working demo.

See http://partswarehouse-classic-demo.mybigcommerce.com/heater-bypass-hose-tube/#tab-similarProducts for another non-working demo.

Notes

This would be really handy for bookmarking purposes and linking from other pages to specific sections in tabs.

API v3 Category Images / Metadata not showing up in Stencil

I used the v3 api createCategoryImage call to successfully upload a category image, but when I view the category page locally using ?debug=bar, the image for the category still shows as null. Is there any way to access these images apart from the api?

On a related question, I have created category metadata using the v3 api, but see no way to access this information via stencil. Is this something on the roadmap for a future release? Being able to use the new metadata fields when rendering pages would help overcome many of the current limitations of the Bigcommerce platform.

Mobile Menu

BC Team, I am not sure of this is something with our store setup.. After bootstrapping the Stencil development environment and starting the local dev server, the mobile menu of the default Stencil theme appears to be broken or empty. How do we populate that menu?

Quick view options applying to product display page options

Expected behavior

When using the quick view pop up, I expect to see the options selected inside the quick view modal.

Actual behavior

The options aren't showing as selected in the quick view modal. Instead, they select the options inside the product display page that the modal is displaying over.

Steps to reproduce

  1. Go to a product detail page on a product with options (size and color)
  2. Click "quick view" on one of the related products
  3. While in the quick view modal, choose a product option. That option will not show as selected in quick view. When you return to the product display page, the option selected in quick view will apply to product detail page.

Please check and fix this asap.

Handlebars command causes pages to timeout

Expected behavior

This command:

{{occurrences '|default|product|blog_post|' (concat page_type '|')}}
Should detect if the page is of one of the page types.

Actual behavior

it causes the page to time out.

Steps to reproduce behavior

Add the command to a page and then view it.

Note that these commands work fine:

{{occurrences '|default|product|blog_post|' page_type}}

{{concat page_type '|'}}

It only happens when they are combined.

Fixing Carousel Next Prev Buttons

For desktop and mobile the next and prev buttons are not centered. In /assets/scss/components/vendor/slick/_slick.scss if you remove margin-top: -(remCalc(30px)); at line 25 and in /assets/scss/components/stencil/heroCarousel/_heroCarousel.scss just make .slick-next, .slick-prev "top: 50%;" for both views it will fix that issue for ocd people like me.

Featured Products causing significant slow-down in page load times

Expected behavior

In the past (as of last week), even having 500+ Featured Products did not cause a significant drain on the system; our homepage load was still taking 1-2 seconds.

Actual behavior

Presumably due to some change in the stencil Featured Products and either the amount of information being pulled for Featured Products, or the way in which that information is being pulled from the database, we experienced a MASSIVE slow-down on Monday, where it would take 12-15 seconds for our homepage to load.

Steps to reproduce behavior

Add a significant number (300+) of Featured Products to the homepage, and you should be able to see a big slow-down on page load speed. For the time being we've cut our total Featured Products, but this limitation and temporary solution does not support our business model.

Something changed between last week and this week, and it's having a SIGNIFICANT impact on bandwidth.

Specs Tab

Just` a crazy idea I did if people are interested for their stuff as well. You can take the product.custom_fields and turn it into a specs tab for your site.

...
{{#if product.custom_fields}}
<li class="tab">
<a class="tab-title" href="#tab-spec">Specifications</a>
</li>
{{/if}}
...
{{#if product.custom_fields}}
<div class="tab-content" id="tab-spec">
<dl class="productView-info">
{{#each product.custom_fields}}
<p><b>{{name}}</b> {{{value}}}</p>
{{/each}}
</dl>
</div>{{/if}}

Font Question

Really noob question, but does the clearsans webfont.woff files have all the Sans Serif Google Fonts or just the 3 listed in the schema.json file? Sorry for the question, just trying to understand the system.

Feature Request: Addition of front-matter boolean products:summary attribute

I noted in another post that we were having load time issues on our homepage, and that the issue is very specifically being caused by the number of featured products we have.

We had almost the exact same problem last year when we first loaded our entire category tree onto our site (over 400 parent categories)... It turned out the categories:description field was causing considerable strain on the system. Fortunately, the Stencil engineers were able to resolve this crippling issue by adding a categories:description boolean option to front-matter. For reference, here's the specific update from the stencil release notes:

2016-04-22: A new front-matter attribute named categories:description is available. This boolean's value indicates whether to dynamically retrieve category descriptions.

We are now experience a very similar problem with featured products, and I believe the "summary" field is the most likely culprit. If we had the option to disable the products:summary field in front-matter, similar to disabling categories:description, I believe this would not only fix our problem, but put considerably less strain on Bigcommerce's servers across the board.

At a minimum, please acknowledge that this request will or won't be considered, as this is a MAJOR problem for us right now, and I'm not getting anywhere with imparting the urgency to tech support.

tabs on product pages sometimes produce javascript errors (when loading non-cached theme-bundle.js)

Expected behavior

Clicking on the tab items should switch views to that particular item.

Actual behavior

Produces two types of javascript errors
Uncaught TypeError: Cannot read property 'is_hover" of undefined
Uncaught TypeError: Cannot read property 'deep_linking" of undefined
image

These javascript errors prevents the various tabs from displaying their content.

Steps to reproduce behavior

  1. Open incognito mode of a browser, open inspect console window
  2. Goto http://cornerstone-light-demo.mybigcommerce.com/all/hand-salve/
  3. Click the tabbed item 'Customers Also Viewed'

This is an intermittent issue that produces errors in console, as seen in screen shot. Some page refreshes issue happens, other times it does not.

Chrome Version Information
Version 57.0.2987.133

I've also experience this on my own custom theme using the Cornerstone theme as a base.

List View - Reinstate Quick View

Great to have a List View now, thanks (fixed in STENCIL-3194) - I've just activated it in our test store.

There is no 'Quick View' though.

Screenshot below from the Brands page, but is similar on Search and Categories pages.

image

Second screenshot is from grid view, with mouseover offering [Quick View] and [Choose Options].

image

All screenshots from Win10/Chrome.

Order History doesn't look right in Firefox

Expected behavior

Open firefox, go to /account.php?action=order_status and login. You should see your orders with an image next to each order's details.

Actual behavior

The details for each order overlaps each order's image.

Steps to reproduce behavior

Make sure the installed theme is Cornerstone Light Version 1.10.0. I haven't checked other versions or other styles.

I think this may have been caused by the changes from #1104

Unmet peer dependencies

I tried installing the following UNMET PEER DEPENDENCIES globally, but still seeing these errors. Please help. For more see https://stackoverflow.com/questions/44188937/cannot-find-module-eslint-config-airbnb-base-on-bigcommerce-stencil-bundle.

➜  cornerstone git:(master) ✗ npm ls --depth=0
[email protected] /Users/abrambailey/bigcommerce/cornerstone
├── @bigcommerce/[email protected]
├── @bigcommerce/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── UNMET PEER DEPENDENCY [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── UNMET PEER DEPENDENCY [email protected]
├── [email protected] extraneous
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] (git://github.com/vakata/jstree.git#1dd7de3b742c20452ef86ea245e779f5a3aa68eb)
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] (git://github.com/hubspot/pace.git#a03f1f1de62c9cea6c88b2267b8d7a83858b6cb6)
├── UNMET PEER DEPENDENCY phantomjs-prebuilt@>=1.9
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

npm ERR! peer dep missing: eslint@^2.4.0, required by [email protected]
npm ERR! peer dep missing: eslint-plugin-react@^4.2.3, required by [email protected]
npm ERR! peer dep missing: phantomjs-prebuilt@>=1.9, required by [email protected]
npm ERR! extraneous: [email protected] /Users/abrambailey/bigcommerce/cornerstone/node_modules/express

Can we please get truncate from handlebars-helpers?

I noticed that there is no way to pull head.meta_tags.description and the description is buried in the meta_tags as html. Can you either add a description attribute that we can reference, or add truncate so we can generate it ourselves using truncate and sanitize from the blog post body? I'm trying to build some Twitter card data, and unfortunately this is impossible with the provided tools.

Creating custom breakpoints

I am trying to create a custom breakpoint for the header so the mobile menu will trigger sooner. Is there another file I need to update to add in another breakpoint?

I have edited the following files:

_header.scss

breakpoint("medium") - changed to breakpoint("menu")

_screensizes.scss

added - $screen-menu: 90em;

media-query-list.js

added - menu: 90, to breakpointSizes.

submit button send an email to email address

I am a web developer / programmer. I am currently converting our website from blueprint to stencil. I am trying to add a custom page with a custom Form and add the php file, so it will generate an email with the form inputs upon form submission. I don’t want to use a third party company. Can you please let me know where should I put the php file in Stencil CLI, so it would work with our new Stencil theme.

onLoad() functions for page type javascript

At the moment, each of the page type javascript files are being imported into the app.js file. And then in the callback for the System.import() it is firing the exported default function based on what page type is being rendered.

It's not apparent that if you don't put your code inside of that exported function, it will always run on every page, regardless if it's the actual page type. We need some sort of abstract class that each of these can extend with methods they can override to run code at different times. This will make it crystal clear when code is running and when it isn't.

Pinging @mickr, @mcampa, @haubc, @christopher-hegre

Display bug when adding too many product swatches on a mobile device

Hi. This is my first post here but I've been following the cornerstone project for a number of months.

I think I've found a bug when a product has too many swatches and/or if the size of the swatches are too big.

Expected behavior

https://i.imgur.com/ggXrfBt.jpg

Actual behavior

https://i.imgur.com/HZeiRig.jpg

Steps to reproduce behavior

Change the default swatch size from the current 22px wide by 22px high, to a larger size of 50px by 50px. Then add 16 or more swatches to a product. Then view that product on a mobile device. The result is the page format/layout will display incorrectly by adding extra white space to the right hand side. For a working example see this link: https://www.nameitlabels.com/stick-on-name-labels/

It's hard to track submission of the contact form

Expected behavior

When someone submits the contact form it should be possible to track that submission in systems like Google Analytics. Even better if we can track the funnel flow of a submission attempt to analyse what issues people have.

Actual behavior

The contact form is a single page powered by JavaScript. There is no simple way to detect if the form has been submitted.

Steps to reproduce behavior

Submit a contact form.

Possible solution 1

Provide some ways to hook into events that happen while submitting a form. e.g. submission errors, captcha failures and then final success.

Possible solution 2

I've developed some JavaScript to detect changes in the page and trigger Google Analytics events on submissions and displaying errors.

To make it work I need to edit some of the theme files by adding ids to some elements. It would be a lot nicer if I did not need to edit the themes. My notes:

The contact-us-page and contact-us-success ids need adding to templates/pages/contact-us.html. e.g.

{{#if forms.contact.success}}
{{{lang 'forms.contact_us.successful' shopPath=urls.home}}}
{{ else}}

{{{page.content}}}

{{> components / page / contact - us - form}} {{/if}}

contact-us-error needs adding to templates/components/contact-us-form.html. Dynamic validation avoids this, but the captcha triggers it

{{ #if forms.contact.error}}

{{> components / common / alert - error forms.contact.error}}
{{/if}}

Parentheses in faceted search field name breaks "Show More"

Expected behavior

When Show More is clicked on a faceted search list, it should pop up and, indeed, show those option values which are not visible. Additionally, a faceted search list should collapse upon its title being clicked.

Actual behavior

If there is a parenthesis in the faceted search list name, an error is printed to the console:

Unhandled promise rejection 
Error: Syntax error, unrecognized expression: #facetedSearch-content--NAME-WITH-(PARENS)

And nothing happens when you click "Show More", or if you click on the name of the faceted search list.

Steps to reproduce behavior

On an account with Faceted Search enabled, in Products > Product Options create an option with more than 6 values and a parenthesis in the name, add it to an option set, and apply that option set to a product. Go to Products > Product Filtering and turn on product filtering for that option, with a display limit of 5 (found under the Settings expansion). Go the category that contains this product, and click the "Show More" toggle. Nothing will happen. Click the option name to collapse the faceted search list. Nothing will happen.

Other thoughts

My guess is that this is caused by parentheses not being allowed in HTML ID attributes. The current ID is generated by calling the Handelbars helper "hyphenate" on the name of the option, which does not remove parentheses. I would suggest either an added optional flag to the hyphenate function to remove parentheses, or an alternate function to do both hyphenation and removal of parentheses, but perhaps there are more elegant solutions.

Feature Request: On category page object, add "parent categories" array

Expected behavior

ability to obtain parent categories from the category page object or product page object

Actual behavior

parent categories not available in the category or product page object

Steps to reproduce behavior

More Info:

In general - the current objects for category navigation are good for rebuilding the entire category menu, but it is difficult to do things based on the current page, category or product.

It would help if you all could add a little more information to the objects. On a category page ("page_type": "category"), in the category object, you now have a "subcategories" array. If you could also add a "parent categories" array, then it would be easier to style the navigation based on the current category.

Similarly, on a product page ("page_type": "product"), if you could add "parent categories" to the product object, it would be easier to create functionality based on the categories to which the product belongs.

See also: https://forum.bigcommerce.com/s/question/0D51B00003vx3fDSAQ/displaying-the-parent-categories-on-a-subcategory-page

Thanks,

gb

pagination issue, not working on localhost:3000

Expected behavior

when opening a category page, clicking page 2 should show next products.

Actual behavior

showing

{"statusCode":500,"error":"Internal Server Error","message":"An internal server error occurred"}

Under logs here is the error
[BS] Reloading Browsers...
Debug: internal, implementation, error
Error: Error: Response Error: 404 Not Found
at /usr/local/lib/node_modules/@bigcommerce/stencil-cli/server/plugins/renderer/renderer.module.js:46:31
at /usr/local/lib/node_modules/@bigcommerce/stencil-cli/server/plugins/renderer/renderer.module.js:220:28
at read (/usr/local/lib/node_modules/@bigcommerce/stencil-cli/node_modules/wreck/lib/index.js:530:24)
at finish (/usr/local/lib/node_modules/@bigcommerce/stencil-cli/node_modules/wreck/lib/index.js:350:20)
at wrapped (/usr/local/lib/node_modules/@bigcommerce/stencil-cli/node_modules/wreck/node_modules/hoek/lib/index.js:875:20)
at onReaderFinish (/usr/local/lib/node_modules/@bigcommerce/stencil-cli/node_modules/wreck/lib/index.js:421:16)
at g (events.js:292:16)
at emitNone (events.js:91:20)
at emit (events.js:185:7)
at finishMaybe (_stream_writable.js:512:14)
at endWritable (_stream_writable.js:522:3)
at Writable.end (_stream_writable.js:487:5)
Debug: internal, implementation, error
Error: Error: Response Error: 404 Not Found
at /usr/local/lib/node_modules/@bigcommerce/stencil-cli/server/plugins/renderer/renderer.module.js:46:31
at /usr/local/lib/node_modules/@bigcommerce/stencil-cli/server/plugins/renderer/renderer.module.js:220:28
at read (/usr/local/lib/node_modules/@bigcommerce/stencil-cli/node_modules/wreck/lib/index.js:530:24)
at finish (/usr/local/lib/node_modules/@bigcommerce/stencil-cli/node_modules/wreck/lib/index.js:350:20)
at wrapped (/usr/local/lib/node_modules/@bigcommerce/stencil-cli/node_modules/wreck/node_modules/hoek/lib/index.js:875:20)
at onReaderFinish (/usr/local/lib/node_modules/@bigcommerce/stencil-cli/node_modules/wreck/lib/index.js:421:16)
at g (events.js:292:16)
at emitNone (events.js:91:20)
at emit (events.js:185:7)
at finishMaybe (_stream_writable.js:512:14)
at endWritable (_stream_writable.js:522:3)
at Writable.end (_stream_writable.js:487:5)

Steps to reproduce behavior

Clone default cornerstone theme,

run following commands
stencil init
add your credentials
stencil start
then open any category page and click on page 2.

Changing product options does not update displayed price, image, etc.

Expected behavior

On a product page, changing product options should cause the displayed price, image, etc. to change.

Actual behavior

The displayed price, image, etc., never change when an option is changed.

Steps to reproduce behavior

  1. Create a product with a multiple-choice option, displayed in a dropdown
  2. Create a rule which changes the price, image, etc. when a certain option value is selected
  3. Visit the product page and select the option value in the dropdown. This used to cause the displayed price, image, etc. to change, but this no longer works.

I'm using Cornerstone 1.9.4 with Stencil-utils 1.0.8. This appears to be caused by a bug in Stencil-utils 1.0.8 - downgrading to Stencil-utils 1.0.7 fixes the issue. (But the stencil-utils repo doesn't seem to provide a way to submit issues? So I'm reporting it here.)

Category page Sidebar issue

Hello,

We have noticed one issue with cornerstone theme category page.
When any category has no subcategories and shop by price filter available in the left sidebar. category products right bar section will be moved to the left side and show white space on the right sidebar.
Please check the issue on attach screenshot.
2017-04-26_2021

You can fix this issue by adding more condition on the sidebar so when sidebar has no section available you can make the category products section full width and show 4 products per row to fill that white space.

Thanks,
Minank Mori

Can't generate icons using `grunt svgstore`

I've added a new icon to /assets/icons and I'm trying to regenerate the svg sprite.

I have grunt installed and so I run grunt svgstore

Expected behavior

Icons sprite is generated.

Actual behavior

$ grunt svgstore
>> No "svgstore" targets found.
Warning: Task "svgstore" failed. Use --force to continue.

Aborted due to warnings.

Steps to reproduce behavior

I believe there's some missing grunt config. This is my Gruntfile.js (it's the same one like in this repo):

module.exports = function(grunt) {
    require('time-grunt')(grunt);
    require('load-grunt-config')(grunt, {
        jitGrunt: {
            staticMappings: {
                scsslint: 'grunt-scss-lint'
            }
        }
    });

    grunt.registerTask('default', ['eslint', 'karma', 'scsslint', 'svgstore'])
};

EDIT: I just found the grunt folder in the repo. I don't have it locally. Adding grunt folder, fixed the issue.
I downloaded the theme directly from the store. Is it possible that that directory is stripped automatically, or it just never was uploaded in the first place?

Feature Request: Infinite Scrolling

Description

There is a desire to have a "View All" option for products within categories or brands. There are some performance limitations on this, such as trying to load 1000 products on the same page. When a category is too large to perform this function well, it would be ideal to hide "View All" or change it to a lower upper limit such as "View 250".

Mockups

image

Links

You must sign into the forum to view the link below

Suggested options

Implement lazyloading such as

Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got 'EOD'

Steps to reproduce behavior

While developing on stencil cornerstone theme, I can't save the config.json file without being thrown this error Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got 'EOD'

This is from a clean install of the theme. Followed all the installation documentation correctly.

e: Okay I can save it, but I always have to save a second time after the error is thrown in the CLI

Quick View content repositions in modal when certain product options are selected

Expected behavior

Content in quick view stays within modal when selecting options.

Actual behavior

Content jumps vertically and clips out of frame when a radio button or option swatch is selected. This seems to only happen on Chrome, and only when there are several options and the option clicked is low down on the list.
quickview-glitch

Steps to reproduce behavior

  1. Using Chrome, locate or create a product with several options, including one with radio buttons or swatches. Make sure there are enough options above the radial/swatch that you will have to scroll down to reach it.
  2. Click the Quick View button to open the modal
  3. Scroll down the options and click a radio or swatch.

List View - Improve / Tidy Alignment

Great to have a List View now, thanks (fixed in STENCIL-3194) - I've just activated it in our test store.

The layout of the columns on the List View is irregular, based on the size of the thumbnail and the amount of text in the description.

I suspect this could probably be resolved by imposing a width on the thumbnail image and on the Title & Description elements.

Screenshot below with red guidelines to show where sections are not aligned in the way I expect them to be.

image

This is even more pronounced on the Search Results page. Screenshot below with red guidelines.

image

Third screenshot from the Brands page.

image

All screenshots from Win10/Chrome.

Javascript PageClass for custom page

Expected behavior

PageClasses should be attached as configured in app.js file

Actual behavior

For custom pages not loading associated class

Steps to reproduce behavior

We created custom page as in
https://stencil.bigcommerce.com/docs/authoring-custom-templates
add page in customLayouts -> page
So far so good - page displayed.

Now we want to add script to this page and trying to follow
https://stencil.bigcommerce.com/docs/js-101
Created custom. js file export our object and assign this to new page
in PageClasses.
That part is not working.

Loks like its issue with window.stencilBootstrap . For existing pages like Blog it loads PageClass as the PageClass class attached to it (Blog), but for custom pages it always loads as Page class

Navigation Menu

Is there anyway to allow for the choice of making the main menu navigation a hover rather than click? Also, when adding menu categories and subcategories the dropdown main navigation menu looks very unorganized, is there anyway that could be addressed so that it is condensed and fluid? Here is my current site for reference: lake-life.com

Also, I attached a screenshot of the menu to show you what I mean.

Thank you,
screen shot 2017-03-15 at 5 58 00 pm

Where do the "snippets" contents come from?

I'm working in a customized Stencil theme, based on Cornerstone.

Throughout the liquid code, I can see these (sorted alphabetically here):

{{{snippet 'account'}}}
{{{snippet 'brand'}}}
{{{snippet 'cart'}}}
{{{snippet 'categories'}}}
{{{snippet 'footer'}}}
{{{snippet 'forms_search'}}}
{{{snippet 'header'}}}
{{{snippet 'home_content'}}}
{{{snippet 'htmlhead'}}}
{{{snippet 'product_addtocart'}}}
{{{snippet 'product_rating'}}}
{{{snippet 'reviews'}}}

At Stencil documentation, there is no documentation about snippets at Handlebars section.

I could not find reference about these "snippets" anywhere. Is there any documentation about them?

Where do these "snippets" contents come from?

"autoprefixer_browsers" on config.json is not being respected when uploading to BigCommerce

Hello, on config.json file, I'm using this definition for some -webkit- prefixes needed on Safari. It works on development but when uploading into BigCommerce it's like being ignored (they are on the bundle config.json file, so it's being bundled).

  "autoprefixer_browsers": [
    "ios 8",
    "ios 9",
    "ios 10",
    "last 4 versions",
    "> 5% in US"
  ],

I attached a screen shot for when on development (first one) and on the storefront (second one).

development
storefront

Product Images can obscure product details

Product images on some narrow viewports (e.g., a small browser window on a desktop) can cause .productView-image to obscure the left side of .productView-details above the medium viewport (by default min-width: 801px).

screenshot 2017-03-15 23 28 32

This is because .productView-image is set to both display: flex and min-width: 500px. The image then fills the available space, which will be no less than 500px, even though the container section (.productView-images, which houses the main image and the thumbnails) is set to a width of 50%. The image needs to be able to display smaller than 500px wide, since 50% of the smallest viewport width under this rule is just above 400px.

This could be corrected at line 27 and following of _productView.scss by one of the following:

  1. resetting the figure's display to its initial setting via display: initial
  2. removing the min-height and min-width values
  3. changing those values to something like 400px (though preferably by reference to the value of the medium breakpoint so that it adapts if that changes)
  @include breakpoint("medium") {
      display: initial; // option 1
      min-height: 400px; // option 2
      min-width: 400px;
    }

Reducing the minimum height and width is a safe route, and that's what I've done on the site above

I'm not sure I see the practical benefit of setting minimum image sizes, so I think removing them makes sense, but I'd like to hear thoughts on the best solution or arguments in support of minimum widths if there are any to be made. Let me know if there's something I haven't considered, and if it's agreed that one of these solutions fixes the issue without breaking something or causing side effects, I'll be happy to issue a pull request.

Optional product list options display as out of stock when product is tracked by SKU

Expected behavior

Product list options should show as in stock when they are in stock and the base product is tracked by SKU.

Actual behavior

Product list options show as out of stock (crossed out) when they are in stock and the base product is tracked by SKU.
nothingselected

However, they do behave correctly upon selecting them as far as add-to-cart functionality goes.
Product list option is out of stock:
outofstockselected
Product list option is in stock:
instockselected

Steps to reproduce behavior

Add a product. Add an option to this product. Create a SKU using this product/option pairing. Change product tracking to be based upon SKUs. Add an optional product list option to the product. Preferably do all of this using the V3 API, or else I believe that an in stock product list option will also show up as out of stock when selected (unless something has changed in the last few weeks in the query to utils.api.productAttributes.optionChange, as this had been returning a False boolean for either purchasable or instock when using option sets, I can't recall which one, possibly both).

reCaptcha appending to footer?

recapthajs
Hi, I am using version 1.8.1 and I have noticed in my network tab that the reCaptcha scripts are being loaded twice on my product pages - I see that its being called in the {{{head.scripts}}} tag - one is in the reviews modal - and then one that is appended to the footer which for the life of me I cant figure out whats injecting it there. I am unsure if this is fixed on a newer version, but right now I can't just completely re-customize my theme, could you assist me in where/if that change was made on the newest version?

Steps to reproduce behavior

https://www.upliftdesk.com/stand-up-desk-with-bamboo-top/

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.