Skip to content

Major UIKit Refactor Updates #1008

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 15 commits into from
Aug 20, 2019
Merged

Conversation

sghoweri
Copy link
Contributor

@sghoweri sghoweri commented Apr 16, 2019

Builds off of the updates from #960 and #973 and keeps going with many of the UIKit updates from boltdesignsystem/bolt#1050 + a bunch of misc bug fixes, cleanup, and performance updates from Drupalcon Seattle!

image

High Level Changes

  • Updated Pattern Lab search keyboard shortcut to open via CMD + Shift + F; fixes previous issue where the browser’s native CMD + F no longer worked as expected
  • Finished porting over the vast majority of the remaining PL components / styleguide.js logic over to standalone web components that are all wired up to use Redux (Viewport, Nav, Viewport controls, iframe resizer, etc);
  • Refactored Nav to automatically highlight the currently active page
  • Refactored Nav to NOT auto-close when you select a new page to navigate to
  • Refactored Nav to auto-close when you click outside of the Nav component — both inside AND outside of the iframe
  • Adjusted the dark theme in PL to have better contrast
  • Refactored Nav to display the View All pages at the top level + show nested children if / when they are available
  • Added JS-integrated SVG icons to the viewport resize controls + tools menu
  • Initial work adding CSS Variable support for customizing Pattern Lab’s UI without requiring a custom UIKit build
  • Adds tooltip support to the viewport resizer controls
  • Major refactor / cleanup to the browser history / hash logic

What's Left?

Here's most of the big stuff (off the top of my head):

  1. Testing -- in particular things like the different variations the content in the code drawer can display, especially with markdown docs, lineage, etc variations.
  2. Misc CSS cleanup (minor refactoring and cleanup), possibly updating some of the CSS variable theme defaults (dark theme mostly) to be a tiny bit more generic. Could be something to tackle separately.
  3. A few misc bugs that existed before these updates (opening / closing a single code panel on the viewall page stops working after doing it a few times)
  4. Docs - especially related to configuring and customizing the build, adding custom light / dark logo options, etc
  5. Making each UIKit package NPM installable / extendable
  6. Refactor mobile-specific nav to support the side-nav / off-canvas layout
  7. Finish refactoring out the sidebar / light theme specific ITCSS layers and incorporate into the standalone components instead
  8. Kill off the /dist folder committed to Git
  9. Decide if we still need to include a density config option (currently not supported)
  10. A couple of minor UIKit bits of functionality are either disabled or need to get re-wired up.
  • Disco and Random mode for example are temporarily disabled from the viewport resizer buttons since they need their JS logic ported over to the new component
  • Keyboard shortcuts controlling the viewport size need to get re-implemented
  • The viewport resizer input is currently read-only (can't currently update the input field manually)

Even with these things that are left, these updates should bring us very, very close to the finish line on modernizing Pattern Lab's UI + opening things up to be a heckuvalot more extendable!

… refactor work that builds off of the updates from #960 and #973
@coveralls
Copy link

coveralls commented Apr 16, 2019

Coverage Status

Coverage remained the same at 75.019% when pulling c882bab on feature/uikit-refactor--batched-updates into 7d2a9b5 on dev.

@sghoweri
Copy link
Contributor Author

CC @bradfrost

@JosefBredereck
Copy link
Contributor

I'm looking forward to the final version. I wish I could help a bit, but I don't have so much time at the moment. Keep up the great work.

@bradfrost
Copy link
Member

@sghoweri what should I be looking at here? Anything I can run/test?

@stale
Copy link

stale bot commented Jul 2, 2019

It's hard to keep track of everything. This issue has been automatically marked as stale because it has not had recent activity, neither from the team nor the community. It will be closed if no further activity occurs. Please consider adding additional info, volunteering to contribute a fix for this issue, or making a further case that this is important to you, the team, and the project as a whole. Thanks!

@bmuenzenmeyer
Copy link
Member

@sghoweri i may need help making heads or tails of this merge conflict!

@sghoweri
Copy link
Contributor Author

@bmuenzenmeyer woah - that is one big merge conflict! Taking a look at this in just a bit!

@sghoweri
Copy link
Contributor Author

Also, FYI, we're probably going to want to port over at least a handful of these upstream changes I've recently made in this PR -- both to speed things up from an NPM install and CI point of view in Pattern Lab, but also to fix a bunch of cross browser bugs (IE 11 especially) that I ran into recently!

Shouldn't necessarily block this one -- just more a heads up that we've been kicking the tires for quite a while and came up a few things to button things up.

sghoweri added 2 commits July 16, 2019 19:46
# Conflicts:
#	packages/uikit-workshop/dist/index.html
#	packages/uikit-workshop/dist/styleguide/css/pattern-lab.css
#	packages/uikit-workshop/dist/styleguide/js/patternlab-pattern.js
#	packages/uikit-workshop/dist/styleguide/js/patternlab-viewer.js
#	packages/uikit-workshop/package.json
#	packages/uikit-workshop/src/html/index.html
#	packages/uikit-workshop/src/sass/pattern-lab.scss
#	packages/uikit-workshop/src/sass/scss/04-components/_pattern-info.scss
#	packages/uikit-workshop/src/sass/scss/04-components/_tabs.scss
#	packages/uikit-workshop/src/sass/scss/05-themes/_light-theme.scss
#	packages/uikit-workshop/src/sass/scss/05-themes/_sidebar-theme.scss
#	packages/uikit-workshop/src/scripts/actions/app.js
#	packages/uikit-workshop/src/scripts/components/modal-viewer.js
#	packages/uikit-workshop/src/scripts/components/panels-viewer.js
#	packages/uikit-workshop/src/scripts/components/pl-controls/pl-controls.js
#	packages/uikit-workshop/src/scripts/components/pl-drawer/pl-drawer.js
#	packages/uikit-workshop/src/scripts/components/pl-drawer/pl-drawer.scss
#	packages/uikit-workshop/src/scripts/components/pl-header/pl-header.js
#	packages/uikit-workshop/src/scripts/components/pl-header/pl-header.scss
#	packages/uikit-workshop/src/scripts/components/pl-layout/pl-layout.js
#	packages/uikit-workshop/src/scripts/components/pl-layout/pl-layout.scss
#	packages/uikit-workshop/src/scripts/components/pl-nav/pl-nav.js
#	packages/uikit-workshop/src/scripts/components/pl-search/pl-search.scss
#	packages/uikit-workshop/src/scripts/components/pl-toggle-info/pl-toggle-info.js
#	packages/uikit-workshop/src/scripts/components/pl-toggle-info/pl-toggle-info.scss
#	packages/uikit-workshop/src/scripts/components/pl-toggle-theme/pl-toggle-theme.js
#	packages/uikit-workshop/src/scripts/components/pl-tools-menu/pl-tools-menu.js
#	packages/uikit-workshop/src/scripts/components/pl-viewport-size-list/pl-viewport-size-list.js
#	packages/uikit-workshop/src/scripts/components/pl-viewport-size-list/pl-viewport-size-list.scss
#	packages/uikit-workshop/src/scripts/components/pl-viewport-size/pl-viewport-size.js
#	packages/uikit-workshop/src/scripts/components/pl-viewport/pl-viewport.js
#	packages/uikit-workshop/src/scripts/components/styleguide.js
#	packages/uikit-workshop/src/scripts/patternlab-viewer.js
#	packages/uikit-workshop/src/scripts/reducers/app.js
#	packages/uikit-workshop/src/scripts/utils/index.js
#	packages/uikit-workshop/src/scripts/utils/pattern-name.js
#	packages/uikit-workshop/webpack.config.js
@sghoweri
Copy link
Contributor Author

@bmuenzenmeyer, after resolving merge conflicts with the latest code from dev, I noticed a couple things in the UI still weren't looking as buttoned up I as recall they were in April so I went ahead and pulled in most** of the big cross browser bug fixes and updates I've been working on from April till July which did the trick!

Should be ready to have you take another look at this!

**sans some of the server side pre-rendering / Google puppeteer updates -- I'll try to get those in via a separate PR.

@sghoweri
Copy link
Contributor Author

^ I also noticed the Travis build was failing due to some unrelated eslint errors in packages/core so I autofixed those as well so the full CI build can run

@bmuenzenmeyer
Copy link
Member

bmuenzenmeyer commented Jul 23, 2019

is this what i should be seeing on initial load?

image

@sghoweri
Copy link
Contributor Author

is this what i should be seeing on initial load?

image

@bmuenzenmeyer that's almost what I'd expect to see on initial load. The weird thing mostly is just the Viewall page seemingly not showing up.

Out of curiosity, are you seeing a JS error or 404 error getting thrown? If it's a 404 error, it could just be there's an initial path option that needs to get fixed.

@bmuenzenmeyer
Copy link
Member

bmuenzenmeyer commented Jul 25, 2019 via email

@sghoweri
Copy link
Contributor Author

Hmmm. The initial iframe URL src is set to undefined (but should still update if you change pages via the nav).

image

image

Double-checking to make sure I have the right initial path in there.

@sghoweri
Copy link
Contributor Author

Fixed! Pushing 1-liner fix up 👍

@sghoweri sghoweri requested a review from bmuenzenmeyer July 25, 2019 12:36
@bmuenzenmeyer bmuenzenmeyer merged commit 0ae22a9 into dev Aug 20, 2019
@bmuenzenmeyer
Copy link
Member

https://www.youtube.com/watch?v=NmPhaG1ud38

bmuenzenmeyer added a commit that referenced this pull request Aug 23, 2019
likely broke when manually merging #1008
@bradfrost
Copy link
Member

Woohoo! Great work everybody!

@bmuenzenmeyer bmuenzenmeyer deleted the feature/uikit-refactor--batched-updates branch February 9, 2020 21:09
antonia-rose pushed a commit to quelltexterin/nemo-uikit-workshop that referenced this pull request Apr 12, 2023
likely broke when manually merging pattern-lab#1008
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.

5 participants