-
Notifications
You must be signed in to change notification settings - Fork 405
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
improvement: ability to configure default pattern info code panel #1155 #1156
improvement: ability to configure default pattern info code panel #1155 #1156
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this! It's also SUPER EXCITING to me to see docs and functionality changing in lockstep finally. It's the realization of a goal we've had for a long time.
I've grown accustomed to setting the default value of any new config value in patternlab-config.json
to improve discovery. (In the new core, I may revisit this pattern and create a more intentional extensibility model where users need only supply values they wish to override.... it sort of works like this already in fact!)
but for now, can you add this key and its default to:
Most Important
- packages/core/patternlab-config.json (used within
getDefaultConfig
) - packages/edition-node/patternlab-config.json
- packages/edition-node-gulp/patternlab-config.json
- packages/edition-twig/patternlab-config.json
Less Important or Internal
- packages/starterkit-twig-demo/patternlab-config.json (merged in namespaces)
- packages/core/test/util/patternlab-config.json
- packages/cli/test/fixtures/patternlab-config.json
- packages/development-edition-engine-handlebars/patternlab-config.json
- packages/development-edition-engine-react/patternlab-config.json
- packages/development-edition-engine-twig/patternlab-config.json
I was struggling with the aspect of how to reflect (and that for integrate) an optional config in the first place (as an opposition to at least most of the other configuration values to my impression), and your explanation makes perfectly sense to me. |
@bmuenzenmeyer, are you 100% (as in totally, or without a doubt 😉) sure that it even also needs to get added to As you're going full monty on all of the different variations of patternlab (which I totally agree with), I'd like to additionally add that I've only tested node/handlebars myself manually (as this is the one I'm most experienced with). If there aren't any test (cases) to reflect/check this new behavior for this and the other editions, I could even also offer to try to do these manual regression tests on those. |
added some more details
You can omit it from that one, it's an outlier. |
This reverts commit d5d6bf4.
Okay, I've reverted that one. I think we're good to go now. |
…ern-info-code-panel
…ern-info-code-panel
…ern-info-code-panel
I owe you an apology @mfranzke - I've been struggling with how to tell you I hate my own advice - so here we go! I don't think it appropriate to add in
I prefer the first, if I had to choose. I really like that you fallback to |
Easy peasy, I even also do like to think things over again and especially if it’s for the better afterwards, it‘s more important to be open for those changes than to follow a worse route just because. |
…ern-info-code-panel
This reverts commit 53d2dd6.
@bmuenzenmeyer, I reverted commit 53d2dd6 altogether. I interpreted your previous comment in the way that the config option shouldn't be included within all config files (not only the Elsewhere we should be good to go now. |
…ern-info-code-panel
…ern-info-code-panel
…ern-info-code-panel
I'm not sure what's going on yet but I cannot get this to display the code panels anymore packages/development-edition-engine-handlebars |
@bmuenzenmeyer I'm not totally sure, whether I do understand your current test correctly. If your "serving" the system from the files out of Or to put it in other words, it really depends on your expected testing results:
Sorry for the long explanation - as I'm not totally sure whether I'm getting your point correctly (or at all) I just wanted to write down my thoughts in general, and I do hope that it makes sense. |
it's alright - I should have been more clear. The branch I linked above pulled in your fork and branch local to this repo, so the changes should be present. This is the common fork testing pattern that GH suggests: I went a step further though, by adding patterns into the development edition and switching to |
…ern-info-code-panel
@bmuenzenmeyer okay, the testsetup makes perfectly sense and is aligned with mine. My assumption that the code that I've provided is missing within the browser, is possible to check by opening the file
|
…ern-info-code-panel
…ern-info-code-panel
…ern-info-code-panel
@bmuenzenmeyer, I’ve rechecked this whole topic, and the following simple commands now work perfectly fine for me for retesting these changes - from the root of your branch (https://github.com/pattern-lab/patternlab-node/tree/mfranzke-improvement-ability-to-configure-default-pattern-info-code-panel-test) just run the following commands (as aligned with the description on https://github.com/pattern-lab/patternlab-node/tree/dev/packages/uikit-workshop#working-on-pattern-labs-ui-locally; probably you were missing the setup initially, at least I did and came up with comments like the previous one):
This brings up the PL UI with an active HTML tab at the very beginning: |
…ern-info-code-panel
…ern-info-code-panel
…ern-info-code-panel
Additionally there aren't any problems appearing on the CI/CD netlify test deploy: https://deploy-preview-1156--patternlab-handlebars-preview.netlify.app/ Please keep in mind that it doesn't display the "html" tab as the default as the configuration itself hasn't been part of this merge request. But the netlify preview at least shows, that there aren't any errors being displayed due to these changes. This should be safe to get tested again and get merged afterwards. |
…ern-info-code-panel
…tern-lab#1155 (pattern-lab#1156) * improvement: ability to configure default pattern info code panel pattern-lab#1155 * docs(config): added the default config values pattern-lab#1155 Co-authored-by: Maximilian Franzke <[email protected]> Co-authored-by: Maximilian Franzke <[email protected]> Co-authored-by: Maximilian Franzke <[email protected]> Co-authored-by: Brian Muenzenmeyer <[email protected]> Co-authored-by: Josef Bredreck <[email protected]>
Closes #1155
Summary of changes:
Added the configuration option for the ability to configure default pattern info code panel.