<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Nick Alico</title>
    <description>The latest articles on Forem by Nick Alico (@nro337).</description>
    <link>https://forem.com/nro337</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F374651%2Fce68ad54-6c38-4415-8ec5-17ff29f1bdb6.jpg</url>
      <title>Forem: Nick Alico</title>
      <link>https://forem.com/nro337</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/nro337"/>
    <language>en</language>
    <item>
      <title>Creating a Sorting Game</title>
      <dc:creator>Nick Alico</dc:creator>
      <pubDate>Mon, 13 Dec 2021 03:42:04 +0000</pubDate>
      <link>https://forem.com/nro337/creating-a-sorting-game-697</link>
      <guid>https://forem.com/nro337/creating-a-sorting-game-697</guid>
      <description>&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;I had the opportunity to work with a team of fellow developers to create a fully-fledged, interactive component as the culimation of our efforts learning component-based design and development using JavaScript. Using &lt;a href="https://lit.dev/" rel="noopener noreferrer"&gt;LitElement&lt;/a&gt; as our JS web component library, we developed our project with the intent of creating a versatile component that could be adopted for use within the Open-source &lt;a href="https://haxtheweb.org/" rel="noopener noreferrer"&gt;Hax-the-Web&lt;/a&gt; project.&lt;/p&gt;

&lt;p&gt;Our team decided to create a sorting game where users are able to sort items in a list-based fashion, either by dragging or via buttons, until the correct order is achieved.&lt;/p&gt;

&lt;p&gt;Here is the &lt;a href="https://www.npmjs.com/package/@table-in-the-corner/project-3" rel="noopener noreferrer"&gt;NPM&lt;/a&gt; link if you are interested!&lt;/p&gt;

&lt;p&gt;This is the original sorting game we targeted to reproduce as a web component: "&lt;a href="https://h5p.org/content-types/sort-the-paragraphs" rel="noopener noreferrer"&gt;Sort the Paragraphs&lt;/a&gt;"&lt;/p&gt;

&lt;h3&gt;
  
  
  Buttons
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F46e6f1hk8korbr3m7e8v.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F46e6f1hk8korbr3m7e8v.gif" alt="Button use gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Dragging
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fju9gurnxuphc8xe703q0.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fju9gurnxuphc8xe703q0.gif" alt="Dragging options gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Tutorial
&lt;/h2&gt;

&lt;p&gt;In order to develop this sorting game, our implementation fell into 2 primary elements within the component. One is the frame (SortableFrame) and the other is the reusable option card (SortableOption). &lt;/p&gt;

&lt;p&gt;Dragging was particularly challenging for myself specifically to try to wrap my head around. Initially, I went down a very difficult path where I was attempting to great one universal event listener in the SortableFrame that would handle an option every time a drag was started. This meant that I was creating a sortable option, and below each card was an associated droppable area. I then intended to toggle this droppable area depending on whether the card actively being dragged was dropped within the bounds of that drop area.&lt;/p&gt;

&lt;p&gt;The problem with this approach was that it was very difficult to discern different types of drag events (dragstart, dragend, drag, drop, etc.). It was also a haggle to re-append drop zones once an option card was moved in the list. I was warned that the edge cases for this approach would be incredibly tedious, so instead our team took the route of applying one drag handler to the sortable option that could be reused within each option. This way, it would only be triggered when that element itself began its drag.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;

  &lt;span class="c1"&gt;// The Mouse position, drag position, and offSetTop logic was taken nearly directly from Sean's SlimeSorting Implementation&lt;/span&gt;
&lt;span class="c1"&gt;// The overall idea of how to go about dragging to sort each option was taken from Sean as well&lt;/span&gt;

&lt;span class="nf"&gt;drag&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ev&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;pos&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;ev&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;clientY&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;currentIndex&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;  &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;dragPosition&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;position&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;offsetTop&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;pos&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt;  &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;position&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;pos&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;index&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;  &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;index&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;parentElement&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;children&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;index&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt;  &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;parentElement&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;children&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;currentIndex&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;innerHeight&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;parentElement&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;clientHeight&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;  &lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;offsetTop&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;position&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;  &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="c1"&gt;// https://stackoverflow.com/questions/9732624/how-to-swap-dom-child-nodes-in-javascript&lt;/span&gt;
            &lt;span class="c1"&gt;// https://stackoverflow.com/questions/4793604/how-to-insert-an-element-after-another-element-in-javascript-without-using-a-lib&lt;/span&gt;
            &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;parentElement&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;insertBefore&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;parentElement&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;children&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;currentIndex&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;offsetTop&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;position&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;  &lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;parentElement&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;insertBefore&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;parentElement&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;children&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;currentIndex&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;  &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;nextElementSibling&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;offsetTop&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;position&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;  &lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;parentElement&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;insertBefore&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;parentElement&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;children&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;currentIndex&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;offsetTop&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;position&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;  &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;parentElement&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;insertBefore&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;parentElement&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;children&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;currentIndex&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;  &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;nextElementSibling&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;disable&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;I want to give major credit to Sean for not only discovering how to use offsetTop and the cursor's current Y position to calculate the distance dragged before a dragged item should move, but for also taking the time to explain to me how he came about his solution and why it works. All credit goes to him for discovering it and allowing me to use it as well. I really struggled to implement something similar on my own volition. While I would have liked to find a novel solution myself, I ended up following his core cursor position and drag calculation detection logic as the structure of my team's draggable component logic.  Please check out &lt;a href="https://github.com/Viable-Slime/slime-the-web/blob/f4f475b61416b1551943214e98c7062e29d04dde/src/SlimeSortingOption.js#L52" rel="noopener noreferrer"&gt;Sean and his group's implemention&lt;/a&gt; of this card sorting logic, all credit goes to him.&lt;/p&gt;

&lt;p&gt;I then went in and worked on editing the parameters to detect our desired drag distance, as well as attempted to put in some additional handling related to how far your have to drag your cursor on smaller screens where not all options may be able to fit on the screen at once.&lt;/p&gt;

&lt;p&gt;Another novel approach I thought was really cool was the use of the &lt;a href="https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle" rel="noopener noreferrer"&gt;Fisher-Yates (Knuth) Shuffle algorithm&lt;/a&gt;, which was suggested to me via StackOverflow when I was trying to find the best way to randomize the game's options when you first start to play. &lt;a href="https://stackoverflow.com/questions/2450954/how-to-randomize-shuffle-a-javascript-array" rel="noopener noreferrer"&gt;Here&lt;/a&gt; is the source I duplicated to implement this sorting algorithm.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;

&lt;span class="c1"&gt;// Fisher-Yates (Knuth) Shuffle&lt;/span&gt;
&lt;span class="c1"&gt;// https://stackoverflow.com/questions/2450954/how-to-randomize-shuffle-a-javascript-array&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;currentIndex&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;question&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;answers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;randomIndex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// While there remain elements to shuffle...&lt;/span&gt;
&lt;span class="k"&gt;while &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;currentIndex&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt;  &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="c1"&gt;// Pick a remaining element...&lt;/span&gt;
    &lt;span class="nx"&gt;randomIndex&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;  &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;floor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;random&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;currentIndex&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;currentIndex&lt;/span&gt; &lt;span class="o"&gt;-=&lt;/span&gt;  &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="c1"&gt;// And swap it with the current element.&lt;/span&gt;
    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;randomized&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;currentIndex&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;randomized&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;randomIndex&lt;/span&gt;&lt;span class="p"&gt;]]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;randomized&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;randomIndex&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;randomized&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;currentIndex&lt;/span&gt;&lt;span class="p"&gt;],];&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Finally, it was also interesting how we ended up disabling the up arrow on the upper-most option and the down arrow on the lowest option. It was suggested to use nextElementSibling as opposed to our original use of nextSibling. nextSibling can actually return a blank, whitespace TextNode as the "next sibling" when items are injected into the DOM, so it was really interesting to come across this issue. &lt;a href="https://newbedev.com/whats-the-difference-between-nextelementsibling-vs-nextsibling" rel="noopener noreferrer"&gt;This&lt;/a&gt; is an explanation. Here is the function for disabling the down arrow:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;

&lt;span class="nf"&gt;downbtn&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;nextElementSibling&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt;  &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;after&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;nextElementSibling&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;sortable-frame&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;shadowRoot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;.frame&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#options&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;querySelectorAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;sortable-option&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;option&lt;/span&gt;  &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;option&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;shadowRoot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelectorAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;button&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;but&lt;/span&gt;  &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="c1"&gt;// eslint-disable-next-line no-param-reassign&lt;/span&gt;
            &lt;span class="nx"&gt;but&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;disabled&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;  &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="p"&gt;});&lt;/span&gt;
        &lt;span class="p"&gt;});&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;parentNode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;insertBefore&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;after&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;disable&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;p&gt;Our team used a number of very helpful resources to assist with our implementation. As suggested by other developers, &lt;a href="https://codepen.io/andyvanee/pen/KKKaOmw" rel="noopener noreferrer"&gt;this&lt;/a&gt; CodePen was suggested as one possible way we could re-engineer the sorting aspect of the component. This implementation actually uses an older version of LitElement, so it was very interesting to use this as a baseline even though we really didn't go down this route a ton.&lt;/p&gt;

&lt;p&gt;Another cool implementation I found, one that focused more on the design side of a sorting game than the development side, was &lt;a href="https://www.darins.page/articles/designing-a-reorderable-list-component#demo" rel="noopener noreferrer"&gt;this awesome post&lt;/a&gt; put out by Darin Senneff on 11/8/2021. This design is leagues above our implementation, so I highly recommend checking it out if you want to make your own insanely thorough component. &lt;/p&gt;

&lt;p&gt;Another reference I used was suggested to me by a fellow developer as a way to import and process JSON files containing user-generated questions and answers. Using the Hax-the-Web support for modular web components, our team used the &lt;a href="https://dev.to/btopro/understanding-haxschema-the-api-powering-our-editor-2ln6"&gt;HAXSchema&lt;/a&gt; to wire-up this game to support user-generated questions. Following a standard JSON format, users who reference a local JSON file containing their questions and answers will be able to support their own sorting game questions! &lt;a href="https://github.com/elmsln/lrnwebcomponents/blob/master/elements/csv-render/src/csv-render.js#L284" rel="noopener noreferrer"&gt;This&lt;/a&gt; is the function that was sent to me to help me reverse engineer some support for reading JSON files into the component.&lt;/p&gt;

&lt;p&gt;In the project, we also used the &lt;a href="https://www.npmjs.com/package/@lrnwebcomponents/simple-icon" rel="noopener noreferrer"&gt;SimpleIcon&lt;/a&gt; and SimpleIconLite libraries for the arrow icons for the buttons on our card options. &lt;a href="https://dev.to/btopro/making-a-simple-icon-web-component-3bc9"&gt;Here&lt;/a&gt; is a great tutorial.&lt;/p&gt;
&lt;h2&gt;
  
  
  CodePen and Github links
&lt;/h2&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/nro337/embed/OJxbObr?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;br&gt;
Note: Dragging kinda works in the embedded CodePen, open the link to fully interact!&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/table-in-the-corner" rel="noopener noreferrer"&gt;
        table-in-the-corner
      &lt;/a&gt; / &lt;a href="https://github.com/table-in-the-corner/project-3" rel="noopener noreferrer"&gt;
        project-3
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;A Project EdTechJoker creation&lt;/h1&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://opensource.org/licenses/Apache-2.0" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/c355f200ea90fddaa407b6eaab303663a669248ea3ca7b1fcf77dbe04ff5f48c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d417061636865253230322e302d626c75652e737667" alt="License: Apache 2.0"&gt;&lt;/a&gt;
&lt;a href="https://lit.dev/" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/8160c37a0b4ee1ef5a5d615f750826e016be54d183b8cbd28717a60c89e4a92c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d4c69742d3332346666663f7374796c653d666c6174266c6f676f3d646174613a696d6167652f737667253262786d6c3b6261736536342c50484e325a79426d615778735053496a5a6d5a6d4969423261575633516d393450534977494441674d545977494449774d43496765473173626e4d39496d6830644841364c79393364336375647a4d7562334a6e4c7a49774d44417663335a6e496a3438634746306143426b50534a744d54597749446777646a6777624330304d4330304d4870744c54517749445177646a6777624451774c545177656d30774c546777646a6777624330304d4330304d4870744c54517749445177646a6777624451774c545177656d30744e4441744e4442324f4442734e4441744e444236625451774c545177646a6777624330304d4330304d4870744c545177494445794d4859344d4777744e4441744e444236625330304d4330304d4859344d4777304d4330304d486f694c7a34384c334e325a7a34253344" alt="Lit"&gt;&lt;/a&gt;
&lt;a href="https://haxtheweb.org/" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/c16b966e7b1a0fab2671186301e594fe990cca90f58acfb3dd531f28258f3930/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d4841585468655765622d39393939393946463f7374796c653d666c6174266c6f676f3d646174613a696d6167652f737667253262786d6c3b6261736536342c50484e325a7942705a4430695a6d56684d5445785a5441744d6a45775a433030593251774c574a684d5751745a475a6d4f5451794f4463304e6a67314969426b595852684c57356862575539496b78686557567949444569494868746247357a50534a6f644852774f693876643364334c6e637a4c6d39795a7938794d4441774c334e325a794967646d6c6c64304a76654430694d434177494445344e4334304944457a4e5334354e79492b5047526c5a6e4d2b50484e306557786c5069356c4d574a6a4d6a41794e5330784f4441774c54526b597a49744f4463344e53316a4e445a6c5a4445774d3259304f544a375a6d6c7362446f6a4d6a4d785a6a49774f3330384c334e306557786c506a77765a47566d637a3438634746306143426a6247467a637a30695a544669597a49774d6a55744d5467774d4330305a474d794c5467334f445574597a51325a5751784d444e6d4e446b794969426b50534a4e4e7a67754d4463734f444d754e4456574e5456494f4459754d6e59344c6a457a614445324c6a4932646a51754d44646f4e4334774e3159344d7934304e5567354f433430566a59334c6a4535534467324c6a4a574f444d754e4456614969382b5048427662486c6e6232346763473970626e527a505349784e544d754d544d674e6a4d754e7941784e544d754d544d674e5445754d7a6b674d5451774c6a5530494455784c6a4d35494445304d4334314e43417a4f5334774f5341784d6a63754f5455674d7a6b754d446b674d5449334c6a6b31494449324c6a6335494445774d6934334f4341794e6934334f5341784d4449754e7a67674d7a6b754d446b674d5445314c6a4d3249444d354c6a4135494445784e53347a4e6941314d53347a4f5341784d6a63754f5455674e5445754d7a6b674d5449334c6a6b314944597a4c6a63674d5451774c6a55304944597a4c6a63674d5451774c6a553049446332494445794e79347a4e6941334e6941784d6a63754d7a59674f4467754d7941784d5451754e7a67674f4467754d7941784d5451754e7a67674d5441774c6a5978494445774d6934784f5341784d4441754e6a45674d5441794c6a4535494445784d6934354d5341784d6a63754d7a59674d5445794c6a6b78494445794e79347a4e6941784d4441754e6a45674d544d354c6a6b31494445774d4334324d5341784d7a6b754f5455674f4467754d7941784e5449754e5451674f4467754d7941784e5449754e5451674e7a59674d5459314c6a637949446332494445324e5334334d6941324d793433494445314d7934784d7941324d7934334969382b5048427662486c6e6232346763473970626e527a5053497a4d7934784d7941324d79343349444d7a4c6a457a494455784c6a4d35494451314c6a6379494455784c6a4d35494451314c6a637949444d354c6a4135494455344c6a4d7849444d354c6a4135494455344c6a4d78494449324c6a63354944677a4c6a5134494449324c6a63354944677a4c6a513449444d354c6a4135494463774c6a673549444d354c6a4135494463774c6a6735494455784c6a4d35494455344c6a4d78494455784c6a4d35494455344c6a4d784944597a4c6a63674e4455754e7a49674e6a4d754e7941304e5334334d6941334e6941314f4334344f5341334e6941314f4334344f5341344f43347a494463784c6a5134494467344c6a4d674e7a45754e4467674d5441774c6a5978494467304c6a4133494445774d4334324d5341344e4334774e7941784d5449754f5445674e5467754f446b674d5445794c6a6b78494455344c6a6735494445774d4334324d5341304e69347a4d5341784d4441754e6a45674e4459754d7a45674f4467754d79417a4d7934334d6941344f43347a49444d7a4c6a637949446332494449774c6a553049446332494449774c6a55304944597a4c6a63674d7a4d754d544d674e6a4d754e794976506a777663335a6e50673d3d" alt="#HAXTheWeb"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;See &lt;a href="https://github.com/elmsln/edtechjoker/blob/master/fall-21/projects/p3-haxtheweb/README.md" rel="noopener noreferrer"&gt;https://github.com/elmsln/edtechjoker/blob/master/fall-21/projects/p3-haxtheweb/README.md&lt;/a&gt; for requirements to complete this project.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/open-wc" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/4e4d866459c20be9bdc9f513c9c77ac627121ff58382571803bc88a22cdcb0c4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6275696c74253230776974682d6f70656e2d2d77632d626c75652e737667" alt="Built with open-wc recommendations"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Quickstart&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;To get started:&lt;/p&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;yarn install
yarn start
&lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;#&lt;/span&gt; requires node 10 &amp;amp; npm 6 or higher&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Navigate to the HAX page to see it in context. Make sure to change &lt;code&gt;rename-me&lt;/code&gt; in ALL parts of the repo to your project name.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Scripts&lt;/h2&gt;

&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;start&lt;/code&gt; runs your app for development, reloading on file changes&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;start:build&lt;/code&gt; runs your app after it has been built using the build command&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;build&lt;/code&gt; builds your app and outputs it in your &lt;code&gt;dist&lt;/code&gt; directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;test&lt;/code&gt; runs your test suite with Web Test Runner&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;lint&lt;/code&gt; runs the linter for your project&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;format&lt;/code&gt; fixes linting and formatting errors&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Tooling configs&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;For most of the tools, the configuration is in the &lt;code&gt;package.json&lt;/code&gt; to reduce the amount of files in your project.&lt;/p&gt;
&lt;p&gt;If you customize the configuration a lot, you can consider moving them to individual files.&lt;/p&gt;
&lt;/div&gt;



&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/table-in-the-corner/project-3" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;p&gt;&lt;a href="https://www.npmjs.com/package/@table-in-the-corner/project-3" rel="noopener noreferrer"&gt;NPM Link&lt;/a&gt;: &lt;a href="https://www.npmjs.com/package/@table-in-the-corner/project-3" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/@table-in-the-corner/project-3&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Don't hesitate to reach out if you have any questions. Thanks for your interest!&lt;/p&gt;

</description>
      <category>litelement</category>
      <category>webcomponents</category>
      <category>haxtheweb</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Passion Project</title>
      <dc:creator>Nick Alico</dc:creator>
      <pubDate>Mon, 08 Nov 2021 02:19:15 +0000</pubDate>
      <link>https://forem.com/nro337/passion-project-m0h</link>
      <guid>https://forem.com/nro337/passion-project-m0h</guid>
      <description>&lt;p&gt;Often as developers, we get asked what we do, how we contribute to a project, etc. etc. We don't usually get asked about what we would do if we had infinite time, unlimited resources, none of life's nuanced responsibilities; What project would we work on if there were truly no limitations stopping us?&lt;/p&gt;

&lt;p&gt;For me, the answer to that question would undoubtedly be related to design systems. Specifically, I want to make an open source web platform that brings the ability and interests to students, hobbyists, and professional designers and developers alike in an effort to show the importance and purpose of creating accessible design systems for any use case or project. I spend a good portion of my internship this past summer working on using an internal design system to build an updated design for the application I was working on that followed these updated design standards. I've grown very passionate about design systems, and think they really are the future of bridging the gap between design and development consistency. The issue is that design systems are almost solely developed and used by larger companies and created/maintained by hyper-specialize teams.&lt;/p&gt;

&lt;p&gt;My vision is to create a design system platform, where individual users and small teams coming from no experience to expert status related to design systems can come to one place to find details and content to help in their design system's development. Just starting a design system at your start-up? My platform will support a comprehensive documentation and resources component that will be community-driven to help users discover a learn about how to get started or expand upon a design system. The platform will include references to other design systems to allow users to research and reference established systems to gather their own ideas. The site will also support a snippets section, where categorized component types will be grouped together and filterable to allow anyone to easily include components into their own project. The platform would additionally support a chatroom/blog-based feature that allows people to share their development progress as they design and create their own design systems. Here users could chat, ask questions, or gain community advice and guidance regarding their own design platforms. The point is that design systems should be encouraged and supported to be built and used by everyone, not just the team of 20 principal designers and developers at a FAANG company.&lt;/p&gt;

&lt;p&gt;I would use this platform as simply a maintainer and co-manager of the open source platform. I would also help to advocate for education in design systems for students, junior developers, and for companies of all sizes looking to create their own systems or component libraries.&lt;/p&gt;

&lt;p&gt;Accessibility is another huge piece of the puzzle that is missing from like 80% of design systems. Development teams continually refuse to prioritize making accessible elements and/or supporting accessible components in design systems. According to &lt;a href="https://blog.usablenet.com/a-record-breaking-year-for-ada-digital-accessibility-lawsuits"&gt;Useablenet&lt;/a&gt; and &lt;a href="https://monsido.com/blog/accessibility-statistics"&gt;Monsido&lt;/a&gt;, there were 3500 digital accessibility lawsuits amassed in 2020 alone! I want to help change that. This design system "information database" would dedicate an entire portion of the platform to explaining, justifying, and displaying examples of components and design systems that were designed with accessibility in mind. I'm a believer that the future of web design MUST take accessibility standards more seriously. There is no reason we should be excluding upwards of 1 billion people (by 2010 world estimates) with a disability from accessing what should be a universal public utility: high-speed internet (&lt;a href="https://www.who.int/disabilities/world_report/2011/report.pdf"&gt;WHO&lt;/a&gt;, 2011).&lt;/p&gt;

&lt;p&gt;I want to get started on this project, to help bring the word that people who are interested should just start a design system. It does not need to be a perfect system from day one. The point is that they are always iterative and adapting to meet the needs of the company. I think there would be great promise once more of the public was able to see actual examples of the systems being implemented that result in improved efficiency in design and development teams at all levels. The future is design systems, and I want to help pioneer that message.&lt;/p&gt;

&lt;p&gt;Sources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://blog.usablenet.com/a-record-breaking-year-for-ada-digital-accessibility-lawsuits"&gt;https://blog.usablenet.com/a-record-breaking-year-for-ada-digital-accessibility-lawsuits&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://monsido.com/blog/accessibility-statistics"&gt;https://monsido.com/blog/accessibility-statistics&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Header image: &lt;a href="https://pixabay.com/photos/plans-design-web-design-designer-1867745/"&gt;https://pixabay.com/photos/plans-design-web-design-designer-1867745/&lt;/a&gt;&lt;br&gt;
Creator: &lt;a href="https://pixabay.com/users/pexels-2286921/?utm_source=link-attribution&amp;amp;utm_medium=referral&amp;amp;utm_campaign=image&amp;amp;utm_content=1867745"&gt;https://pixabay.com/users/pexels-2286921/?utm_source=link-attribution&amp;amp;utm_medium=referral&amp;amp;utm_campaign=image&amp;amp;utm_content=1867745&lt;/a&gt; &lt;/p&gt;

</description>
      <category>designsystems</category>
      <category>design</category>
    </item>
    <item>
      <title>Slot Composition in Lit - What it is and how it is used</title>
      <dc:creator>Nick Alico</dc:creator>
      <pubDate>Mon, 25 Oct 2021 02:49:05 +0000</pubDate>
      <link>https://forem.com/nro337/-slot-composition-in-lit-what-it-is-and-how-it-is-used-3f36</link>
      <guid>https://forem.com/nro337/-slot-composition-in-lit-what-it-is-and-how-it-is-used-3f36</guid>
      <description>&lt;p&gt;Slotting, or slotted composition, is one of those technical concepts that can be very confusing to initially understand. Its modular rendering between elements can make it difficult for people new to Lit to see the changes they are making and how the updated content is actually rendered.&lt;/p&gt;

&lt;p&gt;For this assignment, I have been working on re-engineering a modular card component:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpnlfkwhuvlhb1uf7emd0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpnlfkwhuvlhb1uf7emd0.png" alt="Image of Visual Goal of Cards"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In order to make the constuction of this component more modular, it was determined that breaking down the component into smaller elements would be a fantastic way to allow for the dynamic rendering of content, such as the type/theme of the card, header and subheader content, card body content, or any other media you may want to place in a card.&lt;/p&gt;

&lt;p&gt;I think the &lt;a href="https://lit.dev/docs/components/shadow-dom/#slots" rel="noopener noreferrer"&gt;official Lit documentation&lt;/a&gt; on slots is a great resource to check out, as I will be covering the content here as well.&lt;/p&gt;

&lt;p&gt;At a simple level, you can think of slots somewhat like a modular container that you have complete structural control over. Slotting gives you the ability to pass dynamic content between different elements that you create, while supporting the ability to struture the rendered HTML and content however you see fit! This passage of content allows for abstraction of code in each element so that it is much easier to read and follow where content is being passed.&lt;/p&gt;

&lt;p&gt;For example, take a look at the banner code which contains the icon and banner headings of the card:&lt;/p&gt;

&lt;h3&gt;
  
  
  CardBanner.js
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"bannerElement"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;sci-card-icon&lt;/span&gt;
    &lt;span class="na"&gt;icon=&lt;/span&gt;&lt;span class="s"&gt;"test"&lt;/span&gt;
    &lt;span class="na"&gt;my-icon=&lt;/span&gt;&lt;span class="s"&gt;"${this.myIcon}"&lt;/span&gt;
    &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"${this.myIcon}"&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;gt;&amp;lt;/sci-card-icon&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt;  &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"banner"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt;  &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"headers"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;slot&lt;/span&gt;  &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"main-header"&lt;/span&gt;  &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"main-header"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/slot&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;slot&lt;/span&gt;  &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"sub-header"&lt;/span&gt;  &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"sub-header"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/slot&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;script  &lt;/span&gt;&lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"module"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./src/app.js&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./src/SciCardIcon.js&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, we are defining two slots using the &lt;code&gt;&amp;lt;slot&amp;gt;&lt;/code&gt; tag. This example performs slotting using named slots. The custom name use choose will be used as the name that you will use where you want to actually render these headings on the card. If we migrate over to our Card.js file, we will see a &lt;code&gt;&amp;lt;div slot="main-header"&amp;gt;&lt;/code&gt; which you should recognize when it was defined from the above &lt;code&gt;&amp;lt;slot name="main-header"&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Card.js
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt;
&lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"slot-wrapper"&lt;/span&gt;
&lt;span class="na"&gt;data-label=&lt;/span&gt;&lt;span class="s"&gt;"Header"&lt;/span&gt;
&lt;span class="na"&gt;data-layout-slotname=&lt;/span&gt;&lt;span class="s"&gt;"header"&lt;/span&gt;
&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;sci-card-banner&lt;/span&gt;  &lt;span class="na"&gt;my-icon=&lt;/span&gt;&lt;span class="s"&gt;"${this.myIcon}"&lt;/span&gt;  &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"${this.type}"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt;  &lt;span class="na"&gt;slot=&lt;/span&gt;&lt;span class="s"&gt;"main-header"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;slot&lt;/span&gt;  &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"mainheader"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;${this.mainheader}&lt;span class="nt"&gt;&amp;lt;/slot&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt;  &lt;span class="na"&gt;slot=&lt;/span&gt;&lt;span class="s"&gt;"sub-header"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;slot&lt;/span&gt;  &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"subheader"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;${this.subheader}&lt;span class="nt"&gt;&amp;lt;/slot&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/sci-card-banner&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;&amp;lt;div slot=""&amp;gt;&lt;/code&gt; is the keyword reference used to tell Lit how we want to structure the rendering and where we want the "main-header" and "sub-header" text to render relative to the icon in the banner. The astute eye will notice that Card.js is using yet another slot tag within the already defined structure of &lt;code&gt;slot=main-header&lt;/code&gt; like we discussed. &lt;code&gt;${this.mainheader}&lt;/code&gt; references the actual text we want to render, but Card.js isn't the highest element in our scaffolding that we are rendering. We now see &lt;code&gt;&amp;lt;slot name="mainheader"&amp;gt;&lt;/code&gt; encapsulating that header text. One level outside of that, we see the entire outer DIV is labeled as &lt;code&gt;&amp;lt;div data-layout-slotname="header"&amp;gt;&lt;/code&gt;. Let's go look at the outermost layer of our element tree: CardFrame.js.&lt;/p&gt;

&lt;h3&gt;
  
  
  CardFrame.js
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;sci-card&lt;/span&gt;  &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"${this.type}"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt;  &lt;span class="na"&gt;slot=&lt;/span&gt;&lt;span class="s"&gt;"header"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/sci-card&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, you can see that in a very clean and modular manner, we are simply specifying that inside our sci-card (Card.js) element, we want to have everything that's rendered inside it to be from the slot with &lt;code&gt;name="header"&lt;/code&gt;, which directly references the outer DIV in Card.js. Therefore, we can now see that the entire HTML of that specific card banner will be rendered within the &lt;code&gt;&amp;lt;sci-card&amp;gt;&lt;/code&gt; tag. This is great for readability, and makes it clear to developers that all they have to do is find where a slot with &lt;code&gt;name="header"&lt;/code&gt; is defined in order to see the next layer of slotted content&lt;/p&gt;

&lt;p&gt;Please take a look at the official documentation for an even simpler example of using slots. &lt;/p&gt;

&lt;p&gt;I hope you learned something useful from this escapade into slots! &lt;/p&gt;

&lt;p&gt;Check out the &lt;a href="https://github.com/table-in-the-corner/project-two" rel="noopener noreferrer"&gt;project&lt;/a&gt; if you are interested!&lt;/p&gt;




&lt;p&gt;Header image provided by: &lt;a href="https://i0.hippopx.com/photos/386/749/243/programming-html-code-coding-preview.jpg" rel="noopener noreferrer"&gt;https://i0.hippopx.com/photos/386/749/243/programming-html-code-coding-preview.jpg&lt;/a&gt;&lt;/p&gt;

</description>
      <category>lit</category>
      <category>litelement</category>
      <category>slots</category>
      <category>slottedcomposition</category>
    </item>
    <item>
      <title>Analysis of Building a Web Component</title>
      <dc:creator>Nick Alico</dc:creator>
      <pubDate>Sun, 10 Oct 2021 19:39:42 +0000</pubDate>
      <link>https://forem.com/nro337/analysis-of-building-a-web-component-1nbe</link>
      <guid>https://forem.com/nro337/analysis-of-building-a-web-component-1nbe</guid>
      <description>&lt;h2&gt;
  
  
  Design, Build, Extend
&lt;/h2&gt;

&lt;p&gt;I like to approach the idea of designing and building a web component similar to how I have been trained to approach UX Design: following the Design Thinking Method. For those of you who are unfamiliar, the Design Thinking Method is a design approach which incentivises considering all potential aspects and perspectives of design, and applies an iterative approach to discover design components, user requirements, and refine implementation decisions. The 5 part system consists of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Empathize&lt;/li&gt;
&lt;li&gt;Define&lt;/li&gt;
&lt;li&gt;Ideate&lt;/li&gt;
&lt;li&gt;Prototype&lt;/li&gt;
&lt;li&gt;Test&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Courtesy of the Hasso-Plattner Institute of Design at Stanford&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Let's break down how these 5 steps dictated my considerations and approach when building a web component and developing on its API.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Empathize&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We do this innately, but in the form of web components it's important to think about the type of component you will be developing and the people that will be using it. What is the background of the people who will likely use the component? Are there any usability and/or accessibility considerations that you will need to prioritize to meet the needs of your stakeholders? The goal is to try to paint a representative picture of the types of people who could use your component, and the types of ways they may try to use it. What if you component was used in a fashion or application other than what it was intended for? Would it be able to support that user's or that developer's intentions? Becasue web components are meant to be reused and extensible, it is important to keep these concepts in mind so that you avoid developing such a restricted component that it impossible to have it apply to other needs and use cases.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Define&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Defining the web component and its API can be one of the most challenging parts of building a component as it is one of the most crucial parts of the entire development process. If your empathize phase has clarified a base need or functionality, this will likely indicate that your need is aligned with a base behavior that is similar to a simple HTML element or well-known component that exists on the web today. For my first web component project, I knew I was building a CTA button which immediately meant I would need to include some type of &lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt; and/or &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; tags to complete the click and action-based events that are performed when a user clicks on a CTA button. You are then able to think about the bounds of your component. What use cases do you want to design for and support natively, and what considerations are not as crucial to your component? Maybe responsiveness for an array of different devices is crucial, but the level of animation or "flashiness" is not a huge concern because you are aiming for a minimalistic component. Situating this stance will allow you to better identify where to focus your efforts and how to plan your building process.
&lt;/li&gt;
&lt;li&gt;It is at this stage, once you have defined the bounds of your component, that you also need to consider the component's and associated element's APIs. What are the states that you need to design and implement for your component? What happens when you hover over it, or click on a button or icon? What happens when you use your keyboard to navigate to it? Is that behavior consistent with your hover behavior? Considering the states of your component will give you a better idea of the breadth required in building out the properties of you components. See the next section "Ideate" for further details on this.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Ideate&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This is one of my favorite parts of designing and developing software, the ability to have free reign over iterations of the design and structure of a project or component. The goal of ideating is to creatively and iteratively enact your plan for your component, and to specifically come up with variations and styles that you think would serve as interesting approachng to your component design. As mentioned above, the properties of you component come into play between the define and ideate stages. Think about the elements of your component, considering how the could change both with a change in your component's state or to meet the design needs of another developer. For the CTA button I worked on, my team and I considered aspects such as the button icon, title, whether the button was disabled, and theme properties such as dark or high contrast mode. Using these properties for the criteria to inform how you should develop CSS variations for you component will allow you to easily "reflect" certain properties within each implementation of your component. You can think of it almost as turning on or off a lightswitch: All a developer has to do is pass a value to that property on the component and they will be able to leverage a different design or theme. The reward of ideation emerges in the implementing and use phase, but it is a crucial step in driving the flexibility and use case support of your web component.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Prototype&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Here is the step where you are actually building out base versions of your component in an iterative fashion. At this period of the building process, it is important to understand that there are really no "bad" approaches: this is the point where you want to build elements into your component and style them in diverse ways from what you may initially think to be the correct approach. For example, I started out my CTA button using no animations because I thought it would be distracting from the button's functioning itself. However, our team ended up implmenting a fade-to-transparent transition on our button background that looks very smooth and is still fully accessible. Try using CSS variable to make this process easier on yourself, this way you can change the text color or font in one location in code, and see this change persist throughout your entire component. This is the best way to approach using themes, as you can simply overwrite the traditional component style with a themed style simply by checking the value of a reflected property on the component in HTML. Prototyping is meant for quick and dirty development in the beginning, and wil turn into a refinement process as you develop. This is done on purpose, and allows you to focus on more intricate logic and stylistic edge cases as your prototypes become more refined and situated.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Test&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Our final and often most disliked component of software development: testing. Testing is so crucial for any web component, as they are specifically designed to be reusable and adaptive components of code to allow for a wide array of applications and use cases. Testing for responsive design, accessibility, state management, navicability, etc. can be a nightmare as your components become more complex and add more elements into them. This is why I highly recommend using CSS variables for quick design manipulation, as well as the use of Storybook. Storybook functions as a customizable design library which easily lets developers implement and test different states, formats, and styles of their component side-by-side in one compact demo platform. It acts more as a visual testing platform, but allows for easy iteration and design management in later steps of the component development process.&lt;/li&gt;
&lt;li&gt;It is also crucial to write programming logic tests yourself as well. I won't go into this much, but it is crucial to understand whether certain content or data types will impact the functionality of your component. Most of this testing comes down to logic handling and edge-case recognition to see long-term benefits, but writing tests for your components will assure you are supporting a consistent experience across different states and use cases.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Component Breakdown
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Naturally, your component will need to be broken down into its constituent parts based on the modularity and flexibility that your design requirements specify, as well as based on the actual HTML structure of your component. The more complex your component, and the higher number of nested HTML tags, the all the more crucial it is to scaffold out a clear structure of how each element behaves. For example, my first web component involved designing a CTA button. This button consisted of a &lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt; tag with an &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; tag wrapped around it. The purpose of wrapping the button instead of using only a button tag was to allow the CTA button to function as a button that acts more as a hyperlink than a traditional button. The use case dictated that the button needed to open a completely new URL in a new browser tab, so it made more sense to nest the button tag so that the href used for the hyperlink could be attached across the entire button as well as any other elements that needed to be added to the button. If you wanted to add other clickable elements to the button in the future, it is as simple as nesting those elements at the same level as the button inside the &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; tag.&lt;/li&gt;
&lt;li&gt;The point of this example is to show that the way you structure and nest elements plays a huge role in the complexity of your CSS and the readability of your code. Poor element structuring can lead to messy CSS with dense logic to control different states, whereas a structured component like my CTA button allows for very simple implementation and customization as necessary by anyone intending to use the component.&lt;/li&gt;
&lt;/ul&gt;




&lt;ul&gt;
&lt;li&gt;Another component I am now working on consists of building a card web component. What is unique about the card compared to the initial button component I worked on is the fact that a card is a container of smaller elements. These smaller elements include a banner, content body, and an extensible icon. Our team was provided with a starter component that includes a basic scaffold of a card containing text and images, and demos a few different examples of the card's scaffolding to depict how the use of the &lt;em&gt;type&lt;/em&gt; keyword can allow for matching of card CSS styles to a specific card tag itself. The component is expected to use the button I have assisted in developing previously as a devDependency to demo interactivity of the card component. The component will utilize LitElement properties and Lifecycle functions to keep track of updating the behavior of the card based on each state and property value.&lt;/li&gt;
&lt;li&gt;For this component, it will be crucial to consider how each of these element's designs and dimensions will be leveraged together to allow for a cohesive stylistic experience when interacting with the card. For example, accessibility when users navigate with a keyboard through each of the elements is paramount, as we will need to be sure that a logical tab path allows for interaction with any actionable elements on the card. Another example would be the behavior of the card when a user clicks an item within the bounds of the component. We play to support a sliding card with hidden content behind the front pane, so it will be important in our scaffolding implementation to assure that selection of content inside the card will bubble up content and focus to the front pane of the card after click event occurs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1alcVf57--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n8hqppzwshsv4f5ui3zu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1alcVf57--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n8hqppzwshsv4f5ui3zu.png" alt="Basic Card Scaffolding Example"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;Provided Card Example&lt;/em&gt;
&lt;/h3&gt;




&lt;h2&gt;
  
  
  Expected Difficulties
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Building web components is hard: there I said it. Handling the vast number of states, properties, design edge cases, logic edge cases, and behaviors while supporting the extensibility that you desire for your component means much of your time will be spent writing specific CSS and monitoring how you pass properties into your component. One of the greatest challenges I faced was structuring my CSS in a way that targeted specific states without overwriting other states or thematic behavior.  If you have a poorly scaffolded component in the define and ideate stages, you will really struggle to reflect the visual aspects you want to have on your component behave the way it should in a readable manner. &lt;/li&gt;
&lt;li&gt;Another difficulty I faced was with deciding when my prototype was "complete". I would argue that a web component is never really complete, perhaps by design, but it can be hard to know when it is ready to ship as a usable component. I found myself considering more complex state logic and subsequent stylistic behavior of my CSS button, but realized these ideas were more than I needed to support given the purpose of the CTA button in the first place. This doesn't mean you shouldn't extend and update your components, or at least build in support for this customization, but that you should take this into account during ideation so you minimize the risk of scope creep.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Reflection on my First Experience
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Overall, my first experience developing a web component was an incredibly rewarding learning experience. I didn't really realize the complexity of considerations that went into designing something as "simple" as a button, so it gives me a great deal of respect for the designers and developers responsible for building our entire design systems and libraries at larger companies. These guides can become thousands of components and states as use cases become more precise, so having the forethought to look into how to ideate early while keeping a component's scalability in mind was a really valuable perspective to adopt as I continue into my professional career. It really comes down to motivation and consistency. The future of the web is component-based, and I think it is a highly valuable skill to bring component knowledge to your place of work as a front-end engineer. The modularity of web components really is the future of the web, and I think this will allow for a more simplistic customization process in the future of web design.&lt;/li&gt;
&lt;li&gt;It became easier for me to understand how components can relate to larger components within a webpage, and how explicit component-based design can make it very easy to support additional requirements and use cases within a system later on. Compared to a "one-and-done" UI development approach, web components make this experience of designing for the future night-and-day.&lt;/li&gt;
&lt;li&gt;Finally, I recommend working with partners when you are developing a component or set of components. You are really limited to your own mental model, which greatly restricts the use cases and value you may place on certain development decisions of a web component. Collaborating with others lets you test ideas more quickly, promotes your group to experiment and make mistakes, and will ultimately make you aware of more features and nuances of the platform you are using, whether that be LitElement or a JS framework such as React or Vue.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Please take a look into building your first web component! It's a fun and rewarding experience that creates a more customizable and inclusive internet for all.&lt;/p&gt;

&lt;p&gt;Here's my group's button if you're interested: &lt;a href="https://www.npmjs.com/package/@table-in-the-corner/invisi-button"&gt;https://www.npmjs.com/package/@table-in-the-corner/invisi-button&lt;/a&gt; &lt;/p&gt;

</description>
      <category>webcomponents</category>
      <category>lit</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Development of a Button Web Component: Our Progress</title>
      <dc:creator>Nick Alico</dc:creator>
      <pubDate>Mon, 27 Sep 2021 01:18:20 +0000</pubDate>
      <link>https://forem.com/nro337/development-of-a-button-web-component-our-progress-40hb</link>
      <guid>https://forem.com/nro337/development-of-a-button-web-component-our-progress-40hb</guid>
      <description>&lt;h2&gt;
  
  
  Progress to Date
&lt;/h2&gt;

&lt;p&gt;In terms of the progress made by my teammate and I, we have come a very long way from 4-5 weeks ago when we were first introduced to Lit and Web Components. To date, we have been able to create a Call to Action (CTA) button extended from &lt;a href="https://teuxdeux.com/"&gt;this&lt;/a&gt; example we found on Teuxdeux's homepage. We started out by constructing a very basic button composed of a &lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt; nested in an &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; tag, and were able to grow our visual API to support various CSS styling designs. We have developed distinct visual and funtional support for four main button states: hover, focus, active, and disabled. We have tested for accessibility concerns regarding tab order and are continuing to leverage Storybook to investigate color contrast and support for other theming styles like our "dark" mode. Finally, out button uses some cool CSS transitions and rotations to allow out button to feel more animated and interactive. This is done when the user is hovering to dissipate to a transparent background while having our caret icon spin 90 degrees.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dgqGQvZg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y4lrkt8qulntimf81b8b.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dgqGQvZg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y4lrkt8qulntimf81b8b.gif" alt="Alt Text" width="270" height="260"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Difficulties Along the Way
&lt;/h2&gt;

&lt;p&gt;My teammate and I certainly faced a few difficulties along the way, as is common for any new learning process. There were a few nuances within LitElement that took some additional research and instructor clarification to truthfully understand how certain functions should be used. Things like the Shadowroot, the &lt;code&gt;&amp;lt;slot&amp;gt;&lt;/code&gt; tag, reflecting properties in the constructor, and using bindings like &lt;code&gt;@click&lt;/code&gt; just did not really click with me initially. I am used to vanilla JS where these do not exist, so wrapping my head around where the Shadowroot lies in the DOM Tree and why it is so awesome definitely took some time. Now that I have a better understanding of why reflecting properties makes data binding a breeze, it has helped situate me in my current development style as well.&lt;/p&gt;

&lt;h2&gt;
  
  
  TIL
&lt;/h2&gt;

&lt;p&gt;After really digging deep over the past few weeks into Web Components and Lit, it really has come down to one major theme for me: &lt;strong&gt;Accessibility is King&lt;/strong&gt;.&lt;br&gt;
There is really no reason that anyone from major corporations to small start-up could not prioritize their online websites and products following an accessibility-first mindset. While there is an initial learning curve, web components make it incredibly straight forward and explicit in order to handle events, select attributes, and ultimately leverage the CSS cascade to meet the varying needs of my group's button. For myself, I think the idea that you have the power to influence any and all component states and properties was a really humbling fact to understand once I could comprehend it. For example, working to have the same stylistic behavior appear both when a user hovers over the button as well as when it receives tab focus was a fact I wouldn't have thought about coming in. But now that I understand why this consistency is preferable, I find myself motivated to apply this notion elsewhere in my code. Another big realization I came to is the true value in writing succinct and logical code. Things like consistent CSS variable naming and carring those styles dynamically through different button properties and states is crucial for the readability of one's code. This is definitely something I need to work on further, but the division of styles, properties, and the rendering of the component make it &lt;em&gt;very&lt;/em&gt; easy to comprehend how a component works if the logic is succinct.&lt;/p&gt;

&lt;p&gt;Here's a link to our Button if you are interested! &lt;a href="https://github.com/table-in-the-corner/invisi-button"&gt;https://github.com/table-in-the-corner/invisi-button&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>JS Frameworks Boilerplate Exploration</title>
      <dc:creator>Nick Alico</dc:creator>
      <pubDate>Sun, 12 Sep 2021 22:53:51 +0000</pubDate>
      <link>https://forem.com/nro337/js-frameworks-boilerplate-exploration-59p8</link>
      <guid>https://forem.com/nro337/js-frameworks-boilerplate-exploration-59p8</guid>
      <description>&lt;h3&gt;
  
  
  Boilerplate Commonalities &amp;amp; Duplicates
&lt;/h3&gt;

&lt;p&gt;Each of the boilerplate repositories our group selected for Angular, React, Vue, and StencilJs includes the same basic developer tools to get up and running with a bare-bones environment. This includes a basic README file detailing basic commands of how to run your local project, and each boilerplate comes ready to serve a local web server with a single command. The boilerplates each possess a package.json file detailing what scripts are available and which dependencies are installed to run your boilerplate. One crucial detail that jumps out to me is the fact that each of the boilerplate's file hierarchies are nearly identical. There are separate folders for app files, assets, components and server code which makes for a very simple and consistent experience between frameworks. It is interesting, however, to see that the React, Vue, and StencilJs boilerplates keep all of the corresponding html, css, and tsx files of a component in unique component directories, whereas Angular dumps all of the component and routing files into one large folder. It's a stylistic choice but still interesting to note.&lt;/p&gt;

&lt;p&gt;There is some overlapping functionality with the basic features you would expect to run out of the box commonly from a boilerplate. Each of the boilerplates comes with some form of testing support. Our Angular boilerplate supports running both unit and E2E tests, the React boilerplate supports general testing, Vue supports general testing depending on your customized preferences, and StencilJs supports running unit tests as well. It's good to note that each boilerplate comes with a basic "Hello world" component that shows you the basic structure of how a JavaScript or TypeScript component is exported, imported into the main app file, and rendered to the browser. &lt;/p&gt;

&lt;p&gt;The React boilerplate uniquely comes prebuilt with a number of its own components to use, including buttons, lists, and toggles. Our Angular boilerplate includes route handling by deafult, which is not included in the other framework boilerplates.&lt;/p&gt;

&lt;h3&gt;
  
  
  Best DX
&lt;/h3&gt;

&lt;p&gt;In my opinion, it appears that the React Boilerplate has the most convenient, scalable, and development-ready experience of the four frameworks. Literally touting itself as having the "best DX", the &lt;a href="https://github.com/table-in-the-corner/boilerplates/tree/main/react-example/react-boilerplate-master"&gt;repo&lt;/a&gt; created by Max Stoiber and a number of maintainers comes prebuilt with support for hot reloading, i18n, offline-first development, continuous integration (TravisCI), SEO support, among many other advantages. You will have to deal with a much bigger project and bundle size up front every time you create a new project, but it has all of the functionalities you could need to get started with your next side project. It does not appear to be actively maintain for the latest version of React, but it is certainly the most feature-inclusive. It even has linting, prettier, and webpack fully included.&lt;/p&gt;

&lt;h3&gt;
  
  
  What I would pick for my next side project
&lt;/h3&gt;

&lt;p&gt;If I were not in my last semester of school and wanted to learn a framework while working on a fun side project, I would likely select React for a full-stack verbose application that integrates many pages and makes a high number of API calls. It is clear that the React boilerplate has had the highest number of people working to support it (at least when it was actively supported) which can really make the difference when you want a quick plug-and-play experience. The fact that it already has "100% test coverage" and support for SEO and native web apps is a real game changer, as I know how tedious those elements can be to get running after dealing with numerous dependency versioning conflicts. &lt;br&gt;
Despite this fact, I think it is also important to highlight the StencilJs boilerplate as a very intriguing option for projects focus on learning and/or leveraging fast web components. For one, I am the least familiar with Stencil out of the 4 frameworks we considered. The Stencil boilerplate stands as a compile-time tool with TS, JSX, and lazy-loading support which are all really nice to have. I am most curious about exploring the universal web component idea that Stencil is built around. It sounds like it is a framework's version of open-wc or vanilla JS web components, which likely means a Stencil-based app would be very fast and performant. In addition to this, the offering of Server Side Rendering means that active users of the application would have a very responsive development experience since the entire page is downloaded during the first site visit.&lt;/p&gt;




&lt;p&gt;Our organization's boilerplate repo: &lt;a href="https://github.com/table-in-the-corner/boilerplates"&gt;boilerplates&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The StencilJs "Getting Started" boilerplate I selected: &lt;a href="https://stenciljs.com/docs/getting-started"&gt;StencilJs - Getting Started&lt;/a&gt;&lt;br&gt;
(This is what I would select first if I were attempting to learn StencilJs for the first time)&lt;/p&gt;

</description>
      <category>webcomponents</category>
      <category>react</category>
      <category>vue</category>
      <category>stenciljs</category>
    </item>
    <item>
      <title>Getting Started with Open-wc</title>
      <dc:creator>Nick Alico</dc:creator>
      <pubDate>Sat, 28 Aug 2021 18:08:31 +0000</pubDate>
      <link>https://forem.com/nro337/getting-started-with-open-wc-2p06</link>
      <guid>https://forem.com/nro337/getting-started-with-open-wc-2p06</guid>
      <description>&lt;h1&gt;
  
  
  Getting Started with Open-wc
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://open-wc.org/"&gt;Open Web Components&lt;/a&gt;, or open-wc as we refer to it, is a web component platform centered around the idea that utilizing and building web components should be straightforward and accessible to all developers. A proponent of open-source development and tooling, the group see web components as the future of web development, citing it as a: "standards-based solution to problems like reusability, interoperability, and encapsulation" (open-wc.org). Today, I would like to get you up and running with the open-wc boilerplate that can be used as a starting point to create &lt;em&gt;any&lt;/em&gt; of your own web components.&lt;/p&gt;

&lt;h3&gt;
  
  
  Here's what you will need to get started:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Administrative rights to the computer you will be using&lt;/li&gt;
&lt;li&gt;Basic terminal knowledge and the ability to run basic terminal commands&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Steps we will cover:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Downloading an IDE or Text Editor&lt;/li&gt;
&lt;li&gt;Installing Node.js and NPM&lt;/li&gt;
&lt;li&gt;Installing yarn (another package manager)&lt;/li&gt;
&lt;li&gt;Downloading the open-wc boilerplate&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CjNSIpXq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x5giyg94lrvlf30aut7n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CjNSIpXq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x5giyg94lrvlf30aut7n.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://code.visualstudio.com/brand"&gt;https://code.visualstudio.com/brand&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Downloading an IDE
&lt;/h2&gt;

&lt;p&gt;For this tutorial, we will be using VSCode as our IDE as it is freely available and has all of the built in functionality we may need through this project. &lt;/p&gt;

&lt;p&gt;Go to &lt;a href="https://code.visualstudio.com/"&gt;VSCode&lt;/a&gt; and download the latest stable build.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When you first open the application, it will ask for permission to access certain levels of your folder structure depending on where you attempt to open and save projects to on your local machine. Please agree to grant access to the directories you plan to use in this class (I recommend the Documents folder at the very least).&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7QTKmsn9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1xhzyzt4o07gyhz4xrfe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7QTKmsn9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1xhzyzt4o07gyhz4xrfe.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://nodejs.org/en/"&gt;https://nodejs.org/en/&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Installing Node and NPM
&lt;/h2&gt;

&lt;p&gt;Next, we need to install Node.js in order for us to be able to download and manage the open-wc tooling.&lt;/p&gt;

&lt;p&gt;Go to the &lt;a href="https://nodejs.org/en/"&gt;Node.js&lt;/a&gt; website and download the latest &lt;strong&gt;LTS Build&lt;/strong&gt; for your operating system.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;After downloading, it will ask you to go through a brief installation and setup process. Please agree to all necessary permissions and use agreements that you are presented with, leaving any additional optional settings as their default value.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;NPM (a.k.a the Node Package Manager) will also be installed when you download Node. To validate that both of these have been installed correctly, run:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;node -v
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;and&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm -v
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;to check the version numbers of each. &lt;/p&gt;

&lt;p&gt;If you get a version number as a response such as:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;v14.17.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;you have installed Node correctly.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kFllHmuM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sif57xd36lwyfn5araim.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kFllHmuM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sif57xd36lwyfn5araim.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://yarnpkg.com/"&gt;https://yarnpkg.com/&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Installing yarn
&lt;/h2&gt;

&lt;p&gt;Similar to how we downloaded Node and NPM, let's install the &lt;a href="https://yarnpkg.com/"&gt;yarn&lt;/a&gt; package manager:&lt;/p&gt;

&lt;p&gt;In order to install yarn, we will need to use the terminal.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open up your terminal/console window/shell on your device.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use the following command using NPM that we just installed:&lt;br&gt;
&lt;code&gt;npm install --global yarn&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you receive an error stating that you do not have appropriate permissions, or that the action could not be completed, this may be because you do not have the correct administrative permissions under the current user. To solve this issue, add "sudo" to the beginning of your command:&lt;br&gt;
&lt;code&gt;sudo npm install --global yarn&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Installing the open-wc boilerplate
&lt;/h2&gt;

&lt;p&gt;We made it! We're ready to set up open-wc. First, however, we need to select where we will be installing the boilerplate and all of its dependencies...&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Choose a location on your local machine (I recommend creating a new folder in your "Documents" directory) where you want to install and access the boilerplate.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now that we know where we want to install the boilerplate, open your terminal again and navigate to the appropriate level and folder:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use &lt;code&gt;ls&lt;/code&gt; to look at the files in the current directory level&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;cd &amp;lt;directory name&amp;gt;&lt;/code&gt; to drill into your preferred folder location.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We can finally download the boilerplate and its dependencies:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Run &lt;code&gt;npm init @open-wc&lt;/code&gt;

&lt;ul&gt;
&lt;li&gt;(Use 'sudo' at the beginning if you get a permissions error again)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Once the downloading has began, you will be prompted with a number of questions

&lt;ul&gt;
&lt;li&gt;Select "Scaffold a new project" using your Return key to select it&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0fyvB4Wg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5n1ki78efws90h9uwp72.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0fyvB4Wg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5n1ki78efws90h9uwp72.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Select "Web Component"
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YBtG_Pyp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p8j8qwykxnuvl862bl38.png" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;li&gt;Using the spacebar, select all three additional tooling options (Linting, Testing, and Demoing)
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--f05fzXWy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/molpye6lrorciz2wryc6.png" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;li&gt;Select "No" for using Typescript&lt;/li&gt;
&lt;li&gt;Write "hello-world" as the tag name for your web component

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Please use lowercase letters only for this name!!&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Select "Yes" that we want to write this file structure to the disk
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lHj6YsaO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/47gironflej8ml3y8kym.png" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;li&gt;Finally, select "Yes, with yarn" to install all of the necessary dependencies that Node requires to support open-wc&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the setup was successful, you should see the following confirmation:&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eMv5D4L1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qfyuqehlpqg8qzco91lv.png" alt="Alt Text"&gt;
&lt;/h2&gt;

&lt;p&gt;Congratulations!!! You have officially set up your boilerplate for open-wc! Please leave a comment if you have any issues or questions on this installation. &lt;/p&gt;

&lt;p&gt;Best of luck on your web component creations!&lt;/p&gt;

</description>
      <category>openwc</category>
      <category>webcomponents</category>
    </item>
    <item>
      <title>IST 402: Web Components Introduction</title>
      <dc:creator>Nick Alico</dc:creator>
      <pubDate>Thu, 26 Aug 2021 20:09:26 +0000</pubDate>
      <link>https://forem.com/nro337/ist-402-web-components-introduction-4kmn</link>
      <guid>https://forem.com/nro337/ist-402-web-components-introduction-4kmn</guid>
      <description>&lt;p&gt;Hello dear reader!&lt;/p&gt;

&lt;h3&gt;
  
  
  Background
&lt;/h3&gt;

&lt;p&gt;My name is Nick Alico, and I am a graduating senior at Penn State studying Human-Centered Design &amp;amp; Development with a focus in HCI. (This is a fancy way of saying I enjoy the intersection of software and UX work.) I am also a Schreyer scholar, and am subsequently completing my Honors Thesis studying competency models and how they can be applied to design and development courses to make for a more individualized and accessible learning experience. In the past, I have completed SWE-focused internships with Oracle, GE Healthcare, and Rockwell Automation.&lt;/p&gt;

&lt;p&gt;Outside of class, I am involved with IST Diplomats, Undergraduate Research Ambassadors, Viral Imaginations, UXPA PSU, and serve as an LA this semester.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Web Dev?
&lt;/h3&gt;

&lt;p&gt;I've always been a visual learner. Web development is the perfect combination of programming and visual design for me: it allows for complete creativity while supporting the ability to build anything you can imagine. I am very interested in exploring the growth of design systems and aspire to work as a Design Systems/UX Engineer in my full-time gig eventually; web development is where that truly begins. I've had some great opportunities in the past to collaborate on everything from small side projects to Fortune 100 company codebases, but I still feel that I've only scraped the surface of what web development really entails. That's why I want to take this class: to learn about the cutting edge of web components and hopefully be able to casually implement them in my future job.&lt;/p&gt;

&lt;h3&gt;
  
  
  Other Fun Facts
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;I enjoy running and hiking in my free time&lt;/li&gt;
&lt;li&gt;I have competed in the PennApps hackathon twice while in college&lt;/li&gt;
&lt;li&gt;I can solve a Rubik's cube in under 30 sec. (I know I'm a nerd but it's not as hard as you think.)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Drop a follow and reach out if you are interested in connecting! I would love to have a conversation with you!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ux</category>
    </item>
  </channel>
</rss>
