-
Notifications
You must be signed in to change notification settings - Fork 406
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
Re-architect how ui's are built #811
Comments
@bmuenzenmeyer YES! I love the design of the config.
What do you mean by this? |
ugh that was a terrible sentence on my part, sorry! I'll try to explain better, for my benefit too! in my analysis of the code (looking for places where we assumed one ui only), it looks like Pattern Lab tries to use https://github.com/pattern-lab/patternlab-node/blob/master/packages/uikit-workshop/views/partials/general-header.mustache and https://github.com/pattern-lab/patternlab-node/blob/master/packages/uikit-workshop/views/partials/general-footer.mustache if the So, this defensive code is either a misunderstanding of the original algorithm on my part, or a feature. Either way, making a decision as to what to do with multiple uikit support is important - because we could do the following:
|
@bmuenzenmeyer Ah I see! My opinion is that That said, I think it's important to support multiple So I think what I'm saying is some combination between option 1 and 3. Make |
Dropping this as a reminder to myself: last bit of known work here is making incremental builds pick up changes and reload the page. on at one point the console output flipped from
to
after the initial run - but now a recent commit has changed the behavior. next steps: investigate further. race condition? broken promise chain? live-server problem only? off to easter 🐰 |
As a user, I want to be able to generate multple UIs from a single pattern tree.
We will basically support a workflow first described in @bradfrost's article, The Workshop and the Storefront.
Pattern Lab Node needs to change to accept N number of UIs to build. This issue will attempt to capture what is needed for that to be successful.
I think an acceptable way to think of how this would work is to start at the configuration point and move forward from there.
Proposed Solution
patternlab-config.json
High-Level Pseudocode
build()
require()
all uikits by nameoutputDir
as root - join topaths.public
From what I can think about it right now, uikit build could be parallelized. Not sure if it's worth doing that, but may be neat!
Questions
_meta
files? That would certainly be easiest, but may be limiting.Evaluation
❌
index.js
headPatternPromise
andfootPatternPromise
decomposed but only used withinui_builder
(a good thing from a refactoring standpoint)❌
patternlab.js
The assigment of templates hanging off of
patternlabFiles
assumes a single uikitheader
footer
patternSection
patternSectionSubType
writePatternFiles()
assumes a single uikit❌
ui_builder.js
❌
exportData.js
❌
copier.js
❌
pattern_graph.js
exportToDot()
assumes a single uikit✔️
pattern_exporter.js
MISC
We need to well-document part of the UI-build process we have previously let slide if we want teams to adopt this approach (or even if we want to easily create
uikit-storefront
We need to update Ecosystem documentation to refer to uikits and the ability to have N of them
It's probably revisting in
meta
patterns are truly optional. We try to fall back to general header and footer but I need to test if this works in practice.The text was updated successfully, but these errors were encountered: