pattern-lab / the-spec

The specification for implementing Pattern Lab in various languages. This way there can be common core functionality and common shared assets.
16 stars 3 forks source link

Removing styleguide-specific.css from StyleguideKit #20

Closed dmolsen closed 8 years ago

dmolsen commented 8 years ago

A user needs to add styles to select patterns (mainly atoms) to best highlight those patterns. For example, swatches or font listings.


The organization and naming of the file that holds styles that are related to showing select patterns like swatches or icons needs to be changed. Currently this file resides as part of styleguidekit-assets-default and is called styleguide-specific.css. This organization and naming is a holdover from PL1 and has been a paper cut when using the system for a long time.

The three biggest issues are:

  1. It's incredibly easy to delete this file with no clear way to get it back if it didn't get under version control quickly.
  2. It's related to a generic StyleguideKit rather than a StarterKit. Therefore it has no connection to the actual patterns that need to be shown within a given StarterKit. It may be missing needed styles.
  3. It makes the install of styleguidekit-assets-default slightly messy and that should have been a big hint that this organization was a mistake.

I'd like to propose that:

  1. This file is embedded within a StarterKit rather than the StyleguideKit. This will lead to duplication for something like swatches but it just makes more sense.
  2. This file could be called pattern-presenter.css and saved in ./source/css/. Open to naming but styleguide-specific.css doesn't cut it for me.
  3. That core implementations no longer reference it as part of {{{ patternLabHead }}}. Instead the StarterKit head patterns should refer to it directly.

StyleguideKits then becomes entirely about the viewer and "view all" page layout. StarterKits become entirely about displaying patterns. Be that styles or mark-up. Even if it's special patterns like swatches that aren't re-used.

The timeline for this feature is now. I think we should get this swapped around before the workshop so we can clearly articulate where people make these changes.

This vote will close at 9p EST on Tuesday June 22 or once the voting members have given two thumbs up or two thumbs down.

PS - breaking the two week rule because of the workshop need.

/cc @pattern-lab/voting-members


Brian Edit

Starterkits that require this change: based on https://github.com/pattern-lab?utf8=%E2%9C%93&query=starterkit

dmolsen commented 8 years ago

👍

bmuenzenmeyer commented 8 years ago

This has been a nascent thought in my head for a while now too - and makes perfect sense.

:+1:

We got a bit of work to do in order to make this happen. How would you like to divvy up the work?

dmolsen commented 8 years ago

I think the work is...

  1. Choose a name for the new file (please do)
  2. Choose the location. I think ./source/css is appropriate
  3. Copy styleguide-specific.css from styleguidekit-assets-default into the default Mustache and Twig StarterKits. I haven't looked... are their more default ones for PL/Node.
  4. Add a blank one in the base Mustache and Twig StarterKits.
  5. Modify the head patterns as appropriate
  6. Remove reference to the file from Core implementations
  7. Appraise the state of the other StarterKits and add as appropriate.

I can do it all as long as you take care of point 1 and point 6 for your implementation. I hope to have a new version of PL/PHP core out in the next two days with some other changes. I can just bundle it all together.

Sound ok?

bmuenzenmeyer commented 8 years ago

Works for me. Suggest we itemize every starterkit and make sure we get them all eventually. I will make a careful edit to this issue's top-level comment to keep track if that's alright with you.

Choose a name for the new file (please do)

Naming stuff is hard. And naming things expediently is better still! pattern-scaffolding.css pattern-meta.css pattern-display-only.css

come to mind.....

dmolsen commented 8 years ago

+1 to pattern-scaffolding.css. I'll use that. From further above I think starterkit-mustache-default is actually the odd one out. Twig has a demo and really that's what that StarterKit is... a demo.

dmolsen commented 8 years ago

To avoid a BC change PL/PHP will end up checking for the existence of ./source/styleguide/css/styleguide-specific.css. If it exists PL/PHP will include it with an HTML comment that the file is deprecated. styleguidekit-assets-default and the StarterKits should probably get a major release bump. I don't think that will cause too many issues. Not entirely sold on versioning but just wanted to note I've been thinking about it.

bmuenzenmeyer commented 8 years ago

Yes all of these should have a major version increment

dmolsen commented 8 years ago

@bmuenzenmeyer -

Are you ok with me nuking the repo for starterkit-mustache-default? It should be *-base and *-demo.

bmuenzenmeyer commented 8 years ago

Yes. Having both was confusing to me too

On Sat, Jun 18, 2016, 3:24 PM Dave Olsen notifications@github.com wrote:

@bmuenzenmeyer https://github.com/bmuenzenmeyer -

Are you ok with me nuking the repo for starterkit-mustache-default? It should be -base and -demo.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/pattern-lab/the-spec/issues/20#issuecomment-226963062, or mute the thread https://github.com/notifications/unsubscribe/AASNwwajM1kUTB7K0ygXPxvJ8ti7aD9kks5qNFP2gaJpZM4I2986 .