-
Notifications
You must be signed in to change notification settings - Fork 3
Unify Pattern Lab Core #37
Description
Okay, here goes.
TL;DR Officially declare the authoritative representation of the Pattern Lab spec to be Pattern Lab Node. Signal our intent to deprecate and place Pattern Lab PHP to be under community maintenance only.
Since Pattern Lab was a scrappy proof of concept that @bradfrost created many years ago, the specification of what Pattern Lab is and isn't has been represented by the functionality implemented within the PHP application. Dave and Brad quickly turned around new features, responding to needs of the community. When Pattern Lab Node came along, I had a truly great living reference to build toward.
Cue Pattern Lab 2.0 🎉
With 2.0 came the ecosystem, an architecture and separation of concerns that powered our cross-platform efforts for going on 2 years now. Dave wrote the spec, which captures some of the essence of Pattern Lab's features - but I'll admit, in practice, the most current version of Pattern Lab PHP has always been what I reference as the authoritative spec.
I've spent hours comparing output between PHP and Node, usually to better understand where I need to go on the Node side. This process led to broad feature parity (though probably not complete), with updates and more movement coming out of Node. I've had to compare output less and less, excepting nuanced use-cases that required a suitable cross-platform acid-test. This process, while fruitful, is still slow. Effort within core and the styleguide front end forever need to be made in synchronicity with both platforms. It's a burden on maintainers and our users to compare and contrast versions, even forced to make hard decisions about converting from one to the other due to the issue or workaround of the hour.
Substantive changes to the core engine are proposed and implemented with a reasonable degree of success by utilizing this very spec repo - but the process is still duplicative. People have noted the irony in Pattern Lab, a tool to help make DRY componentry, offers a fragmented experience. This makes us slower and again harder for the community to know what features are in what platform.
What I propose is this. Deprecate Pattern Lab PHP. Unify the core engine under the Node repository.
Pattern Lab Node 3.0, once released, is positioned to be much more than it's predecessor.
- Pattern Lab Node can run standalone, without the need for a task runner like gulp or grunt
- Asynchronous rendering opens up more first-class support for PatternEngines like React 👀 , Liquid, even Twig.
- Ever-increasing unit test support brings more confidence to the end-user and contributors
- Improve documentation and configuration across the board
I'm excited about all of this - and what comes after these capabilities are present. We have big plans. The benefits of unifying core are broad. For our users, our documentation, our workflow, and our product.
- Pattern Lab output need not be laboriously cross-checked between two separate systems
- Maintainers can respond quicker to the needs of the community
- New features from contributors do not need to be labeled or cross-checked as "on" or "off" spec.
- Major architectural refactoring can occur across a smaller footprint
- Simplify the documentation
- Unify the communities
- Create a single entry point into the ecosystem
- Users get a clearer sense of what features Pattern Lab offers
The way forward
I don't expect this issue to completely answer all the questions that may arise from this effort. The initial outline of work is tangible, however. If approved, I plan to break out a bunch of milestones.
- Announce intent (this issue)
- Audit and catalog differences between both platforms - create issues within Pattern Lab Node where needed
- Create
starterkit-mustache-spec- a combination demo / acid-test that demonstrates Pattern Lab features succinctly. This won't be the polished web design project like the current demo is. Rather, it will be a terse set of patterns that in isolation (or together, where needed) demonstrate current behavior. It's my hope to build this, automate its build, test against it during CI/CD, and automatically host results, also via CI/CD - Update all documentation
- Invest in more tooling to make collaboration more possible. Think prettier, standard-version, CI/CD integration tests, more people releasing
- Stabilize and release Pattern Lab Node 3.0
- I understand there are things about Pattern Lab Node that are sub-optimal, broken, or "off-spec". Let's fix em!
I think the above effort, and honestly this entire decision, will help in these ongoing or proposed efforts:
- Storefront mode architecture
- Monorepo architecture for Core + Engines
- Monorepo architecture for Styleguide
- JSON Schema Editor
All of this won't happen overnight. Believe me - I understand how time is tight. But discussing this decision and communicating intent is the first step. So here we are!
@pattern-lab/voting-members