-
Notifications
You must be signed in to change notification settings - Fork 67
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 frontend UI code #72
Comments
Alright I'm going to give a blow-by-blow here. Working on the refactor in this branch: https://github.com/pattern-lab/styleguidekit-assets-default/tree/feature-css-refactor |
The existing
|
@bmuenzenmeyer @EvanLovely just a heads up that globally I'm going to restructure the current prefix of I bring it up as a heads up because that obviously touches a lot of things. |
I cleaned up the Sass variables and updated them to be more descriptive. So instead of |
I renamed the main CSS file to |
I've been making a whole mess of refactoring tweaks to the header. A lot of it is syntax and cleanup, but I'm also starting to work on theming. Here's a taste of what a light theme and a "comfy" (read: bigger padding) theme could look like: This ultimately can of course lead to a left sidebar version vs an across-the-top header, similar to http://bradfrost.github.io/style-guide-guide/ And this also paves the way for users to more easily theme their own Pattern Labs. |
The frontend refactoring bleeds into https://github.com/pattern-lab/styleguidekit-mustache-default, so I've been going through and updating that code as well. |
I also want to change the |
let us know if that lands into a branch or branches, as it will likely break PL Node and PL PHP |
@bmuenzenmeyer Yeah I realize that's going to be a big change, so I'll make it it's own thing and flag/coordinate things accordingly. |
@bmuenzenmeyer that's precisely why I had originally suggested (and had already gotten a good deal into) doing this Styleguidekit Assets Default re-architecture as a monorepo using something like Lerna -- at least for the initial buildout -- given how even a relatively small change in one Pattern Lab dependency can require changes spanning 2 or 3 other repos... |
I've been kicking around the idea of putting node core together with all node engines, but I don't see a lot of logic to putting patternlab node and patternlab php together. |
I think generally speaking if there's a way to move all UI into one one repository ( |
@bmuenzenmeyer sure, no arguments there. But then again, what if we only really needed one single Pattern Lab core to rule them all to handle any underlying business logic and that just hooked in with whatever template adapter we needed (PHP-powered Twig, React, Handlebars, vanilla web components, etc)? Even just yesterday I stumbled upon a brand new Drupal 8 module that has PHP talking to a sibling Node server to handle server-side rendered web components (on top of the node-twig project which lets Node render templates using the native PHP Twig Engine) so I've just been doing a lot of thinking about how Pattern Lab as a whole could become even more universal (and not require us to do a huge rebuild every couple of years) |
You bet! I humbly think that Pattern Lab Node is there.
|
I think to @bmuenzenmeyer's point that's the goal!
I don't think the big efforts every couple years is due to keeping up with the different engines, but really evolving the whole platform to be more robust, versatile, and manageable. In any case, I think we're all on the same page of trying to put the right architecture in place to make that happen! |
Alright, big update! I think I have most everything done regarding the refactor of the UI code. All CSS is rearchitected, all JS hooks are standardized, all of the features are present and accounted for. The one thing that's holding me back is that the single pattern view appears to choke. I can continue hunting this down, but as of right now that's my only blocker. Once that's resolved, I can test the annotations feature and then we should have a brand new, shiny, slimmed-down, scalable, extensible, themeable Pattern Lab UI! If either @bmuenzenmeyer or @EvanLovely wants to help get to the bottom of that issue, that would be freaking great. |
@bradfrost i glossed through your commits a day or so ago but nothing stood out - did you rename or move any files as part of this? |
useful debugging inside <!-- load the Pattern Lab viewer js -->
- <script src="styleguide/js/patternlab-viewer.min.js"></script>
+ <script src="styleguide/js/patternlab-viewer.js"></script>
then upon rebuild (assuming you are linked) you can at least see the code this is what I get outta the gate will have more time to look into this later ** Edit ** For this specific error, I had some crap cookies saved. Debug steps still useful. |
The suffixes are not being added to the requested file |
It looks like 5d06bf7 is not in your codebase. Getting these changes back in will do the trick! @bradfrost You must not have started with Makes me worried that other changes might not be reflected: https://github.com/pattern-lab/styleguidekit-assets-default/commits/master |
@bradfrost pull changes, re-build, and try again :) Looks like something similar needs to happen for the code panels. I can look into that too, unless you can figure it out. Lots of errors. Not bad for a bus ride home! 🚌 ⚡ ⌨️ |
Alrighty, update on my end. Everything has been refactored and is looking/working properly in Chrome, Firefox, and Safari on my Mac. I don't have a Windows machine on me (I'm on the road) and haven't had a chance to Browserstack it, so Windows testing still needs to be done. Assuming that things check out on that front, we're good to do whatever needs to be done to get these changes where they need to go. I'll leave that to @bmuenzenmeyer. |
Alright, I've gone through everything on Browserstack and after some refactoring of the tabs things are looking and functioning great in Edge and IE11. So we should be good to go! @bmuenzenmeyer, I'd like to continue work on some of the theming/enhancement stuff in other branches. What would recommend as far as branching goes? Should I start a new branch from this? Wait for you to do your thing then branch from there? Something else? |
@bradfrost you can branch from here and I can keep it all in sync. |
In an effort to make Pattern Lab's UI more flexible and extensible, the frontend code should be re-architected. I'll likely be tackling this using these conventions, which have proven to be effective on very large, complex software applications. So it should work well here.
Given the nature of the changes, we'll have to be mindful of what would be affected (plugins, dependencies, etc), so could use some guidance in flagging that stuff.
The text was updated successfully, but these errors were encountered: