cloudfour / drizzle

A streamlined tool for developing, documenting and presenting UI pattern libraries.
https://cloudfour.com/thinks/introducing-drizzle/
MIT License
666 stars 32 forks source link

Default pattern `name` is being ignored in the collection template #63

Closed tylersticka closed 8 years ago

tylersticka commented 8 years ago

Apologies if this is specific to cloudfour.com-patterns (happy to close this issue if so), but I've been encountering behavior I don't really expect.

If I create a pattern called foo-bar.hbs, my expectation is that it's default name (if I fail to provide one) will be "Foo Bar." I'd say about 50 - 75% of the time, replacing - with `and capitalizing each word in the result will give the desiredname`.

But currently, if I fail to provide a name, it won't output any heading at all. 😕

erikjung commented 8 years ago

There is a default. Assuming you're noticing this on the collection pages, it looks like this issue you're seeing might be due to this:

https://github.com/cloudfour/drizzle/blob/master/src/templates/drizzle/item.hbs#L4-L6

We're looking for data.name instead of name. After examining the builder tests a bit, it appears that name will be overridden by supplying a data.name. So we should change that bit of HTML to reference name instead.

erikjung commented 8 years ago

Closed via #64