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

Feature/uikit refactor #840

Merged
merged 49 commits into from
Apr 27, 2018
Merged

Feature/uikit refactor #840

merged 49 commits into from
Apr 27, 2018

Conversation

bmuenzenmeyer
Copy link
Member

@bmuenzenmeyer bmuenzenmeyer commented Apr 13, 2018

Closes #811

Summary of changes:

UIKits are a new term in the Pattern Lab Ecosystem, attempting to evolve beyond the current Styleguidekit pattern which separated front-end templates from front-end assets like stylesheets and code. The existing styleguidekit-assets-default and styleguidekit-mustache-default have merged into uikit-workshop (more on that name in a bit). The hope is that by co-locating all front-end files in a single repository, users will be more capable of altering existing UIKits, making their own, even building multiple UIs from a single source of truth.

You heard that right - Pattern Lab 3.X will support multiple UI outputs from a single set of source patterns - implementing what @bradfrost coined the workshop and the storefront. True to form, the default Pattern Lab experience is therefore the workshop.

patternlab-config.json has a new key:

+  "uikits": [
+    {
+      "name": "uikit-workshop",
+      "outputDir": "",
+      "enabled": true,
+      "excludedPatternStates": ["inreview"],
+      "excludedTags": []
+    }
+  ]

uikits accepts and array of UIKit objects, shipping with the one above.

  • name: the name of the UIKit
  • outputDir where to output this UIKit relative to the current root. by leaving this empty we retain the existing behavior, outputting to <project_rooter>/public. If you had multiple UIKits, however, you would provided different values, such as:
"uikits": [
  {
    "name": "uikit-workshop",
    "outputDir": "workshop",
    ...
  },
  {
    "name": "uikit-storefront",
    "outputDir": "storefront",
    ...
  }
]

check the output:

image

  • enabled: quickly turn on or off the building of this UIKit
  • excludedPatternStates: tell Pattern Lab not to include patterns with these states in this UIKit's output
  • excludedPatternTags: tell Pattern Lab not to include patterns with these tags in this UIKit's output
    • currently not supported

Other notes that coincide with this work:

  • the default paths.source object paths within patternlab-config.json are now relative to the current UIKit. See the structure of uikit-workshop for more info
  • the default paths.public object paths within patternlab-config.json are now relative to the current UIKit's outputDir. Absolute paths will no longer work. Someone could test putting an absolute path in a UIKit outputDir property and see what happens I suppose.
  • dependencyGraph.json has moved to the project root rather than public/ as we should only retain one

To aide in users building their own UIKits, I've also created uikit-bare outside this monorepo, as a thing to fork and change to your needs. The uikit-bare wiki attempts to document the API Pattern Lab expects from a UIKit and what data it provides a UIKit during build.

Known Issues

  • UIKit excluded tag support
  • UIKit lineage still links to excluded patterns

Feedback Needed

This is a work in progress, so please provide feedback along the way.

this might still be a WIP, as changes do not always get reflected. either a bug here or in live-server?
@bmuenzenmeyer bmuenzenmeyer changed the base branch from master to dev April 13, 2018 19:34
@coveralls
Copy link

coveralls commented Apr 16, 2018

Coverage Status

Coverage increased (+5.8%) to 69.394% when pulling 87c9d0d on feature/uikit-refactor into 170a11d on dev.

@bradfrost
Copy link
Member

Just stopping in to say hello, as this looks fun and interesting!

@bmuenzenmeyer bmuenzenmeyer merged commit d6ba41c into dev Apr 27, 2018
@bmuenzenmeyer bmuenzenmeyer deleted the feature/uikit-refactor branch April 27, 2018 21:04
antonia-rose pushed a commit to quelltexterin/nemo-uikit-workshop that referenced this pull request Apr 12, 2023
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

Successfully merging this pull request may close these issues.

3 participants