Skip to content

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

Merged
merged 16 commits into from
Sep 5, 2018

Conversation

sghoweri
Copy link
Contributor

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:

  1. 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.

  2. 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 😉

@bmuenzenmeyer bmuenzenmeyer self-requested a review August 25, 2018 19:45
@bmuenzenmeyer
Copy link
Member

@sghoweri does this PR need to cleaned up in any way now that #934 has merged?

@sghoweri
Copy link
Contributor Author

@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!

@sghoweri
Copy link
Contributor Author

@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!

@bmuenzenmeyer bmuenzenmeyer merged commit 0aea66c into pattern-lab:dev Sep 5, 2018
antonia-rose pushed a commit to quelltexterin/nemo-uikit-workshop that referenced this pull request Apr 12, 2023
…or--p4

UIKit Refactor Part 4: JavaScript Cleanup, Consolidation and Refactoring
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants