Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Slate featured collection + collection list sections #30

Merged
merged 4 commits into from
Oct 25, 2016
Merged

Conversation

cshold
Copy link
Contributor

@cshold cshold commented Oct 24, 2016

  • Featured collection section (shows 6 products, or 6 onboarding placeholders)
  • Collection list (max 12, default 3)
  • /collections/all blank state (removed old onboarding styles/images)

Editor demo - https://carson-blocks.myshopify.com/admin/themes/132751811/editor

Blank states

/collections/all

image

Home page

image

@Shopify/themes-fed

@cshold cshold self-assigned this Oct 24, 2016

{%- assign collection = collections[section.settings.collection] -%}

{% for product in collection.products limit: 6 %}
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to add the limit as a setting?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thought about it, but no. Not every theme will want it as a setting so shouldn't be included in Slate

@bertiful
Copy link
Contributor

Small comment (curiosity), everything else looks spot on 👍

{% include 'no-blocks' %}
{% endif %}

{% schema %}
Copy link
Contributor

Choose a reason for hiding this comment

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

let's go with the folder approach and move these into their own .json files so we get all our fancy linting and tooling benefits

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

I assumed that was scrapping the generator, not the approach. I feel like our default theme should leverage our json linters to save devs banging their heads agains json errors in their section files.

Copy link
Contributor Author

@cshold cshold Oct 24, 2016

Choose a reason for hiding this comment

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

It's both:

Re: breaking up section files. Please stop doing this. We need to keep the directory structure of themes 1:1 with Shopify core, with the exception of global JS & CSS assets if we can't avoid that. Breaking up sections files is not the right solution to syntax highlighting. We need to own the liquid plugins for Atom/ST/VSC/etc. and make them highlight the section schema/js/css tags correctly (it's a solved problem already, see e.g. the HTML plugins that highlight the JS in <script>).

JSON linting is the only other thing it's useful for, but Shopify lets us know when those errors are attempted to uploaded too.

Copy link
Contributor

Choose a reason for hiding this comment

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

dang :-( rip JSON linting for schema files.


<a href="{{ collection.url }}" title="{{ 'collections.general.link_title' | t: title: title }}">
{% if collection.image %}
{{ collection | img_url: '480x480' | img_tag: title }}
{% if collection.image != blank %}
Copy link
Contributor

Choose a reason for hiding this comment

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

indent and whitespace 👮

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure I follow, indentation and whitespace looks right to me

@cshold cshold merged commit e2f50fa into master Oct 25, 2016
@cshold cshold deleted the slate-sections branch October 25, 2016 18:31
t-kelly pushed a commit that referenced this pull request Jul 31, 2017
* remove inline comments to fix babel compiling errors

* fixes errors on node v4.x

* got rid of linting error

* updates for clarity
t-kelly pushed a commit that referenced this pull request Jul 31, 2017
* remove inline comments to fix babel compiling errors

* fixes errors on node v4.x

* got rid of linting error

* updates for clarity
t-kelly pushed a commit that referenced this pull request Jul 31, 2017
* remove inline comments to fix babel compiling errors

* fixes errors on node v4.x

* got rid of linting error

* updates for clarity
@lock
Copy link

lock bot commented Oct 26, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants