<?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>DEV Community: earlman</title>
    <description>The latest articles on DEV Community by earlman (@earlman).</description>
    <link>https://dev.to/earlman</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%2F410507%2F12fe988c-57a4-4085-968f-c03192ead9c2.png</url>
      <title>DEV Community: earlman</title>
      <link>https://dev.to/earlman</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/earlman"/>
    <language>en</language>
    <item>
      <title>Small Wins - A Seamless Bug Fix</title>
      <dc:creator>earlman</dc:creator>
      <pubDate>Fri, 04 Mar 2022 21:08:32 +0000</pubDate>
      <link>https://dev.to/earlman/small-wins-a-seamless-bug-fix-4d8a</link>
      <guid>https://dev.to/earlman/small-wins-a-seamless-bug-fix-4d8a</guid>
      <description>&lt;p&gt;So I was having an issue where my app wouldn't load once the user logged in.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ACHrRXI---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vndemsiqjp8cwcyk32m4.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ACHrRXI---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vndemsiqjp8cwcyk32m4.gif" alt="Image description" width="880" height="372"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The new "Timeline View" in Vuex Dev Tools was a huge help in dialing-in on where the problem was. I've been using it all week and it's incredibly well-built.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--T6ciCBhd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vj3nrezyijldqwrm9xxe.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--T6ciCBhd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vj3nrezyijldqwrm9xxe.gif" alt="Image description" width="880" height="532"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I initially thought that the route was being loaded before the &lt;code&gt;AppConfig&lt;/code&gt; and &lt;code&gt;UserConfig&lt;/code&gt; had a chance to be pulled from firebase. Looking at the code, I realized that I wasn't even pulling them from Firebase at all 😅 More specifically, I pulled the config in on the initial page load, but not when the user logged in.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--n_M-g2rk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dk9vmxaagtj6v6efhayl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--n_M-g2rk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dk9vmxaagtj6v6efhayl.png" alt="Image description" width="802" height="232"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I really love the first time I'm able to implement a piece of knowledge seamlessly. In this case, it was the &lt;code&gt;Promise.all&lt;/code&gt; function. In this case, I wait for both &lt;code&gt;fetchAppConfig&lt;/code&gt; and &lt;code&gt;fetchUserConfig&lt;/code&gt; to load before updating the router:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4ImwTMq2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/04nbsyklfrwh25ymho4h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4ImwTMq2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/04nbsyklfrwh25ymho4h.png" alt="Image description" width="880" height="276"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;note: &lt;code&gt;ToastError&lt;/code&gt; and &lt;code&gt;ToastNotifications&lt;/code&gt; are just wrappers for &lt;a href="https://buefy.org/documentation/toast"&gt;Buefy component&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I also made sure to notify the user before calling the promises. It could take a second to load the database and it might confuse users if there's no response on the page to clicking "Log In" button.  &lt;/p&gt;

&lt;p&gt;Final solution looks and feels great 😊&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hLmavCzR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qmkdsghfy07c3wzi04de.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hLmavCzR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qmkdsghfy07c3wzi04de.gif" alt="Image description" width="880" height="647"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>promiseall</category>
      <category>vuedevtools</category>
      <category>vue</category>
      <category>buefy</category>
    </item>
    <item>
      <title>TIL: `font-weight: 1 999;` is a thing</title>
      <dc:creator>earlman</dc:creator>
      <pubDate>Fri, 04 Feb 2022 18:47:36 +0000</pubDate>
      <link>https://dev.to/earlman/til-font-weight-1-999-is-a-thing-13bn</link>
      <guid>https://dev.to/earlman/til-font-weight-1-999-is-a-thing-13bn</guid>
      <description>&lt;p&gt;There's no way anybody uses variable fonts without just setting:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="k"&gt;@font-face&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
   &lt;span class="nl"&gt;font-weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt; &lt;span class="m"&gt;999&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;...right? It's the same .woff2 file in the end so it seems like it should be the same performance. Otherwise, you gotta do the @font-face rules for every single declaration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="k"&gt;@font-face&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
   &lt;span class="nl"&gt;font-weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;200&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;@font-face&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
   &lt;span class="nl"&gt;font-weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;400&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;//..&lt;/span&gt;&lt;span class="nc"&gt;.etc&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Just learned that the &lt;code&gt;1 999&lt;/code&gt; syntax existed today in a tiny section on a blog post on Digital Ocean. &lt;a href="https://www.digitalocean.com/community/tutorials/css-variable-fonts#using-variable-fonts-with-font-face"&gt;There's some better examples on there&lt;/a&gt;. Seems useful 😝&lt;/p&gt;

</description>
      <category>sass</category>
      <category>css</category>
      <category>variablefonts</category>
    </item>
  </channel>
</rss>
