-
Notifications
You must be signed in to change notification settings - Fork 404
UIKit Refactor Part 4: JavaScript Cleanup, Consolidation and Refactoring #935
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
UIKit Refactor Part 4: JavaScript Cleanup, Consolidation and Refactoring #935
Conversation
…rt order to fix linting issues; remove imports from the two main entry files that aren't required to get pulled in by themselves
…ferent places rendering UI related to it
….js's existing logic
… in remaining UIKit JavaScript component files
…e / update / delete nested complex cookie data in PL as JSON
…nt and prettier errors
@bmuenzenmeyer for the most part I don't think so -- all I think I need to do is merge in the latest code that's up on dev and that should do it! |
…local version of Lerna so bootstrapping works as expected
…eri/patternlab-node into feature/uikit-refactor--p4
@bmuenzenmeyer ok should be good to check out! Just a head's up: I found that I had to bump up the version of Lerna getting used in order to have things bootstrap locally when I went in to test out the latest merge from dev was working as expected. Not sure if this is an issue on dev as well or just with how bootstraped dependencies get resolved on this branch... just a heads up! |
…or--p4 UIKit Refactor Part 4: JavaScript Cleanup, Consolidation and Refactoring
Incrementally rewriting your entire front-end architecture (without blowing everything up and starting from scratch) takes time. 😄
Thankfully, I think this is one of the last couple of major milestones to get us over the hump of fixing and updating a lot of the legacy JavaScript from Pattern Lab's UIKit so that most of the net-new changes moving forward can focus on consolidating how components render, manage state, talk to one another, etc -- overall focus on making Pattern Lab's UI a heckuva lot more customizable, extendable and performant.
To get us there (and not inadvertently have to rewrite all of Pattern Lab UI all at once), it's super important that Pattern Lab's UIKit code can get tested, linted and formatted consistently so that the really meaty changes I know the community has been aching for can start to pick up some steam.
In a nutshell, this PR does two things:
Updates the vast vast majority of the JavaScript in Pattern Lab's UIKit (components and utils) that hadn't yet been refactored / modernized, and updates the front-end code to address all of the major eslint and prettier errors getting thrown. There's still a couple warnings in a few spots but as far as I know, the major issues should be tightened up here.
This PR also completely rewrites the data-saver JS utility lib used throughout Pattern Lab. Previously this had been using the no-longer-maintained jQuery Cookie library however with these updates, we're swapping this out with the extremely popular js-cookie library as a suitable replacement (and added bonus, this lib is now jQuery free).
Lots more exciting stuff still to come -- I'm super excited to be seeing the light at the end of the tunnel here!! 🎉CC @pattern-lab/devs @bradfrost
Side note 1: this does build directly off of the latest refactor work from #934 -- however I can totally move those fixes and updates out of this branch if necessary, just lmk!
Side note 2. I've been chipping away at a POC to allow Pattern Lab's UI to have more interoperability with other JS frameworks and tech stacks (via custom elements) which would benefit tremendously with having the JS code being changed already be formatted in a way that people can wrap their heads around.
PS. @bmuenzenmeyer keep an eye out for my next PR adding in cosmic-config support so users can customize UIKit's build process - got that working on the train ride back from NYC's Decoupled Drupal Days 😉