<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5683362339713645548</id><updated>2024-11-01T05:07:45.391-07:00</updated><category term="work"/><category term="agile"/><category term="components"/><category term="css"/><category term="process"/><category term="react"/><category term="combat project"/><category term="fragile"/><category term="handlebars"/><category term="website"/><category term="workflow"/><category term="accessibility"/><category term="analytics"/><category term="grid"/><category term="mixpanel"/><category term="notes"/><category term="UTM"/><category term="approach"/><category term="compromise"/><category term="design"/><category term="docs"/><category term="ghost"/><category term="git"/><category term="structure"/><category term="styled-components"/><category term="thoughts"/><category term="BEM"/><category term="RTFM"/><category term="animation"/><category term="atomic design"/><category term="bash"/><category term="compatibility"/><category term="css grid"/><category term="extending"/><category term="flexbox"/><category term="incoherent"/><category term="jquery"/><category term="learning"/><category term="modular CSS"/><category term="modules"/><category term="parcel"/><category term="personal"/><category term="presenational"/><category term="problem-solving"/><category term="problems"/><category term="python"/><category term="random"/><category term="react-native"/><category term="release"/><category term="sizing"/><category term="tips"/><category term="tracking"/><category term="zen"/><category term="2019"/><category term="62.5%"/><category term="API"/><category term="EX"/><category term="IE"/><category term="IE11"/><category term="INVEST"/><category term="OOP"/><category term="SMACSS"/><category term="UI"/><category term="UX"/><category term="ahead"/><category term="alt"/><category term="analyis"/><category term="anxiety"/><category term="asset"/><category term="asset helper"/><category term="audio"/><category term="audits"/><category term="best practice"/><category term="blogs"/><category term="box-sizing"/><category term="browser support"/><category term="build the right thing"/><category term="build-out"/><category term="bundling"/><category term="carousel"/><category term="classes"/><category term="classnames"/><category term="communication"/><category term="compliance"/><category term="composition"/><category term="conflicts"/><category term="consensus"/><category term="container"/><category term="context"/><category term="conventions"/><category term="deadline"/><category term="defer"/><category term="deploy"/><category term="deployment"/><category term="design system"/><category term="destructuring"/><category term="devtools"/><category term="distortion"/><category term="documentation"/><category term="duh"/><category term="dumb"/><category term="em"/><category term="embedding"/><category term="employee experience"/><category term="env"/><category term="environments"/><category term="extend"/><category term="fail"/><category term="failing"/><category term="fake"/><category term="fcc"/><category term="feature detection"/><category term="fidelity"/><category term="flex"/><category term="flow"/><category term="fragments"/><category term="frustration"/><category term="game"/><category term="gatsby"/><category term="getter"/><category term="ghost 2.0"/><category term="git tag"/><category term="gradient"/><category term="gulp"/><category term="histogram"/><category term="history"/><category term="html"/><category term="hubspot"/><category term="ideas"/><category term="img"/><category term="implementation"/><category term="imposter"/><category term="init"/><category term="integrations"/><category term="interesection observer"/><category term="interface"/><category term="intersection observer"/><category term="io"/><category term="javascript"/><category term="js"/><category term="js modules"/><category term="jsx"/><category term="lazy loading"/><category term="leading practice"/><category term="legacy"/><category term="links"/><category term="machine learning"/><category term="management"/><category term="matplotlib"/><category term="mention-me"/><category term="min-content"/><category term="minmax"/><category term="mobile first"/><category term="modular"/><category term="motivation"/><category term="multivariate"/><category term="naming"/><category term="new thing"/><category term="no fast forward"/><category term="nouislider"/><category term="numpy"/><category term="opinion"/><category term="optimisation"/><category term="org"/><category term="pairing"/><category term="pandas"/><category term="partials"/><category term="patterns"/><category term="per design"/><category term="personal site"/><category term="planning"/><category term="plodcast"/><category term="pointer-events"/><category term="presentational"/><category term="problem"/><category term="product management"/><category term="props"/><category term="quality"/><category term="quotes"/><category term="radio"/><category term="ramblings"/><category term="refactor"/><category term="refactoring"/><category term="relationships"/><category term="rem"/><category term="replacestate"/><category term="rows"/><category term="run"/><category term="scatterplot matrix"/><category term="scipy"/><category term="scope"/><category term="screenreader"/><category term="scripts"/><category term="self-organisation"/><category term="semantic"/><category term="sessionstorage"/><category term="setter"/><category term="side project"/><category term="side-project"/><category term="sklearn"/><category term="smart"/><category term="solution"/><category term="sprints"/><category term="standards"/><category term="starting"/><category term="static site"/><category term="stories"/><category term="stuck"/><category term="stuckness"/><category term="success"/><category term="sucess"/><category term="support"/><category term="svg"/><category term="tagging"/><category term="tailwind"/><category term="text"/><category term="tooling"/><category term="trade-offs"/><category term="troubleshooting"/><category term="typescript"/><category term="uikit"/><category term="undefined"/><category term="univariate"/><category term="upgrade"/><category term="voiceover"/><category term="withComponent"/><category term="workaround"/><category term="wrong"/><category term="yarn"/><title type='text'>Development Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://markup-mitchell.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default'/><link rel='alternate' type='text/html' href='https://markup-mitchell.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default?start-index=26&amp;max-results=25'/><author><name>markup mitchell</name><uri>http://www.blogger.com/profile/04110229624586413585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>98</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5683362339713645548.post-6720717493922068379</id><published>2019-03-25T11:01:00.002-07:00</published><updated>2019-03-25T11:01:53.680-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="compatibility"/><category scheme="http://www.blogger.com/atom/ns#" term="compromise"/><category scheme="http://www.blogger.com/atom/ns#" term="deadline"/><category scheme="http://www.blogger.com/atom/ns#" term="flow"/><category scheme="http://www.blogger.com/atom/ns#" term="standards"/><category scheme="http://www.blogger.com/atom/ns#" term="trade-offs"/><category scheme="http://www.blogger.com/atom/ns#" term="work"/><title type='text'>up agin it</title><content type='html'>&lt;!DOCTYPE html&gt;
&lt;html&gt;

&lt;head&gt;
  &lt;meta charset=&quot;utf-8&quot;&gt;
  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
  &lt;title&gt;2019-03-25-website-log-deadlines&lt;/title&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;https://stackedit.io/style.css&quot; /&gt;
&lt;/head&gt;

&lt;body class=&quot;stackedit&quot;&gt;
  &lt;div class=&quot;stackedit__html&quot;&gt;&lt;p&gt;on a deadline, assets not forthcoming, material being added faster than I can even talk about completing it, laptop charger left in London, new one doesn’t come until who-knows-what-time tomorrow.&lt;/p&gt;
&lt;p&gt;this is great&lt;/p&gt;
&lt;p&gt;OK. well, there’s nothing to do but keep calm and carry on, much as I hate myself for saying it.&lt;/p&gt;
&lt;p&gt;while I’m waiting for things to resolve, asset-wise, I’m going to get on with the new zigzag followed by the testimonial “carousel” (which will be CSS animation).&lt;/p&gt;
&lt;h3 id=&quot;zig-zag&quot;&gt;zig zag&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKcOcYCeH1rw_NCX3UW7RYXKPEUh3qbulGZW3HGz9i77FmvEeKJc-8LwPYM6Qn0QNx-p1tt_FOy27AVLP_QDtMUaYx1LwGf1VBTG6tUayM-JShCQD0EL11imFxbMymQ7pebYyqxFfJYQzb/&quot; alt=&quot;enter image description here&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPHnJXPamVcjHioGr1LR7hXmbIBhdcbbb7yBgOHzzTrj4sKn0G7l_J218wgQFsMOld6jKPl7M2tqtFDbfxTBPp082a2nHeGYKxooY_Isk7OuOOmPskyxfwZhyphenhyphen7Lj7CAUPo8bcKSxPBGPaO/&quot; alt=&quot;enter image description here&quot;&gt;&lt;br&gt;
this is pretty simple stuff and my time is short, so I’ll just make the observation (I’m sure I’ve said it before) that ‘mobile first’ is a &lt;strong&gt;design consideration&lt;/strong&gt; not one of implementation. I have to look at both screens in order to start implementing the design.&lt;/p&gt;
&lt;p&gt;I also, slightly desperately under the circumstances, start adding global text classes to match the designs and (what’s available from) the styleguide.&lt;/p&gt;
&lt;p&gt;I realise these really are global classes as opposed to utility classes because 1) they’re not scoped to a component or page 2) they have properties like &lt;code&gt;line-height&lt;/code&gt; and &lt;code&gt;letter-spacing&lt;/code&gt; baked in instead of conferred by small, atomic classes.&lt;/p&gt;
&lt;p&gt;hey ho.&lt;/p&gt;
&lt;p&gt;another complication with this is - what is the semantic status of those little grey headers? in a visual hierarchy they’re like labels, but in a page outline or for screen-readers, they ought to be treated as, what, &lt;code&gt;&amp;lt;h2&amp;gt;&lt;/code&gt;s?&lt;/p&gt;
&lt;p&gt;…whereas the class I’m applying to the ‘blurb’ (eg  “hassle-free admin”) is named &lt;code&gt;heading-3&lt;/code&gt;. Gawd.&lt;/p&gt;
&lt;p&gt;It’s awful, because it’s the opposite of what should be happening. The class names should be semantic in the HTML (in the sense that they describe the function of the element within the content) and provide hooks for styling. Actually what I’m doing is naming the classes based on how they look rather than how they function, but not even doing it in a way that’s scoped or descriptive. sigh.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;h2&amp;gt;&lt;/code&gt;is being overwritten by some media query elsewhere in the code. I’m going to switch it to a &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; to get the job done and put it on my todo list.&lt;/p&gt;
&lt;p&gt;11:48&lt;/p&gt;
&lt;p&gt;because I’m trying to limit how much flexbox I use (and not use grid at all) to increase my confidence of IE behaviour, I’m using &lt;code&gt;float&lt;/code&gt; on an image rather than any unlikely flex-item self-ordering.&lt;/p&gt;
&lt;p&gt;problem: when using &lt;code&gt;float&lt;/code&gt; the child ignores the &lt;code&gt;margin-auto&lt;/code&gt; rule set on its container.&lt;/p&gt;
&lt;p&gt;&lt;strike&gt;&lt;a href=&quot;https://css-tricks.com/the-peculiar-magic-of-flexbox-and-auto-margins/&quot;&gt;solution&lt;/a&gt; : give the image &lt;code&gt;margin-auto&lt;/code&gt; inside a flex container (which I need anyway for mobile).&lt;/strike&gt; nope&lt;/p&gt;
&lt;p&gt;&lt;strike&gt;solution: put the image inside the container&lt;/strike&gt; nope&lt;/p&gt;
&lt;p&gt;13:17&lt;/p&gt;
&lt;p&gt;after ducking back onto the hero for a while, I’ve come back to this and am now going to try just using the &lt;code&gt;flex&lt;/code&gt; &lt;code&gt;order&lt;/code&gt; property - it looks as though IE11 might support it enough, and this float stuff is just a K-hole.&lt;/p&gt;
&lt;p&gt;17:46&lt;/p&gt;
&lt;p&gt;Under pressure, so I’ve not made a blow-by-blow account, but I got there. I doubt I’ll have the impetus to do a proper analysis, but it was an interesting exercise.&lt;/p&gt;
&lt;p&gt;I’d have been within my rights, I think, to ask the designer to make some changes to make this easier, but in the end I was piqued by the challenge of something that looks so trivial.&lt;/p&gt;
&lt;p&gt;Basically, I did the mobile design first, placing the image (which is the thing that is out-of-flow) as the first child of the flex-column. I then re-positioned it by making the heading column element &lt;code&gt;order: 0;&lt;/code&gt; and the image &lt;code&gt;order: 1;&lt;/code&gt;. I don’t know if it’s strictly necessary to specify both of those, but that’s what I ended up with and I haven’t gone back to clean up yet.&lt;/p&gt;
&lt;p&gt;For the desktop layout I use a media query to float the image left and set the container’s display property to block.&lt;/p&gt;
&lt;p&gt;Not super-clean and elegant, but not the jankiest thing I’ve ever written either.&lt;/p&gt;
&lt;p&gt;In other news, the PM wanted rid of this red line that was leaking out under the hero &#39;cause the background was set to a solid color as fallback for IE11 &amp;lt; 767px where the background image doesn’t resize properly and the text becomes white-on-white.&lt;/p&gt;
&lt;p&gt;The solution came from &lt;a href=&quot;http://browserhacks.com/&quot;&gt;browser hacks&lt;/a&gt; and it looks like this:&lt;/p&gt;
&lt;pre class=&quot; language-css&quot;&gt;&lt;code class=&quot;prism  language-css&quot;&gt;&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@media&lt;/span&gt; screen and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;-ms-high-contrast&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; active&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;, &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;-ms-high-contrast&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; none&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token selector&quot;&gt;&lt;span class=&quot;token class&quot;&gt;.homepage-hero__bg&lt;/span&gt; &lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;token property&quot;&gt;background-image&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;linear-gradient&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;334&lt;/span&gt;deg, &lt;span class=&quot;token hexcode&quot;&gt;#cb2e63&lt;/span&gt;, &lt;span class=&quot;token hexcode&quot;&gt;#ffec87&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I mean, I know it’s not really legit, but it’s pretty clever. Lets me replace the whole svg bg image with a gradient for IE and dispense with background in the normal code.&lt;/p&gt;
&lt;h3 id=&quot;todo&quot;&gt;todo&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;make the HTML semantic for headings and text (homepage, but this principle should be extended throughout).&lt;/li&gt;
&lt;li&gt;conflate the content block styling for each section inside the &lt;code&gt;section&lt;/code&gt; class.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/body&gt;

&lt;/html&gt;
</content><link rel='replies' type='application/atom+xml' href='https://markup-mitchell.blogspot.com/feeds/6720717493922068379/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://markup-mitchell.blogspot.com/2019/03/up-agin-it.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/6720717493922068379'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/6720717493922068379'/><link rel='alternate' type='text/html' href='https://markup-mitchell.blogspot.com/2019/03/up-agin-it.html' title='up agin it'/><author><name>markup mitchell</name><uri>http://www.blogger.com/profile/04110229624586413585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKcOcYCeH1rw_NCX3UW7RYXKPEUh3qbulGZW3HGz9i77FmvEeKJc-8LwPYM6Qn0QNx-p1tt_FOy27AVLP_QDtMUaYx1LwGf1VBTG6tUayM-JShCQD0EL11imFxbMymQ7pebYyqxFfJYQzb/s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5683362339713645548.post-6967709491157459783</id><published>2019-03-25T09:56:00.001-07:00</published><updated>2019-03-25T09:57:28.557-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="distortion"/><category scheme="http://www.blogger.com/atom/ns#" term="flexbox"/><category scheme="http://www.blogger.com/atom/ns#" term="notes"/><category scheme="http://www.blogger.com/atom/ns#" term="solution"/><category scheme="http://www.blogger.com/atom/ns#" term="tips"/><title type='text'>2018-10-07-website-log-CSS</title><content type='html'>&lt;!DOCTYPE html&gt;
&lt;html&gt;

&lt;head&gt;
  &lt;meta charset=&quot;utf-8&quot;&gt;
  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
  &lt;title&gt;2018-10-07-website-log-CSS&lt;/title&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;https://stackedit.io/style.css&quot; /&gt;
&lt;/head&gt;

&lt;body class=&quot;stackedit&quot;&gt;
  &lt;div class=&quot;stackedit__html&quot;&gt;&lt;p&gt;PROBLEM: flexbox is having a distorting effect on images&lt;br&gt;
SOLUTION: &lt;code&gt;align-self: center&lt;/code&gt; on child &lt;code&gt;img&lt;/code&gt; elements, &lt;a href=&quot;https://stackoverflow.com/questions/37609642/why-does-flexbox-stretch-my-image&quot;&gt;as per this&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;LESSON: DO IT IN DEV TOOLS!&lt;/p&gt;
&lt;p&gt;INVESTIGATE: &lt;code&gt;flex-basis&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;UPDATE (2019-03-25):&lt;/p&gt;
&lt;p&gt;for IE11 getting unwanted horizontal stretch, use &lt;code&gt;flex-shrink: 0;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://stackoverflow.com/a/36828291&quot;&gt;source&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/body&gt;

&lt;/html&gt;
</content><link rel='replies' type='application/atom+xml' href='https://markup-mitchell.blogspot.com/feeds/6967709491157459783/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://markup-mitchell.blogspot.com/2018/10/2018-10-07-website-log-css.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/6967709491157459783'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/6967709491157459783'/><link rel='alternate' type='text/html' href='https://markup-mitchell.blogspot.com/2018/10/2018-10-07-website-log-css.html' title='2018-10-07-website-log-CSS'/><author><name>markup mitchell</name><uri>http://www.blogger.com/profile/04110229624586413585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5683362339713645548.post-1529046982409472745</id><published>2019-03-19T03:09:00.001-07:00</published><updated>2019-03-19T03:10:18.776-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="agile"/><category scheme="http://www.blogger.com/atom/ns#" term="animation"/><category scheme="http://www.blogger.com/atom/ns#" term="compromise"/><category scheme="http://www.blogger.com/atom/ns#" term="design"/><category scheme="http://www.blogger.com/atom/ns#" term="work"/><title type='text'>build the right thing 2</title><content type='html'>&lt;!DOCTYPE html&gt;
&lt;html&gt;

&lt;head&gt;
  &lt;meta charset=&quot;utf-8&quot;&gt;
  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
  &lt;title&gt;2019-03-18-website-log-carousel&lt;/title&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;https://stackedit.io/style.css&quot; /&gt;
&lt;/head&gt;

&lt;body class=&quot;stackedit&quot;&gt;
  &lt;div class=&quot;stackedit__html&quot;&gt;&lt;p&gt;Here’s where I’m at:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4xh8G9tlK62higXJSwIdykoufkIuaQYMebmJoI5mfbYZhC2wyB4qAe6J8ILDPiR9TMTsq0fCNdvtHpkmdAwCp82PN_rkeE9iFQIgBxn4CtILvAgknbLdZIahoxhRkYhUg9ZpEEElAYb61/&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;
&lt;p&gt;The images are placeholder and the text changes don’t line up with the image changes, obviously, but both of those can be easily tweaked.&lt;/p&gt;
&lt;p&gt;Today’s work is to get the desktop version working per design (in a visual sense at least)&lt;/p&gt;
&lt;p&gt;Aaaand it immediately starts looking smelly to me… I’m changing the behaviour from “being invisible” to being visible in 4 different screen locations and having a different animation… Nevertheless, I’m going to get into it and see how bad things get.&lt;/p&gt;
&lt;h3 id=&quot;placement&quot;&gt;placement&lt;/h3&gt;
&lt;p&gt;let’s get the layout done.&lt;/p&gt;
&lt;p&gt;I want these bullet points in two separate columns.&lt;/p&gt;
&lt;p&gt;I need to disable the animation…&lt;br&gt;
Then I figure out that the bullet points don’t flow in the right direction… ignore this for now.&lt;br&gt;
And the image needs to be in the middle of the block of HTML if it’s going to flow properly…&lt;br&gt;
this whole thing’s starting to feel like it’ll be desktop first again by the time I’m, finished!&lt;/p&gt;
&lt;/div&gt;
&lt;/body&gt;

&lt;/html&gt;
</content><link rel='replies' type='application/atom+xml' href='https://markup-mitchell.blogspot.com/feeds/1529046982409472745/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://markup-mitchell.blogspot.com/2019/03/build-right-thing-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/1529046982409472745'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/1529046982409472745'/><link rel='alternate' type='text/html' href='https://markup-mitchell.blogspot.com/2019/03/build-right-thing-2.html' title='build the right thing 2'/><author><name>markup mitchell</name><uri>http://www.blogger.com/profile/04110229624586413585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4xh8G9tlK62higXJSwIdykoufkIuaQYMebmJoI5mfbYZhC2wyB4qAe6J8ILDPiR9TMTsq0fCNdvtHpkmdAwCp82PN_rkeE9iFQIgBxn4CtILvAgknbLdZIahoxhRkYhUg9ZpEEElAYb61/s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5683362339713645548.post-2214045556924241161</id><published>2019-03-18T02:35:00.002-07:00</published><updated>2019-03-18T02:35:38.228-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="agile"/><category scheme="http://www.blogger.com/atom/ns#" term="animation"/><category scheme="http://www.blogger.com/atom/ns#" term="carousel"/><category scheme="http://www.blogger.com/atom/ns#" term="compromise"/><category scheme="http://www.blogger.com/atom/ns#" term="fake"/><category scheme="http://www.blogger.com/atom/ns#" term="mobile first"/><category scheme="http://www.blogger.com/atom/ns#" term="work"/><title type='text'>build the right thing</title><content type='html'>&lt;!DOCTYPE html&gt;
&lt;html&gt;

&lt;head&gt;
  &lt;meta charset=&quot;utf-8&quot;&gt;
  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
  &lt;title&gt;2019-03-15-website-log-compromise&lt;/title&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;https://stackedit.io/style.css&quot; /&gt;
&lt;/head&gt;

&lt;body class=&quot;stackedit&quot;&gt;
  &lt;div class=&quot;stackedit__html&quot;&gt;&lt;p&gt;This is the first of the two things (on this page!) that I have pretty much no intention of implementing the way that’s been specified. I’ve indicated to the PM that if we want to hit this deadline we’ll need to make some sensible compromises and reminded him of the mess we got into when we over-reached with the cost calculator.&lt;/p&gt;
&lt;p&gt;The problem, without going into it in too much detail again, is that our site is a blogging platform with some custom pages worked in.&lt;/p&gt;
&lt;p&gt;We need to keep things simple. If we &lt;em&gt;must&lt;/em&gt; have a carousel it needs to be a vanilla carousel from the UI library we already have as a project dependency. We’re not in a position to create bespoke UI to match whatever comes out of the designer’s head.&lt;/p&gt;
&lt;p&gt;eg&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg33RlkA0QzY_A9tsHS_lOIQNBdggdlTsmDaKkXhAX7KMu76gdPMeVA6NgTcJownVMt75coqFv-D6a4BjcJUhdROGfee8p6GFo3FuU7Vw72mkt75CFwpCYs2yYTz4eoqgkb6V7WNzSgfT7B/&quot; alt=&quot;enter image description here&quot;&gt;&lt;br&gt;
I’m told this is intended as a ‘slider’ which I think means carousel.&lt;/p&gt;
&lt;p&gt;I’m going to make a container and have some CSS animation cycle though images, see how they like it.&lt;/p&gt;
&lt;h3 id=&quot;log&quot;&gt;log&lt;/h3&gt;
&lt;p&gt;So… I think I’m going to practice what I preach and start this bad boy mobile first - looks likely to be easier than rejigging everything at the end.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU0294RMcZsXdVJCWSfC4nXJZ8QAJmZPcDgcJsbq2qgBntioEWUlQkYp4ueNqanJQFghYN0JOzXti4LqMzE0votlxFVgIcy4hxr4bUNYfx5KWhdfYQgRsMpOfip2trt28qrYFmnf63JI6V/&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;
&lt;p&gt;Handy to have the desktop breakdown done first though.&lt;/p&gt;
&lt;p&gt;So I guess I’ll tear into it and try to get the placeholder stuff up and resembling design.&lt;/p&gt;
&lt;/div&gt;
&lt;/body&gt;

&lt;/html&gt;
</content><link rel='replies' type='application/atom+xml' href='https://markup-mitchell.blogspot.com/feeds/2214045556924241161/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://markup-mitchell.blogspot.com/2019/03/build-right-thing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/2214045556924241161'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/2214045556924241161'/><link rel='alternate' type='text/html' href='https://markup-mitchell.blogspot.com/2019/03/build-right-thing.html' title='build the right thing'/><author><name>markup mitchell</name><uri>http://www.blogger.com/profile/04110229624586413585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg33RlkA0QzY_A9tsHS_lOIQNBdggdlTsmDaKkXhAX7KMu76gdPMeVA6NgTcJownVMt75coqFv-D6a4BjcJUhdROGfee8p6GFo3FuU7Vw72mkt75CFwpCYs2yYTz4eoqgkb6V7WNzSgfT7B/s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5683362339713645548.post-4216246548017006182</id><published>2019-03-12T05:54:00.001-07:00</published><updated>2019-04-05T02:44:54.980-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="deploy"/><category scheme="http://www.blogger.com/atom/ns#" term="deployment"/><category scheme="http://www.blogger.com/atom/ns#" term="git"/><category scheme="http://www.blogger.com/atom/ns#" term="git tag"/><category scheme="http://www.blogger.com/atom/ns#" term="no fast forward"/><category scheme="http://www.blogger.com/atom/ns#" term="process"/><category scheme="http://www.blogger.com/atom/ns#" term="release"/><category scheme="http://www.blogger.com/atom/ns#" term="tagging"/><title type='text'>git workflow</title><content type='html'>&lt;!DOCTYPE html&gt;
&lt;html&gt;

&lt;head&gt;
  &lt;meta charset=&quot;utf-8&quot;&gt;
  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
  &lt;title&gt;2019-02-16-git-workflow&lt;/title&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;https://stackedit.io/style.css&quot; /&gt;
&lt;/head&gt;

&lt;body class=&quot;stackedit&quot;&gt;
  &lt;div class=&quot;stackedit__html&quot;&gt;&lt;ul&gt;
&lt;li&gt;new &lt;code&gt;develop&lt;/code&gt; branch alongside master&lt;/li&gt;
&lt;li&gt;merge requests are small, focused, easily reviewable&lt;/li&gt;
&lt;li&gt;reviewed on their way into &lt;code&gt;develop&lt;/code&gt; so can then be included or omitted from a subsequent release without further review&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;merge-process-for-master&quot;&gt;merge process for master&lt;/h3&gt;
&lt;p&gt;assuming develop is where you need it to be&lt;br&gt;
update the changelog and version, add, commit&lt;br&gt;
checkout master and merge:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;git merge develop --no-ff&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;the &lt;code&gt;--no-ff&lt;/code&gt; flag is ‘no fast forward’. This creates an additional commit that will serve as an artifact of the release (since develop will continue to be developed upon).&lt;/p&gt;
&lt;p&gt;[Q: how to cherry-pick commits in develop if it turns out we don’t want to include them?]&lt;/p&gt;
&lt;p&gt;Now add an annotated tag to the current commit before pushing:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;git tag -a v1.10.0 -m &quot;live-2019-02-14&quot;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;push it to the remote repo. build and release&lt;/p&gt;
&lt;p&gt;go back into develop and &lt;code&gt;git merge master&lt;/code&gt; to fast forward and get things synced up.&lt;/p&gt;
&lt;p&gt;continue working on develop.&lt;/p&gt;
&lt;h2 id=&quot;process-summary&quot;&gt;Process summary&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;&amp;gt;develop $ git pull&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Update version and changelog, commit, push.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;gt;develop $ git checkout master&lt;/code&gt;&lt;br&gt;
&lt;code&gt;&amp;gt;master $ git merge develop --no-ff&lt;/code&gt;&lt;br&gt;
&lt;code&gt;&amp;gt;master $ git tag -a v1.10.0 -m &quot;live-2019-02-14&quot;&lt;/code&gt;&lt;br&gt;
&lt;code&gt;&amp;gt;master $ git push&lt;/code&gt;&lt;br&gt;
&lt;code&gt;&amp;gt;master git checkout develop&lt;/code&gt;&lt;br&gt;
&lt;code&gt;&amp;gt;develop $ git merge master&lt;/code&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/body&gt;

&lt;/html&gt;
</content><link rel='replies' type='application/atom+xml' href='https://markup-mitchell.blogspot.com/feeds/4216246548017006182/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://markup-mitchell.blogspot.com/2019/02/git-workflow.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/4216246548017006182'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/4216246548017006182'/><link rel='alternate' type='text/html' href='https://markup-mitchell.blogspot.com/2019/02/git-workflow.html' title='git workflow'/><author><name>markup mitchell</name><uri>http://www.blogger.com/profile/04110229624586413585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5683362339713645548.post-3971839099277987943</id><published>2019-03-12T04:16:00.002-07:00</published><updated>2019-03-12T04:16:32.906-07:00</updated><title type='text'>2019-03-11-website-log-analytics</title><content type='html'>&lt;!DOCTYPE html&gt;
&lt;html&gt;

&lt;head&gt;
  &lt;meta charset=&quot;utf-8&quot;&gt;
  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
  &lt;title&gt;2019-03-11-website-log-analytics&lt;/title&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;https://stackedit.io/style.css&quot; /&gt;
&lt;/head&gt;

&lt;body class=&quot;stackedit&quot;&gt;
  &lt;div class=&quot;stackedit__html&quot;&gt;&lt;p&gt;Lots of stuff needs done in a workmanlike way today.&lt;/p&gt;
&lt;p&gt;Top priorities for this morning:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strike&gt;resolve merge conflicts and get MRs fixed and into develop&lt;/strike&gt;&lt;/li&gt;
&lt;li&gt;&lt;strike&gt;analytics on pricing page buttons&lt;/strike&gt;&lt;/li&gt;
&lt;li&gt;&lt;strike&gt;pricing page UI tweaks to enable release&lt;/strike&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;09:48&lt;/p&gt;
&lt;p&gt;catch up with LS about day/week plan&lt;/p&gt;
&lt;p&gt;10:10&lt;/p&gt;
&lt;p&gt;Going to try to resolve merge conflicts locally. Not sure about this.&lt;/p&gt;
&lt;p&gt;10:28&lt;/p&gt;
&lt;p&gt;I hate this. I accepted incoming changes and the layout got all messed up.&lt;/p&gt;
&lt;p&gt;I’ve just tried accepting both changes and I got duplicate UI all nested inside itself weirdly. Going to try accepting current changes and see what goes wrong.&lt;/p&gt;
&lt;p&gt;Well, that’s the best, but I lose a bunch of styling and I get the feeling I’m wiping out all the gains of the previous MR.&lt;/p&gt;
&lt;p&gt;Going to try to deftly disentangle these and get the best of both worlds.&lt;/p&gt;
&lt;p&gt;10:37&lt;/p&gt;
&lt;p&gt;So, gulp had failed silently somewhere in that process, which I realised after &lt;code&gt;reset HEAD --hard&lt;/code&gt; did not restore the styles I wanted.&lt;/p&gt;
&lt;p&gt;Now I’m thinking maybe I want to accept current changes on the pricing page HTML and incoming changes in the stylesheet. Let’s give it a go.&lt;/p&gt;
&lt;p&gt;10:55&lt;/p&gt;
&lt;p&gt;No, this is a nightmare. I don’t know what’s going on. I’m going to accept all my current changes then reproduce the changes of the previous MR. It’ll be quicker than sorting this out.&lt;/p&gt;
&lt;p&gt;11:07&lt;/p&gt;
&lt;p&gt;Reverted the previous merge on gitlab which removed conflicts so I could merge the substantive branch. All good. Now I just need to reproduce the changes from the reverted merge. I’ll do that in my current branch and then update.&lt;/p&gt;
&lt;p&gt;12:13&lt;/p&gt;
&lt;p&gt;Man, what a drag. All done, at last, and I think it’s OK. Annoyingly, I’m fixing things to a standard that I know is going to be revised in changes coming down the line from the new homepage.&lt;/p&gt;
&lt;p&gt;It’s really a tangle when you work in different branches at the same time.&lt;/p&gt;
&lt;p&gt;Now I’m going to take a lunch break and get into analytics afterwards.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;12:36&lt;/p&gt;
&lt;p&gt;Back with lunch. I actually think I’m going to tweak some more UI over lunch. I want it to be releasable today if possible.&lt;/p&gt;
&lt;p&gt;14:41&lt;/p&gt;
&lt;p&gt;Gawd. I think I finally got the page elements aligned and scaling properly. It’s a real guddle. I’m trying to abstract sizing and margin rules out of the components to the page level. It feels like the concept of “layouts” is becoming real for me now.&lt;/p&gt;
&lt;p&gt;The next phase, when I get hands on with whatever the design system parameters are, will be to take those page-level rules and raise them up to generic CSS.&lt;/p&gt;
&lt;p&gt;In the meantime, I’d better get started on the analytics.&lt;/p&gt;
&lt;p&gt;15:24&lt;/p&gt;
&lt;p&gt;That was pretty painless… assuming it works. I’m waiting for validation (who isn’t?).&lt;/p&gt;
&lt;p&gt;PRICING: UPDATED TO DO&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strike&gt;first jargonbuster term button should be focused on landing&lt;/strike&gt; &lt;code&gt;autofocus&lt;/code&gt; acts as a page anchor, so I just added the &lt;code&gt;active&lt;/code&gt; class and styled it&lt;/li&gt;
&lt;li&gt;&lt;strike&gt;firefox and safari button focus missing&lt;/strike&gt;&lt;/li&gt;
&lt;li&gt;&lt;strike&gt;group life button change &lt;code&gt;book a demo&lt;/code&gt; to &lt;code&gt;get a quote&lt;/code&gt;&lt;/strike&gt;&lt;/li&gt;
&lt;li&gt;&lt;strike&gt;point &lt;code&gt;get a quote&lt;/code&gt;… somewhere else?&lt;/strike&gt; nope&lt;/li&gt;
&lt;li&gt;&lt;strike&gt;how to autofocus style without anchoring the page landing?&lt;/strike&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/body&gt;

&lt;/html&gt;
</content><link rel='replies' type='application/atom+xml' href='https://markup-mitchell.blogspot.com/feeds/3971839099277987943/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://markup-mitchell.blogspot.com/2019/03/2019-03-11-website-log-analytics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/3971839099277987943'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/3971839099277987943'/><link rel='alternate' type='text/html' href='https://markup-mitchell.blogspot.com/2019/03/2019-03-11-website-log-analytics.html' title='2019-03-11-website-log-analytics'/><author><name>markup mitchell</name><uri>http://www.blogger.com/profile/04110229624586413585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5683362339713645548.post-4367604619138514073</id><published>2019-03-05T10:37:00.002-08:00</published><updated>2019-03-05T10:37:52.560-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="components"/><category scheme="http://www.blogger.com/atom/ns#" term="design"/><category scheme="http://www.blogger.com/atom/ns#" term="problems"/><category scheme="http://www.blogger.com/atom/ns#" term="work"/><title type='text'>2019-03-04-website-log-tabs</title><content type='html'>&lt;!DOCTYPE html&gt;
&lt;html&gt;

&lt;head&gt;
  &lt;meta charset=&quot;utf-8&quot;&gt;
  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
  &lt;title&gt;2019-03-04-website-log-tabs&lt;/title&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;https://stackedit.io/style.css&quot; /&gt;
&lt;/head&gt;

&lt;body class=&quot;stackedit&quot;&gt;
  &lt;div class=&quot;stackedit__html&quot;&gt;&lt;p&gt;When things are going well for me I tend not to document my progress. It makes sense, I suppose, since the main value is in the process of overcoming problems.&lt;/p&gt;
&lt;p&gt;Last week I started implementing this tabbed product card for the revamp of the pricing page:&lt;br&gt;
&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguXfjnmLfPFTfvEpEJDpvMb9bBtyCTT1uqSCPZDrkxUKa_b9NdfmUIYr1wQC3GsMQsYZzsXP4Bjz3siiOGl-HNWPh3E_fJ1R4r5LViA9iviuGr1lbFIRGhHvtVOj36doq46A_ymU_-BOkY/&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;
&lt;h3 id=&quot;stage-0---planning&quot;&gt;Stage 0 - planning&lt;/h3&gt;
&lt;p&gt;Analyse the design across desktop and mobile designs and get an idea of the component hierarchy. This all looks pretty straightforward as far as content goes.&lt;/p&gt;
&lt;p&gt;I’m paying particular attention to how these elements behave across desktop and mobile. By giving them identities up front I can start to reason about them in a way that will hopefully avoid confusion down the line.&lt;/p&gt;
&lt;p&gt;In this case it’s notable that columns (green “contentBlock” in the above) themselves stack into a column on mobile and change to full screen width.&lt;/p&gt;
&lt;p&gt;There’s some fairly arbitrary positioning changes between desktop and mobile. Text in the first column gets center-aligned on mobile, text in the second column remains left-aligned, except for the button which is right-aligned on desktop but becomes center-aligned on mobile.&lt;/p&gt;
&lt;p&gt;Even that’s a simplification if I take the designs absolutely literally, but there’s some scope for adjustment, I reckon, so I’m not going to worry too much about it.&lt;/p&gt;
&lt;h3 id=&quot;stage-1---tab-functionality&quot;&gt;Stage 1 - tab functionality&lt;/h3&gt;
&lt;p&gt;I tried &lt;a href=&quot;https://van11y.net/accessible-tab-panel/&quot;&gt;van11y&lt;/a&gt; and &lt;a href=&quot;https://www.npmjs.com/package/tabbyjs&quot;&gt;tabby&lt;/a&gt; and another (tabsy?) that I can’t be bothered looking up. It was probably some error of mine that they didn’t work for me, but I couldn’t find a path that I was confident in, so I just used a &lt;a href=&quot;https://www.w3schools.com/w3css/w3css_tabulators.asp&quot;&gt;super-simple approach&lt;/a&gt; in CSS and a few lines of JS. There’s no native tab elements in HTML and I get the feeling that all these libraries are so simple as to be almost not worth using, so I’m not feeling too bad about this.&lt;/p&gt;
&lt;p&gt;Some questions around behaviour here too - when the tabbed component stretches horizontally, do the tabs space or grow (some proportional combination might be possible with grid, but I want to avoid that for compatibility purposes).&lt;/p&gt;
&lt;p&gt;Similarly, the content: does each column have a max-width? does it sit centrally or in a space-between flexbox way? Again, some combination would probably be ideal.&lt;/p&gt;
&lt;h3 id=&quot;stage-3---content-columns&quot;&gt;Stage 3 - content columns&lt;/h3&gt;
&lt;p&gt;With the tabbing sorted (more or less - I need to figure out how to have tab 1 open on pageload, but I’ll do that later) I got onto the atomic elements.&lt;/p&gt;
&lt;p&gt;I won’t give a blow-by-blow account of this, but it’s trickier than you’d expect, especially when you can’t reach for flexbox at every stage.&lt;/p&gt;
&lt;p&gt;I ended up using &lt;code&gt;display&lt;/code&gt; properties like &lt;code&gt;inline-block&lt;/code&gt; and &lt;code&gt;inline-flex&lt;/code&gt; that I’m not too familiar with and having to contend with strange behaviour like the icons re-sizing and things being oddly spaced. There are odd defaults that kick in when you combine &lt;code&gt;inline&lt;/code&gt; and &lt;code&gt;block&lt;/code&gt; elements with &lt;code&gt;flex&lt;/code&gt; which mean you need to explicitly state properties that you don’t normally need to worry about.&lt;/p&gt;
&lt;p&gt;Also quite fiddly to get things changing alignment correctly as observed in planning. I got there.&lt;/p&gt;
&lt;h3 id=&quot;log&quot;&gt;log&lt;/h3&gt;
&lt;p&gt;This is where I’m currently at. The first product card’s contents are all (almost) per design - I just need to tweak the margins and whatnot.&lt;/p&gt;
&lt;p&gt;objectives for today are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strike&gt;finish spacing on card 1&lt;/strike&gt;&lt;/li&gt;
&lt;li&gt;&lt;strike&gt;add icons to tabs&lt;/strike&gt;&lt;/li&gt;
&lt;li&gt;&lt;strike&gt;add content for cards 2 and 3&lt;/strike&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;section&quot;&gt;15:28&lt;/h4&gt;
&lt;p&gt;OK, so that’s done, but I ran into a few problems and need to consult.&lt;/p&gt;
&lt;h3 id=&quot;design-systemcomponent--proposals&quot;&gt;design system/component  proposals&lt;/h3&gt;
&lt;p&gt;There’s a category of text of that I’ve been aware of for a while which consistently causes problems:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhj4H6Ft5zgIXD26w20r2bNpS880F9YeOna7vdkVU9V5CvmN6wYQYY2pPIkt_SGaEAepiSncJ6Kg9wdN8MK7mvxE1pUeQ_INs_Tifr8wBXWb7vwxKtdAHPqfymWs8V6MBOnbIqcMdrYGgp/&quot; alt=&quot;enter image description here&quot;&gt;&lt;br&gt;
When text of very different sizes has to be combined - typically in this small-print or disambiguation role - the default margins, padding, line-height etc are too big and have to be stripped away.&lt;/p&gt;
&lt;p&gt;In this example, I’ve made a new class (lazily entitled &lt;code&gt;big-pink-text&lt;/code&gt;) and I’ve had to remove all margins &lt;strong&gt;and&lt;/strong&gt; set the height of the element itself to enable me to get the text underneath close enough.&lt;/p&gt;
&lt;p&gt;So when I get the additional cards and I have to add “from” in front of the price in one product in a significantly smaller font, I look at what I already have in the component that I can re-use. &lt;code&gt;additional-info&lt;/code&gt; is the right size, but wrong color, so I append the &lt;code&gt;.primary&lt;/code&gt; utility class to turn it pink.&lt;/p&gt;
&lt;p&gt;Done, right? Nope because margins. Gah! so I’m going to end up making this specific style for a one-word span.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2DVVERBEJUQI65ClLj1fBWcc0jqef-4mZY33E3_hUcVIdZJ4IilsqAHe26I_2XAAkDv4Nt6RJcPmpNoWX0thFc278VZir6uZnYcx8pur-hrSULngLpuwVv-Vk4ncD8P3V4G8eQbyDD0gy/&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;
&lt;h2 id=&quot;anyway&quot;&gt;Anyway&lt;/h2&gt;
&lt;p&gt;I had a call with the designer and it was a big help. He understood my points and we made some good progress.&lt;/p&gt;
&lt;p&gt;Turns out his preference is for fewer rules too, so we can prefer behaviour that’s closer to the old-skool flow rules and I was right in thinking that I was falsely attributing to him design concerns that he doesn’t have, like being averse to long lines, dangling words, etc.&lt;/p&gt;
&lt;p&gt;Consistent with the react projects, we will try to avoid arbitrarily &lt;code&gt;max-width&lt;/code&gt;ing components, preferring to define flow behaviours and letting the context/layout impose the constraints.&lt;/p&gt;
&lt;p&gt;It was a big conversation so I can’t capture all the nuance here. Going to call it a day.&lt;/p&gt;
&lt;p&gt;END&lt;/p&gt;
&lt;/div&gt;
&lt;/body&gt;

&lt;/html&gt;
</content><link rel='replies' type='application/atom+xml' href='https://markup-mitchell.blogspot.com/feeds/4367604619138514073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://markup-mitchell.blogspot.com/2019/03/2019-03-04-website-log-tabs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/4367604619138514073'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/4367604619138514073'/><link rel='alternate' type='text/html' href='https://markup-mitchell.blogspot.com/2019/03/2019-03-04-website-log-tabs.html' title='2019-03-04-website-log-tabs'/><author><name>markup mitchell</name><uri>http://www.blogger.com/profile/04110229624586413585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguXfjnmLfPFTfvEpEJDpvMb9bBtyCTT1uqSCPZDrkxUKa_b9NdfmUIYr1wQC3GsMQsYZzsXP4Bjz3siiOGl-HNWPh3E_fJ1R4r5LViA9iviuGr1lbFIRGhHvtVOj36doq46A_ymU_-BOkY/s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5683362339713645548.post-6233708508636942482</id><published>2019-02-25T02:34:00.002-08:00</published><updated>2019-02-25T02:34:27.368-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="typescript"/><category scheme="http://www.blogger.com/atom/ns#" term="work"/><title type='text'>coming back to typescript</title><content type='html'>&lt;!DOCTYPE html&gt;
&lt;html&gt;

&lt;head&gt;
  &lt;meta charset=&quot;utf-8&quot;&gt;
  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
  &lt;title&gt;2019-02-22-typescript&lt;/title&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;https://stackedit.io/style.css&quot; /&gt;
&lt;/head&gt;

&lt;body class=&quot;stackedit&quot;&gt;
  &lt;div class=&quot;stackedit__html&quot;&gt;&lt;p&gt;One of the hardest things I dealt with the last time I worked on this code base was Typescript, and that’s still the case. It’s like a difficulty multiplier that just seems exponentially more trouble than it’s worth.&lt;/p&gt;
&lt;p&gt;My approach to such things has always been to prefer learning something &lt;strong&gt;after&lt;/strong&gt; I’d suffered from the problems that thing was invented to solve. My side projects have never reached a point of complexity that I’ve lost track of the types, or experienced bugs as a result of mis-typing (or type coercion).&lt;/p&gt;
&lt;p&gt;I say that, but actually I can think of a couple of recent examples where I was 1) expecting a primitive value to be returned by a JS method (&lt;code&gt;interactionObserver&lt;/code&gt; if you’re interested) and 2) expecting a handlebars partial parameter to be treated as a boolean (&lt;code&gt;production=&quot;false&quot;&lt;/code&gt;) when, because it was a non-zero-length string, was evaluated as &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Anyway, the point I want to record - ahead of a proper investigation into typescript - is that in my ever-so-slight experience of Java, I’ve had to get used to specifying not just the type of a variable when I declare it&lt;/p&gt;
&lt;p&gt;number, float, color etc.&lt;/p&gt;
&lt;p&gt;but also, &lt;strong&gt;typing the return value of a function&lt;/strong&gt; when it’s defined.&lt;/p&gt;
&lt;p&gt;Hence &lt;code&gt;void&lt;/code&gt; when no return value is expected.&lt;/p&gt;
&lt;p&gt;So what do you do when a variable is being assigned a function? or a function returns another function? or a variable is being assigned to a function that returns another function? or a variable being assigned to a function that returns an object whose properties may be functions that return functions?&lt;/p&gt;
&lt;p&gt;This is where I’m at, I think; react and styled-components are functions returning functions returning functions.&lt;/p&gt;
&lt;/div&gt;
&lt;/body&gt;

&lt;/html&gt;
</content><link rel='replies' type='application/atom+xml' href='https://markup-mitchell.blogspot.com/feeds/6233708508636942482/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://markup-mitchell.blogspot.com/2019/02/coming-back-to-typescript.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/6233708508636942482'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/6233708508636942482'/><link rel='alternate' type='text/html' href='https://markup-mitchell.blogspot.com/2019/02/coming-back-to-typescript.html' title='coming back to typescript'/><author><name>markup mitchell</name><uri>http://www.blogger.com/profile/04110229624586413585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5683362339713645548.post-3198222760269586850</id><published>2019-02-22T15:44:00.002-08:00</published><updated>2019-02-22T15:44:59.844-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="consensus"/><category scheme="http://www.blogger.com/atom/ns#" term="conventions"/><category scheme="http://www.blogger.com/atom/ns#" term="leading practice"/><category scheme="http://www.blogger.com/atom/ns#" term="react"/><category scheme="http://www.blogger.com/atom/ns#" term="work"/><title type='text'>react re-acquaintence</title><content type='html'>&lt;!DOCTYPE html&gt;
&lt;html&gt;

&lt;head&gt;
  &lt;meta charset=&quot;utf-8&quot;&gt;
  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
  &lt;title&gt;2019-02-22-log&lt;/title&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;https://stackedit.io/style.css&quot; /&gt;
&lt;/head&gt;

&lt;body class=&quot;stackedit&quot;&gt;
  &lt;div class=&quot;stackedit__html&quot;&gt;&lt;p&gt;I ended up doing a bit more more work on the react project last night before bed… and then a bit more &lt;em&gt;after&lt;/em&gt; bed when the baby woke me up and I couldn’t get back.&lt;/p&gt;
&lt;p&gt;I ended up with something very close to the designs:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxg-zgNS61aK7cpOpT5T0SZOjOosW07KjVrePpWM0FDh4GRUS2tQydUWz5LHm5Gy8X9-m9GQp2-tchmSFJ4USShETVr6-BG2NR9Df7APBDQVN5H6lFeYIDxGnuSyymgGca7uKTVTYvigyT/&quot; alt=&quot;enter image description here&quot; title=&quot;design&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLKXuUX_zxdHCeFm0lQo9det2WikyHQDuX2rJHfOM8TA30ewXJU7zObglRNwe9fN9-zL86rpcQpDmFopgQ9XNAmLMvvt5JfHC_SrUJzKLvWggHDH1lcD85MulAGag_ba8_0ufKUdTEGADV/&quot; alt=&quot;&quot; title=&quot;mine&quot;&gt;&lt;br&gt;
But not close enough to pass muster - and not done in a way that’s particularly clean or in keeping with the project structure I think.&lt;/p&gt;
&lt;h3 id=&quot;observations&quot;&gt;Observations&lt;/h3&gt;
&lt;p&gt;Very weird experience dealing with this stuff again.&lt;/p&gt;
&lt;p&gt;It’s not &lt;strong&gt;that&lt;/strong&gt; hard to get things rolling, but it feels harder than it ought to be.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the atomic design approach militates for consistency and reuse&lt;/li&gt;
&lt;li&gt;component-based approaches militate for consistency and reuse&lt;/li&gt;
&lt;li&gt;when designs are inconsistent you either have to handle the variance or duplicate code&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I’m not able to comprehensively describe what I’m trying to say, but there’s a fundamental tension between what we’re doing and the facilities we’re setting up to do it. We’re optimising within the wrong parameters… or something.&lt;/p&gt;
&lt;h3 id=&quot;collaboration&quot;&gt;Collaboration&lt;/h3&gt;
&lt;p&gt;Anyway, had a call with E and confirmed a lot of this. As long as I’ve understood the problems correctly, that’s OK with me!&lt;/p&gt;
&lt;p&gt;Also got some pragmatic advice about the creation and deletion of components, so I don’t feel so uptight about that.&lt;/p&gt;
&lt;p&gt;The whole process is fascinating to me. It seems so straightforward but it’s so, so hard.&lt;/p&gt;
&lt;p&gt;Talked to AC and agreed that naming UI components in the design stages would help.&lt;/p&gt;
&lt;h3 id=&quot;back-to-react&quot;&gt;Back to react&lt;/h3&gt;
&lt;p&gt;OK, so I’m supposed to be creating a new atom for this box.&lt;/p&gt;
&lt;p&gt;I guess I’ll call it &lt;code&gt;DialogBox&lt;/code&gt; same as before. Rather than adapt the existing consent checkbox, I’ll start from scratch.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;first I need to figure out where this stuff is implemented so I can insert my own component.&lt;/li&gt;
&lt;li&gt;Layout is a presentational component which has the children I’m concerned with. I can remove all the children of layout without messing up any templates. that’s in &lt;code&gt;templates/employee/adb/subscription.tsx&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That template is the The Page I’m changing, so I guess it’s OK to do that. I comment out stuff within Layout and the progress bar and coin bit disappears - why?&lt;/p&gt;
&lt;p&gt;OK, they’re not there in the original journey. Fine.&lt;/p&gt;
&lt;h2 id=&quot;questions&quot;&gt;questions&lt;/h2&gt;
&lt;h3 id=&quot;q-should-it-be-a-molecule&quot;&gt;Q: should it be a molecule?&lt;/h3&gt;
&lt;p&gt;A: yes, basically&lt;/p&gt;
&lt;p&gt;Are we splitting these things down in terms of unit-ness (for want of a better term), or composition from existing HTML elements?&lt;/p&gt;
&lt;p&gt;I don’t think my &lt;code&gt;DialogBox&lt;/code&gt; is so simple as to warrant being called an atom, and my colleague agreed. The fact that, apart from being assessed on its own merits, it can contain child elements like &lt;code&gt;&amp;lt;Button&amp;gt;&lt;/code&gt; sort of makes the case.&lt;/p&gt;
&lt;p&gt;Ability to be implemented without regard to context also seemed like a relevant criterion.&lt;/p&gt;
&lt;h3 id=&quot;q-how-do-we-control-the-width-of-the-box&quot;&gt;Q: how do we control the width of the box?&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;FullWidthLayout&lt;/code&gt; is too wide. I would set the &lt;code&gt;DialogBoxWrapper&lt;/code&gt; to &lt;code&gt;max-width: 80px;&lt;/code&gt; if it was left to me.&lt;/p&gt;
&lt;p&gt;The previous explanation I’d heard was that atoms (answer above notwithstanding), ought not to be hard-coded with width/height and other ‘primary’ (in my sense) values.&lt;/p&gt;
&lt;p&gt;If I respect that, then what’s to become of this component that’s too wide? Is it OK to add a &lt;code&gt;max-width&lt;/code&gt;? No, not really, we concluded. If we were going to do that we should pass it as a prop, and then the whole notion of layouts starts to be undermined.&lt;/p&gt;
&lt;p&gt;Alright. So what suffers is design fidelity, in this trade-off. That’s fine. It might even feed back into the design aspects of the development cycle.&lt;/p&gt;
&lt;h3 id=&quot;q-husky-complains-about-px-unit.-do-i-need-to-use-rem-for-everything-em&quot;&gt;Q: husky complains about &lt;code&gt;px&lt;/code&gt; unit. Do I need to use &lt;code&gt;rem&lt;/code&gt; for everything? &lt;code&gt;em&lt;/code&gt;?&lt;/h3&gt;
&lt;p&gt;A: Yes. rem. Make awkward pixel values awkward. I’m cool with that.&lt;/p&gt;
&lt;h3 id=&quot;q-i’m-naming-things-in-a-bem-ish-kind-of-way.-is-that-objectionable&quot;&gt;Q: I’m naming things in a BEM-ish kind of way. Is that objectionable?&lt;/h3&gt;
&lt;p&gt;A: Nope. We shouldn’t be too prescriptive about naming. If it’s not causing problems, it’s OK, and my naming scheme is coherent with the existing codebase.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;I’ll bump some of the additional conversation forward into subsequent posts.&lt;/p&gt;
&lt;p&gt;END&lt;/p&gt;
&lt;/div&gt;
&lt;/body&gt;

&lt;/html&gt;
</content><link rel='replies' type='application/atom+xml' href='https://markup-mitchell.blogspot.com/feeds/3198222760269586850/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://markup-mitchell.blogspot.com/2019/02/react-re-acquaintence.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/3198222760269586850'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/3198222760269586850'/><link rel='alternate' type='text/html' href='https://markup-mitchell.blogspot.com/2019/02/react-re-acquaintence.html' title='react re-acquaintence'/><author><name>markup mitchell</name><uri>http://www.blogger.com/profile/04110229624586413585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxg-zgNS61aK7cpOpT5T0SZOjOosW07KjVrePpWM0FDh4GRUS2tQydUWz5LHm5Gy8X9-m9GQp2-tchmSFJ4USShETVr6-BG2NR9Df7APBDQVN5H6lFeYIDxGnuSyymgGca7uKTVTYvigyT/s72-c" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5683362339713645548.post-5445202376076061094</id><published>2019-02-22T01:43:00.002-08:00</published><updated>2019-02-22T01:43:46.002-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="environments"/><category scheme="http://www.blogger.com/atom/ns#" term="ghost"/><category scheme="http://www.blogger.com/atom/ns#" term="handlebars"/><category scheme="http://www.blogger.com/atom/ns#" term="react"/><category scheme="http://www.blogger.com/atom/ns#" term="work"/><title type='text'>daily log - gulp, ghost, react</title><content type='html'>&lt;!DOCTYPE html&gt;
&lt;html&gt;

&lt;head&gt;
  &lt;meta charset=&quot;utf-8&quot;&gt;
  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
  &lt;title&gt;2019-02-21-log&lt;/title&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;https://stackedit.io/style.css&quot; /&gt;
&lt;/head&gt;

&lt;body class=&quot;stackedit&quot;&gt;
  &lt;div class=&quot;stackedit__html&quot;&gt;&lt;p&gt;I’ve reported three things to do today:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Continue trying to resolve GA non-firing issue&lt;/li&gt;
&lt;li&gt;Try out a couple more ways of varying data per environment in the website&lt;/li&gt;
&lt;li&gt;Update local builds of signup, api and B2B projects, have a go at a fontend ticket for signup.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The first I will help with on request, so I’ll ignore that for now.&lt;/p&gt;
&lt;p&gt;I’ll do a bit in the env stuff now since it seems tantilisingly solvable.&lt;/p&gt;
&lt;h2 id=&quot;log&quot;&gt;log&lt;/h2&gt;
&lt;h3 id=&quot;environment-switching&quot;&gt;environment switching&lt;/h3&gt;
&lt;p&gt;10:13&lt;/p&gt;
&lt;p&gt;Right now I’m checking if there’s some kind of &lt;a href=&quot;https://docs.ghost.org/api/handlebars-themes/helpers/site/&quot;&gt;global value&lt;/a&gt; that could be consulted that would enable the subbing in of a whole {{partial}} containing either the dev or prod code. I’d leave prod in as the default, actually and seek only to interpolate dev as required.&lt;/p&gt;
&lt;p&gt;Options:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;a js variable injected into the site via the portal, like &lt;code&gt;const developmentInstance = true;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;an @site value as mentioned in the link above&lt;/li&gt;
&lt;li&gt;a helper that reads the current URL?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Attempt 1&lt;/p&gt;
&lt;p&gt;I blanked the site title in the admin portal and used &lt;code&gt;{{#if}}&lt;/code&gt; &lt;code&gt;{{else}}&lt;/code&gt; and &lt;code&gt;{{#unless}}&lt;/code&gt; helpers to try to conditionally swap tags… no dice.  I wonder if it still resolves to &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;I tried putting some random text in as the site title to see if that would resolve to an (obviously invalid) analytics tag… it didn’t. But that made me realise the tag information isn’t coming from where I thought it was. :O&lt;/p&gt;
&lt;p&gt;11:53&lt;/p&gt;
&lt;p&gt;OK. I’m feeling kind of stupid right now, but at least I’m learning.&lt;/p&gt;
&lt;p&gt;First up, &lt;code&gt;&amp;lt;noscript&amp;gt;&lt;/code&gt; is not going to have a material effect on the tags. It’s a fallback in case (duh) the browser cannot run JS.&lt;/p&gt;
&lt;p&gt;Secondly, one of the reasons my earlier tests weren’t working is because I was passing &lt;code&gt;production=&quot;false&quot;&lt;/code&gt;, and &lt;code&gt;&quot;false&quot;&lt;/code&gt; being a string of non-zero length, resolves to &lt;code&gt;true&lt;/code&gt;. Not quite so ‘duh’, but still a clanger.&lt;/p&gt;
&lt;p&gt;13:26&lt;/p&gt;
&lt;p&gt;I’ve concluded that I’m on a hiding to nothing with this.&lt;/p&gt;
&lt;p&gt;E suggests &lt;a href=&quot;https://www.npmjs.com/package/gulp-token-replace&quot;&gt;this module&lt;/a&gt; which looks ideal to me. It solves my basic problem which is how to link all those arbitrary find/replace instructions into a single, self-documenting config file.&lt;/p&gt;
&lt;p&gt;Too sick of this to do it now, so I’ll come back on monday maybe.&lt;/p&gt;
&lt;h3 id=&quot;signup-project&quot;&gt;signup project&lt;/h3&gt;
&lt;p&gt;13:35&lt;/p&gt;
&lt;p&gt;First I need to get the B2B project up and running so I can create accounts to work with.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;a href=&quot;https://www.git-tower.com/learn/git/faq/difference-between-git-fetch-git-pull&quot;&gt;&lt;code&gt;git fetch&lt;/code&gt;&lt;/a&gt;&lt;br&gt;
&lt;code&gt;git pull&lt;/code&gt;&lt;br&gt;
&lt;code&gt;nvm use&lt;/code&gt; (I always forget this until it complains)&lt;br&gt;
&lt;code&gt;yarn&lt;/code&gt;&lt;br&gt;
&lt;code&gt;yarn develop&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;OK, that all worked great. I’ve made a new business account and added myself as a user.&lt;/p&gt;
&lt;p&gt;13:57&lt;/p&gt;
&lt;p&gt;starting the signup journey as a member, I’m just noting the pages I ought to refer to when building my new component:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://localhost:3001/employee/signup/name&quot;&gt;http://localhost:3001/employee/signup/name&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;15:58&lt;/p&gt;
&lt;p&gt;So.&lt;/p&gt;
&lt;p&gt;I spent ages looking around the project files with a growing sense of disorientation and panic wondering why it had all been refactored to not use jsx (tsx, technically) and was passing in styles as objects…&lt;/p&gt;
&lt;p&gt;Unfortunately for my pride, it wasn’t until &lt;strong&gt;after&lt;/strong&gt; I’d asked my colleague S what the deal was that I realised I was in the built directory looking at the transpiled code.&lt;/p&gt;
&lt;p&gt;Kee-rist. What an idiot!&lt;/p&gt;
&lt;p&gt;Now I’m trying to get up to speed using another project - our internal react-components library - to see if I can search through for existing components to use in this new design.&lt;/p&gt;
&lt;/div&gt;
&lt;/body&gt;

&lt;/html&gt;
</content><link rel='replies' type='application/atom+xml' href='https://markup-mitchell.blogspot.com/feeds/5445202376076061094/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://markup-mitchell.blogspot.com/2019/02/daily-log-gulp-ghost-react.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/5445202376076061094'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/5445202376076061094'/><link rel='alternate' type='text/html' href='https://markup-mitchell.blogspot.com/2019/02/daily-log-gulp-ghost-react.html' title='daily log - gulp, ghost, react'/><author><name>markup mitchell</name><uri>http://www.blogger.com/profile/04110229624586413585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5683362339713645548.post-7422492863523080653</id><published>2019-02-21T05:25:00.002-08:00</published><updated>2019-02-21T05:25:35.850-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="fail"/><category scheme="http://www.blogger.com/atom/ns#" term="frustration"/><category scheme="http://www.blogger.com/atom/ns#" term="problem"/><category scheme="http://www.blogger.com/atom/ns#" term="problem-solving"/><category scheme="http://www.blogger.com/atom/ns#" term="work"/><category scheme="http://www.blogger.com/atom/ns#" term="zen"/><title type='text'>stuck</title><content type='html'>&lt;!DOCTYPE html&gt;
&lt;html&gt;

&lt;head&gt;
  &lt;meta charset=&quot;utf-8&quot;&gt;
  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
  &lt;title&gt;2019-02-19-website-log-gulp&lt;/title&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;https://stackedit.io/style.css&quot; /&gt;
&lt;/head&gt;

&lt;body class=&quot;stackedit&quot;&gt;
  &lt;div class=&quot;stackedit__html&quot;&gt;&lt;p&gt;My follow-on from yesterday - transposing env values into the codebase at build for different environments.&lt;/p&gt;
&lt;p&gt;Hot on the heels of last week’s problem-solving, I have decided to keep the heid and come at this with a can-do attitude (rather than a panicky one).&lt;/p&gt;
&lt;p&gt;Right now I’m in that state of &lt;a href=&quot;https://markup-mitchell.blogspot.com/2019/02/stuckness.html&quot;&gt;stuckness&lt;/a&gt; that Robert M. Prisig talks aboutt in Zen and the Art […].&lt;/p&gt;
&lt;p&gt;Looking for a solution.&lt;/p&gt;
&lt;h3 id=&quot;gulp-util-is-deprecated&quot;&gt;&lt;a href=&quot;https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5&quot;&gt;&lt;code&gt;gulp-util&lt;/code&gt;&lt;/a&gt; is deprecated&lt;/h3&gt;
&lt;p&gt;This is just something I discovered in the course of looking into this. Added it to my todo list. I don’t even know which gutil modules we’re making use of…&lt;/p&gt;
&lt;p&gt;For my current purposes &lt;a href=&quot;https://www.npmjs.com/package/minimist&quot;&gt;this&lt;/a&gt; is the recommendation I suppose, but I can’t make sense of it just now.&lt;/p&gt;
&lt;h3 id=&quot;reading-process.env&quot;&gt;10:07 - reading &lt;a href=&quot;https://codeburst.io/process-env-what-it-is-and-why-when-how-to-use-it-effectively-505d0b2831e7&quot;&gt;process.env&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;UPDATE - only in the following article do I get a link to &lt;a href=&quot;https://nodejs.org/docs/latest/api/process.html#process_process_env&quot;&gt;process.env&lt;/a&gt; and learn that it’s a feature of Node.js.&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;In general, it is considered good practice to always &lt;a href=&quot;https://12factor.net/backing-services&quot;&gt;treat service dependencies as attached resources&lt;/a&gt;. Define these using your environment.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is the same &lt;a href=&quot;https://12factor.net/&quot;&gt;twelve factor app&lt;/a&gt; that S linked me to yesterday when I asked for advice.&lt;/p&gt;
&lt;p&gt;Not sure that’s helped me much, otherwise. Following up:&lt;/p&gt;
&lt;h3 id=&quot;reading-dotenv&quot;&gt;10:13 - reading &lt;a href=&quot;https://www.npmjs.com/package/dotenv&quot;&gt;dotenv&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://nodejs.org/api/process.html#process_process&quot;&gt;process&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;None of this is telling me what I need to know, which is how do I set variables for the data I need to use such that they can be compiled to valid variants in the build.&lt;/p&gt;
&lt;h3 id=&quot;reading-gtm-docs&quot;&gt;10:26 - reading &lt;a href=&quot;https://support.google.com/tagmanager/answer/6311518?hl=en&quot;&gt;GTM docs&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Detour into researching the possibility of having the work for this done at the other end of the process. Doesn’t look any easier than what I’m trying to do, I won’t learn as much, and creates dependencies on others, so I’ll keep looking for a downstream solution.&lt;/p&gt;
&lt;h3 id=&quot;reading-another-medium-article-on-env&quot;&gt;10:33 - reading &lt;a href=&quot;https://medium.com/@thejasonfile/using-dotenv-package-to-create-environment-variables-33da4ac4ea8f&quot;&gt;another medium article on env&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;OK.&lt;/p&gt;
&lt;p&gt;This is more like it.&lt;/p&gt;
&lt;h3 id=&quot;having-a-go&quot;&gt;10:40 - having a go&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;yarn add dotenv -D&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;first issue is the next step:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Next add the following line to your app.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;require(&#39;dotenv&#39;).config()&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;where tho? what is my app in this context?&lt;/p&gt;
&lt;p&gt;google… &lt;code&gt;where to add require(&#39;dotenv&#39;).config()&lt;/code&gt;  ?&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/facebook/create-react-app/issues/865&quot;&gt;This answer&lt;/a&gt; gives me the clue - &lt;code&gt;index.js&lt;/code&gt;. Do I have one of those for this static website? Yes.&lt;/p&gt;
&lt;p&gt;No. There are many &lt;code&gt;index.js&lt;/code&gt; files, but they’re all in &lt;code&gt;node_modules/post-css-do-something-or-other&lt;/code&gt; folders. Not what I want.&lt;/p&gt;
&lt;h3 id=&quot;reading-another-blog-post-again&quot;&gt;10:52 - reading &lt;a href=&quot;https://ypereirareis.github.io/blog/2015/10/13/gulp-gulpfile-environment-variable/&quot;&gt;another blog post&lt;/a&gt; again&lt;/h3&gt;
&lt;p&gt;Good job I have a can-do attitude and enjoy the zen of stuckness, right? Haha.&lt;/p&gt;
&lt;p&gt;Since I seem to be going round in circles.&lt;/p&gt;
&lt;h3 id=&quot;section&quot;&gt;11:05 - …&lt;/h3&gt;
&lt;p&gt;round and round in circles, getting nowhere&lt;/p&gt;
&lt;h3 id=&quot;watching-youtube&quot;&gt;11:06 - watching &lt;a href=&quot;https://www.youtube.com/watch?v=Y1kT3MrW4h0&quot;&gt;youtube&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;not much use&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=zDup0I2VGmk&quot;&gt;another&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;nope&lt;/p&gt;
&lt;h3 id=&quot;back-to-gulp-env&quot;&gt;11:25 - back to &lt;a href=&quot;https://www.npmjs.com/package/gulp-env&quot;&gt;gulp-env&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;round and round in circles&lt;/p&gt;
&lt;p&gt;looking at &lt;a href=&quot;https://www.npmjs.com/package/gulp-replace&quot;&gt;gulp-replace&lt;/a&gt; too. do I need to chain these things together?&lt;/p&gt;
&lt;p&gt;no idea. I don’t really know how gulp works, so reading the docs for these modules is not helping me much.&lt;/p&gt;
&lt;h1 id=&quot;conclusion&quot;&gt;conclusion&lt;/h1&gt;
&lt;p&gt;gave up on this, asked a E for help. after some brief discussion of options we each went to look again - they provided me some leads from the platform docs that I’d not considered.&lt;/p&gt;
&lt;p&gt;a dispiriting process. not the high quality breakthrough that Prisig suggested!&lt;/p&gt;
&lt;p&gt;I think, though, that so much of what I enjoy about my job is exactly this problem-solving in the face of stuckness. And the category of the stuckness is such that it can (usually) be addressed by a finite amount of desk-based research.&lt;/p&gt;
&lt;/div&gt;
&lt;/body&gt;

&lt;/html&gt;
</content><link rel='replies' type='application/atom+xml' href='https://markup-mitchell.blogspot.com/feeds/7422492863523080653/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://markup-mitchell.blogspot.com/2019/02/stuck.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/7422492863523080653'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/7422492863523080653'/><link rel='alternate' type='text/html' href='https://markup-mitchell.blogspot.com/2019/02/stuck.html' title='stuck'/><author><name>markup mitchell</name><uri>http://www.blogger.com/profile/04110229624586413585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5683362339713645548.post-4151118894083227873</id><published>2019-02-19T01:57:00.001-08:00</published><updated>2019-02-19T01:58:06.255-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="problem-solving"/><category scheme="http://www.blogger.com/atom/ns#" term="quality"/><category scheme="http://www.blogger.com/atom/ns#" term="quotes"/><category scheme="http://www.blogger.com/atom/ns#" term="stuck"/><category scheme="http://www.blogger.com/atom/ns#" term="stuckness"/><category scheme="http://www.blogger.com/atom/ns#" term="zen"/><title type='text'>stuckness</title><content type='html'>&lt;!DOCTYPE html&gt;
&lt;html&gt;

&lt;head&gt;
  &lt;meta charset=&quot;utf-8&quot;&gt;
  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
  &lt;title&gt;2019-02-19-notes&lt;/title&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;https://stackedit.io/style.css&quot; /&gt;
&lt;/head&gt;

&lt;body class=&quot;stackedit&quot;&gt;
  &lt;div class=&quot;stackedit__html&quot;&gt;&lt;blockquote&gt;
&lt;p&gt;“If your mind is truly, profoundly stuck, then you may be much better off than when it was loaded with ideas.&lt;/p&gt;
&lt;p&gt;The solution to the problem often at first seems unimportant or undesirable, but the state of stuckness allows it, in time, to assumes its true importance. It seemed small because our previous rigid evaluation which led to the stuckness made it small.&lt;/p&gt;
&lt;p&gt;But now consider the fact that no matter how hard you try to hang on to it, this stuckness is bound to disappear. Your mind will naturally and freely move toward a solution. Unless you are a real master at staying stuckk you can’t prevent this. The fear of stuckness is needless because the longer you stay stuck the more you see the Quality-reality that gets you unstuck every time.&lt;/p&gt;
&lt;p&gt;What’s &lt;em&gt;really&lt;/em&gt; been getting you stuck is the running from the stuckness through the cars of your train of knowledge looking for a solution that is out in front of the train.&lt;br&gt;
Stuckness shouldn’t be avoided. It’s the psychic predecessor of all real understanding.”&lt;/p&gt;
&lt;p&gt;― Robert M. Pirsig, &lt;a href=&quot;https://www.goodreads.com/work/quotes/175720&quot;&gt;Zen and the Art of Motorcycle Maintenance: An Inquiry Into Values&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;/body&gt;

&lt;/html&gt;
</content><link rel='replies' type='application/atom+xml' href='https://markup-mitchell.blogspot.com/feeds/4151118894083227873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://markup-mitchell.blogspot.com/2019/02/stuckness.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/4151118894083227873'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/4151118894083227873'/><link rel='alternate' type='text/html' href='https://markup-mitchell.blogspot.com/2019/02/stuckness.html' title='stuckness'/><author><name>markup mitchell</name><uri>http://www.blogger.com/profile/04110229624586413585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5683362339713645548.post-8933122863104561542</id><published>2019-02-19T01:43:00.001-08:00</published><updated>2019-02-19T01:44:49.746-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="env"/><category scheme="http://www.blogger.com/atom/ns#" term="success"/><category scheme="http://www.blogger.com/atom/ns#" term="UTM"/><category scheme="http://www.blogger.com/atom/ns#" term="work"/><title type='text'>UTM solution conclusion</title><content type='html'>&lt;!DOCTYPE html&gt;
&lt;html&gt;

&lt;head&gt;
  &lt;meta charset=&quot;utf-8&quot;&gt;
  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
  &lt;title&gt;2019-02-18-website-log-utm-conclusion&lt;/title&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;https://stackedit.io/style.css&quot; /&gt;
&lt;/head&gt;

&lt;body class=&quot;stackedit&quot;&gt;
  &lt;div class=&quot;stackedit__html&quot;&gt;&lt;p&gt;There were a few more things I needed to do before the &lt;a href=&quot;https://markup-mitchell.blogspot.com/2019/02/utm-solution.html&quot;&gt;UTM solution&lt;/a&gt; could be tested in the development instance.&lt;/p&gt;
&lt;p&gt;GTM codes needed to be swapped out so as to be unique to the environment. I think they live in 2 or three different places in the codebase.&lt;/p&gt;
&lt;p&gt;A new calendly endpoint was required for similar reasons. This is just the address passed as a &lt;code&gt;data-ref&lt;/code&gt; to the widget.&lt;/p&gt;
&lt;h3 id=&quot;results&quot;&gt;results&lt;/h3&gt;
&lt;p&gt;Insofar as this is a UAT stage for internal stakeholders, the solution was accepted. Everyone seems happy with the outcome and I’ve submitted the MR for review with my fingers crossed there’s nothing substantially problematic about it.&lt;/p&gt;
&lt;h3 id=&quot;follow-up-work&quot;&gt;follow-up work&lt;/h3&gt;
&lt;p&gt;What I’m keen to finish before I move onto something new is a method of switching out these codes and addresses and whatnot so that when I zip a branch for deployment to dev it will build with functioning connections.&lt;/p&gt;
&lt;p&gt;At the moment I’m assuming that this is best achieved with gulp, but it’s not something I’ve done before.&lt;/p&gt;
&lt;/div&gt;
&lt;/body&gt;

&lt;/html&gt;
</content><link rel='replies' type='application/atom+xml' href='https://markup-mitchell.blogspot.com/feeds/8933122863104561542/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://markup-mitchell.blogspot.com/2019/02/utm-solution_19.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/8933122863104561542'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/8933122863104561542'/><link rel='alternate' type='text/html' href='https://markup-mitchell.blogspot.com/2019/02/utm-solution_19.html' title='UTM solution conclusion'/><author><name>markup mitchell</name><uri>http://www.blogger.com/profile/04110229624586413585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5683362339713645548.post-1210106287460296235</id><published>2019-02-16T12:53:00.002-08:00</published><updated>2019-02-16T12:54:00.966-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="history"/><category scheme="http://www.blogger.com/atom/ns#" term="replacestate"/><category scheme="http://www.blogger.com/atom/ns#" term="sessionstorage"/><category scheme="http://www.blogger.com/atom/ns#" term="UTM"/><category scheme="http://www.blogger.com/atom/ns#" term="work"/><title type='text'>UTM solution</title><content type='html'>&lt;!DOCTYPE html&gt;
&lt;html&gt;

&lt;head&gt;
  &lt;meta charset=&quot;utf-8&quot;&gt;
  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
  &lt;title&gt;2019-02-15-website-log-UTM-again&lt;/title&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;https://stackedit.io/style.css&quot; /&gt;
&lt;/head&gt;

&lt;body class=&quot;stackedit&quot;&gt;
  &lt;div class=&quot;stackedit__html&quot;&gt;&lt;h2 id=&quot;utm-persistence&quot;&gt;UTM persistence&lt;/h2&gt;
&lt;p&gt;If the pop-up window approach isn’t going to work, what should we do?&lt;/p&gt;
&lt;p&gt;Well, first I had to fight my way through the thicket of what was being told to me through various channels and get an understanding of the problem sufficient to start looking for a solution.&lt;/p&gt;
&lt;h3 id=&quot;specific-problem&quot;&gt;specific problem&lt;/h3&gt;
&lt;p&gt;Ignoring all the additional explanations about what UTMs are and their role in digital campaign management, I wanted a minimally testable condition to aim for.&lt;/p&gt;
&lt;p&gt;I formulated this as:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The UTM is a suffix on the page URL. This suffix needs to persist from the landing page through to the book-a-demo page.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I finally got confirmation that it is believed that this will solve the problem. So I suppose that whatever else happens, this is my immediate goal.&lt;/p&gt;
&lt;h3 id=&quot;general-problem&quot;&gt;general problem&lt;/h3&gt;
&lt;p&gt;There’s a larger matter that it took me a while to disentangle from this, which is that we need a general way of accessing UTMs throughout the site.&lt;/p&gt;
&lt;p&gt;In the longer term, then, it looks as if I need to handle UTMs on landing and store them locally in session storage or something, from where they can be read (potentially) or, as in the case of calendly, re-affixed to the URL.&lt;/p&gt;
&lt;h3 id=&quot;log&quot;&gt;log&lt;/h3&gt;
&lt;p&gt;so, I’m reading around all over the place and there’s stuff about cross-domain tracking, setting it up in google tag manager, this that and the other thing and I figure I might as well just whack a js script into my local env and start hacking away.&lt;/p&gt;
&lt;p&gt;I could read about this stuff all day and get nowhere.&lt;/p&gt;
&lt;h4 id=&quot;section&quot;&gt;13:10&lt;/h4&gt;
&lt;p&gt;I’m ignoring all the code from &lt;a href=&quot;https://www.analyticsmania.com/post/transfer-utm-parameters-google-tag-manager/&quot;&gt;the page I’m following&lt;/a&gt; except testing to see if I can get the page url and apply the regex.&lt;/p&gt;
&lt;h4 id=&quot;section-1&quot;&gt;15:40&lt;/h4&gt;
&lt;p&gt;Not been keeping running notes… I only seem to do that if I’m stuck or not sure what I’m doing!&lt;/p&gt;
&lt;p&gt;I have written a short script to pass on the UTM if one exists:&lt;/p&gt;
&lt;pre class=&quot; language-js&quot;&gt;&lt;code class=&quot;prism  language-js&quot;&gt;&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;script&lt;span class=&quot;token operator&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; url &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; window&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;location&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;href&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  utmRegExp &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token regex&quot;&gt;/(\&amp;amp;|\?)utm_[A-Za-z]+=[A-Za-z0-9]+/gi&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; utm &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; url&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;match&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;utmRegExp&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;utm&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; utmString &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; utm&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; demoLinks &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; document&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;querySelectorAll&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;a[href=&#39;/book-a-demo&#39;]&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    demoLinks&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;link &lt;span class=&quot;token operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
      link&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;href&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token template-string&quot;&gt;&lt;span class=&quot;token string&quot;&gt;`/book-a-demo/&lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;utm&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;`&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;/&lt;/span&gt;script&lt;span class=&quot;token operator&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But this won’t persist the UTM if the user goes to, say &lt;code&gt;/product&lt;/code&gt; then back to &lt;code&gt;/home&lt;/code&gt; then to &lt;code&gt;/book-a-demo&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;I can extend the link amendment to all links… all appropriate links… somehow.&lt;/p&gt;
&lt;p&gt;But what I’m trying to do is save the UTM string as a &lt;a href=&quot;https://www.w3schools.com/js/js_cookies.asp&quot;&gt;cookie&lt;/a&gt; and then read it from the book-a-demo page and update the page internally.&lt;/p&gt;
&lt;h4 id=&quot;section-2&quot;&gt;20:52&lt;/h4&gt;
&lt;p&gt;Turns out cookies are fundamentally about passing information between client and server. I’ve ended up at &lt;code&gt;sessionStorage&lt;/code&gt; as follows:&lt;/p&gt;
&lt;pre class=&quot; language-js&quot;&gt;&lt;code class=&quot;prism  language-js&quot;&gt;&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;script&lt;span class=&quot;token operator&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; url &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; window&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;location&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;href&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
      utmRegExp &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token regex&quot;&gt;/(\&amp;amp;|\?)utm_[A-Za-z]+=[A-Za-z0-9]+/gi&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; utm &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; url&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;match&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;utmRegExp&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;utm&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; utmString &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; utm&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
        sessionStorage&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;setItem&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;utm&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; utmString&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;/&lt;/span&gt;script&lt;span class=&quot;token operator&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and then, on the demo page:&lt;/p&gt;
&lt;pre class=&quot; language-js&quot;&gt;&lt;code class=&quot;prism  language-js&quot;&gt;&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;script&lt;span class=&quot;token operator&quot;&gt;&amp;gt;&lt;/span&gt;
	&lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;sessionStorage&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;utm&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
	    &lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; pageUrl &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token template-string&quot;&gt;&lt;span class=&quot;token string&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;window&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;location&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;href&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;sessionStorage&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;utm&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;`&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    history&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;replaceState&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;book a demo&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; pageUrl&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;/&lt;/span&gt;script&lt;span class=&quot;token operator&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So maybe I’m being naive, but this solution feels pretty neat.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It only fires when UTMs are present&lt;/li&gt;
&lt;li&gt;it’s all client-side&lt;/li&gt;
&lt;li&gt;the urls are as clean as they can be&lt;/li&gt;
&lt;li&gt;no ugly document manips on all links page to page&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;narrative&quot;&gt;narrative&lt;/h3&gt;
&lt;p&gt;This post starts out very low-level about reducing the problem to the lowest level and looking for crude solutions and ends up all transcendental. This whole process is what keeps me interested in this career.&lt;/p&gt;
&lt;p&gt;Two days ago people started talking to me about UTMs and google analytics campaigns and I hadn’t a clue what they were talking about.&lt;/p&gt;
&lt;p&gt;Now - at least at face value - I’ve come up with a solution that’s pragmatic and effective. It feels totally hokey - wat, take the url and use a regex on it to grab UTMs, store them in &lt;code&gt;sessionStorage&lt;/code&gt; and read them to the URL on book-a-demo?&lt;/p&gt;
&lt;p&gt;But why not? It’s about 8 lines of code, it does what I’ve been asked to do… yeah. good plumbing!&lt;/p&gt;
&lt;p&gt;data plumber&lt;/p&gt;
&lt;p&gt;The catch-22 of it is that if it’s actually a good solution, how come it took me 2 days to come up with? 2 days to write 8 lines of code. A competent dev would’ve tossed that off in 20 minutes or so, right?&lt;/p&gt;
&lt;p&gt;Or do I go with the counter-narrative, the mystical zen-sounding agile thing about the value of code-not-written. how the &lt;strong&gt;real&lt;/strong&gt; work is understanding the problem. once you really understand the problem the solution is (comparatively) easy.&lt;/p&gt;
&lt;p&gt;And TBH I’m not ashamed of the time it took, and I what I like about these situations is that in retrospect I can say, Oh, and I learned about UTMs and their role in digital marketing campaigns, and I used javascript to do some basic parsing and found a practical use for writing to sessionStorage, and discovered and used the &lt;code&gt;history&lt;/code&gt; API.&lt;/p&gt;
&lt;h3 id=&quot;links&quot;&gt;links&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://www.optimizesmart.com/google-analytics-cookies-ultimate-guide/&quot;&gt;cookies&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/API/History_API&quot;&gt;manipulating browser history&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;https://gomakethings.com/how-to-update-a-url-without-reloading-the-page-using-vanilla-javascript/&quot;&gt;the post that led to to the &lt;code&gt;history&lt;/code&gt; api&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;https://www.w3schools.com/html/html5_webstorage.asp&quot;&gt;web (local and session) storage&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;https://www.analyticsmania.com/post/transfer-utm-parameters-google-tag-manager/&quot;&gt;the original article suggested to me for dealing with UTMs&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;https://penguinwp.com/common-utm-campaign-url-tracking-mistakes-to-avoid/&quot;&gt;utm mistakes (see using a shortener)&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/body&gt;

&lt;/html&gt;
</content><link rel='replies' type='application/atom+xml' href='https://markup-mitchell.blogspot.com/feeds/1210106287460296235/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://markup-mitchell.blogspot.com/2019/02/utm-solution.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/1210106287460296235'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/1210106287460296235'/><link rel='alternate' type='text/html' href='https://markup-mitchell.blogspot.com/2019/02/utm-solution.html' title='UTM solution'/><author><name>markup mitchell</name><uri>http://www.blogger.com/profile/04110229624586413585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5683362339713645548.post-8509207808750761698</id><published>2019-02-15T03:44:00.002-08:00</published><updated>2019-02-15T03:44:53.377-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="analytics"/><category scheme="http://www.blogger.com/atom/ns#" term="mixpanel"/><category scheme="http://www.blogger.com/atom/ns#" term="RTFM"/><category scheme="http://www.blogger.com/atom/ns#" term="tracking"/><category scheme="http://www.blogger.com/atom/ns#" term="UTM"/><category scheme="http://www.blogger.com/atom/ns#" term="website"/><category scheme="http://www.blogger.com/atom/ns#" term="work"/><title type='text'>UTMs</title><content type='html'>&lt;!DOCTYPE html&gt;
&lt;html&gt;

&lt;head&gt;
  &lt;meta charset=&quot;utf-8&quot;&gt;
  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
  &lt;title&gt;2019-02-13-website-log-UTM&lt;/title&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;https://stackedit.io/style.css&quot; /&gt;
&lt;/head&gt;

&lt;body class=&quot;stackedit&quot;&gt;
  &lt;div class=&quot;stackedit__html&quot;&gt;&lt;h2 id=&quot;then&quot;&gt;then&lt;/h2&gt;
&lt;p&gt;What I’ve not documented over the last few days:&lt;/p&gt;
&lt;h4 id=&quot;work&quot;&gt;work&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;interaction observer polyfill for lazy loading (safari)&lt;/li&gt;
&lt;li&gt;polyfill not working for IE (and IE being illegible)&lt;/li&gt;
&lt;li&gt;scrapping the whole week’s work&lt;/li&gt;
&lt;li&gt;git reconciliation hell&lt;/li&gt;
&lt;li&gt;ghost API, tag filtering&lt;/li&gt;
&lt;li&gt;styling tag links&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;personal&quot;&gt;personal&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;svg inside &lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt;s&lt;/li&gt;
&lt;li&gt;font despair&lt;/li&gt;
&lt;li&gt;problems finding paths to assets&lt;/li&gt;
&lt;li&gt;color ignorance&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;now&quot;&gt;now&lt;/h2&gt;
&lt;p&gt;Suddenly, again I’m being asked about a tracking thing that I have no experience of. people banging on to me about UTMs and pop-ups and stuff. wanting answers ASAP&lt;/p&gt;
&lt;h3 id=&quot;whats-a-utm&quot;&gt;&lt;a href=&quot;https://neilpatel.com/blog/the-ultimate-guide-to-using-utm-parameters/&quot;&gt;what’s a UTM?&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;UTM stands for Urchin Tracking Module. For realsies?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“UTM parameters are simply tags that you add to a URL. When someone clicks on a URL with UTM parameters, those tags are sent back to your Google Analytics for tracking.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&quot;conclusion&quot;&gt;conclusion&lt;/h2&gt;
&lt;p&gt;Basically I ignored all the UTM stuff. It’s just a clingy suffix to the URL that comes from somewhere else.&lt;/p&gt;
&lt;p&gt;For implementation purposes I&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;added script link to the default page template&lt;/li&gt;
&lt;li&gt;added css link to the default page template&lt;/li&gt;
&lt;li&gt;swapped every &lt;code&gt;.button-link&lt;/code&gt; for the supplied link, which has no &lt;code&gt;href&lt;/code&gt; but calls a function for the popup instead&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;complications&quot;&gt;complications&lt;/h3&gt;
&lt;p&gt;The existing event listeners called &lt;code&gt;mixpanel.track_links&lt;/code&gt; method on these. From reading &lt;a href=&quot;https://mixpanel.com/blog/2012/10/08/link-tracking-in-mixpanel/&quot;&gt;the docs&lt;/a&gt; (I love when this happens) I learned that &lt;code&gt;track_links&lt;/code&gt; expects a valid href and that if it doesn’t get a server response within 300ms it cancels the event.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;mixpanel.track&lt;/code&gt; is asynchronous, so the purpose of &lt;code&gt;track_links&lt;/code&gt; is to abstract away a callback to avoid a situation in which the new page resolves before the tracking event fires.&lt;/p&gt;
&lt;p&gt;Now that we’re calling a popup function we don’t need to worry about that, so I changed all those &lt;code&gt;track_links&lt;/code&gt; calls to just &lt;code&gt;track&lt;/code&gt;. This prevented the popup disappearing immediately after being opened.&lt;/p&gt;
&lt;h3 id=&quot;update&quot;&gt;UPDATE&lt;/h3&gt;
&lt;p&gt;The stakeholder wasn’t able to get data back from the service fast enough to confirm if the tracking worked (takes up to 24 hours).&lt;/p&gt;
&lt;p&gt;There was also an issue with the way the popup functioned on iOS - it couldn’t be scrolled down to where the ‘confirm’ button was.&lt;/p&gt;
&lt;p&gt;So the whole attempt was scrapped and I’ve been asked to look at an alternative approach.&lt;/p&gt;
&lt;p&gt;END&lt;/p&gt;
&lt;/div&gt;
&lt;/body&gt;

&lt;/html&gt;
</content><link rel='replies' type='application/atom+xml' href='https://markup-mitchell.blogspot.com/feeds/8509207808750761698/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://markup-mitchell.blogspot.com/2019/02/utms.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/8509207808750761698'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/8509207808750761698'/><link rel='alternate' type='text/html' href='https://markup-mitchell.blogspot.com/2019/02/utms.html' title='UTMs'/><author><name>markup mitchell</name><uri>http://www.blogger.com/profile/04110229624586413585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5683362339713645548.post-4931554065314509933</id><published>2019-02-13T01:43:00.002-08:00</published><updated>2019-02-13T01:43:48.194-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="gatsby"/><category scheme="http://www.blogger.com/atom/ns#" term="init"/><category scheme="http://www.blogger.com/atom/ns#" term="personal"/><category scheme="http://www.blogger.com/atom/ns#" term="side project"/><category scheme="http://www.blogger.com/atom/ns#" term="styled-components"/><category scheme="http://www.blogger.com/atom/ns#" term="tooling"/><title type='text'>back to basics</title><content type='html'>&lt;!DOCTYPE html&gt;
&lt;html&gt;

&lt;head&gt;
  &lt;meta charset=&quot;utf-8&quot;&gt;
  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
  &lt;title&gt;2091-02-09-back-to-basics&lt;/title&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;https://stackedit.io/style.css&quot; /&gt;
&lt;/head&gt;

&lt;body class=&quot;stackedit&quot;&gt;
  &lt;div class=&quot;stackedit__html&quot;&gt;&lt;p&gt;all my aspirations aside, I need to just work through some basic project setup and get my head around some fundamental parts of the tooling and build process.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;webpack&lt;/li&gt;
&lt;li&gt;babel&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;log&quot;&gt;log&lt;/h3&gt;
&lt;h4 id=&quot;source-map-error&quot;&gt;&lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Tools/Debugger/How_to/Use_a_source_map&quot;&gt;source-map&lt;/a&gt; error&lt;/h4&gt;
&lt;p&gt;Q: WTF&lt;br&gt;
A: failed to install the gatsby &lt;a href=&quot;https://www.gatsbyjs.org/packages/gatsby-plugin-styled-components/&quot;&gt;‘styled-components’ plugin&lt;/a&gt; alongside the dependency itself:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;npm install --save gatsby-plugin-styled-components styled-components babel-plugin-styled-components&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;NB - this does not solve the warning. current assumption is that it’s a firefox/&lt;a href=&quot;https://github.com/gatsbyjs/gatsby/issues/6278&quot;&gt;gatsby 2 bug&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;add-emmet-abbr&quot;&gt;add emmet abbr&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://stackoverflow.com/a/46854557&quot;&gt;good, but too long&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;CTRL+CMD+,&lt;/p&gt;
&lt;/div&gt;
&lt;/body&gt;

&lt;/html&gt;
</content><link rel='replies' type='application/atom+xml' href='https://markup-mitchell.blogspot.com/feeds/4931554065314509933/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://markup-mitchell.blogspot.com/2019/02/back-to-basics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/4931554065314509933'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/4931554065314509933'/><link rel='alternate' type='text/html' href='https://markup-mitchell.blogspot.com/2019/02/back-to-basics.html' title='back to basics'/><author><name>markup mitchell</name><uri>http://www.blogger.com/profile/04110229624586413585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5683362339713645548.post-152994602035468543</id><published>2019-02-07T09:54:00.002-08:00</published><updated>2019-02-07T09:54:49.429-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="docs"/><category scheme="http://www.blogger.com/atom/ns#" term="interesection observer"/><category scheme="http://www.blogger.com/atom/ns#" term="io"/><title type='text'>intersection observer</title><content type='html'>&lt;!DOCTYPE html&gt;
&lt;html&gt;

&lt;head&gt;
  &lt;meta charset=&quot;utf-8&quot;&gt;
  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
  &lt;title&gt;2019-02-01-intersection-observer&lt;/title&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;https://stackedit.io/style.css&quot; /&gt;
&lt;/head&gt;

&lt;body class=&quot;stackedit&quot;&gt;
  &lt;div class=&quot;stackedit__html&quot;&gt;&lt;p&gt;This took me way too long to figure out.&lt;/p&gt;
&lt;p&gt;but &lt;a href=&quot;https://codepen.io/spitchell/pen/ZwawOp?editors=0011&quot;&gt;i did it&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;where I went wrong was trying to make a simple case by making an Intersection Observer (IO) that only observes one explicit element.&lt;/p&gt;
&lt;p&gt;having played around with my working example (and breaking it repeatedly) I think the missing piece of the puzzle is that the callback function used in the IO always receives its arguments as an array, whether you pass it a single argument or not.&lt;/p&gt;
&lt;p&gt;[checks with devtools]&lt;/p&gt;
&lt;p&gt;yep. the element gets wrapped in an array of &lt;code&gt;IntersectionObserverEntry&lt;/code&gt; objects that track the relevant properties of the element.&lt;/p&gt;
&lt;p&gt;That’s fine, but it’s infuriating that when I’m reading the actual API it doesn’t have a couple of words explaining it. Maybe it’s “obvious” because of the way a general class of listeners work, or something, but it wasn’t obvious to me.&lt;/p&gt;
&lt;p&gt;[reads docs again with the benefit of hindsight]&lt;/p&gt;
&lt;p&gt;christ&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Whenever the target meets a threshold specified for the &lt;code&gt;IntersectionObserver&lt;/code&gt;, the callback is invoked. The callback receives a list of &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry&quot; title=&quot;The IntersectionObserverEntry interface of the Intersection Observer API describes the intersection between the target element and its root container at a specific moment of transition.&quot;&gt;&lt;code&gt;IntersectionObserverEntry&lt;/code&gt;&lt;/a&gt; objects and the observer:&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;No-one to blame but myself then. The takeaway must be READ THE DOCS BETTER&lt;/p&gt;
&lt;p&gt;​&lt;/p&gt;
&lt;/div&gt;
&lt;/body&gt;

&lt;/html&gt;
</content><link rel='replies' type='application/atom+xml' href='https://markup-mitchell.blogspot.com/feeds/152994602035468543/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://markup-mitchell.blogspot.com/2019/02/intersection-observer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/152994602035468543'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/152994602035468543'/><link rel='alternate' type='text/html' href='https://markup-mitchell.blogspot.com/2019/02/intersection-observer.html' title='intersection observer'/><author><name>markup mitchell</name><uri>http://www.blogger.com/profile/04110229624586413585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5683362339713645548.post-8293085546214085081</id><published>2019-02-07T09:25:00.002-08:00</published><updated>2019-02-07T09:25:08.791-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="defer"/><category scheme="http://www.blogger.com/atom/ns#" term="intersection observer"/><category scheme="http://www.blogger.com/atom/ns#" term="lazy loading"/><category scheme="http://www.blogger.com/atom/ns#" term="optimisation"/><category scheme="http://www.blogger.com/atom/ns#" term="work"/><title type='text'>2019-02-06-website-log-perf</title><content type='html'>&lt;!DOCTYPE html&gt;
&lt;html&gt;

&lt;head&gt;
  &lt;meta charset=&quot;utf-8&quot;&gt;
  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
  &lt;title&gt;2019-02-06-website-log-perf&lt;/title&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;https://stackedit.io/style.css&quot; /&gt;
&lt;/head&gt;

&lt;body class=&quot;stackedit&quot;&gt;
  &lt;div class=&quot;stackedit__html&quot;&gt;&lt;p&gt;trying to improve the lighthouse audits on the site. I never thought this could be interesting, and I’ve been quite frustrated about it over the last few days, but I have to grudgingly admit that there’s satisfaction to be had in watching all these marginal improvements add up to something significant.&lt;/p&gt;
&lt;h2 id=&quot;lazy-loading&quot;&gt;lazy loading&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://www.smashingmagazine.com/2018/01/deferring-lazy-loading-intersection-observer-api/#deconstructing-intersectionobserver&quot;&gt;smashing&lt;/a&gt; has this article, but I actually used &lt;a href=&quot;https://www.youtube.com/watch?v=aUjBvuUdkhg&quot;&gt;this youtube video&lt;/a&gt; for the &lt;a href=&quot;https://fireship.io/snippets/intersection-observer-lazy-load-images/&quot;&gt;intersection observer and lazy loading code&lt;/a&gt; and &lt;a href=&quot;https://www.youtube.com/watch?v=AMteSxT5uGM&quot;&gt;another one for the blur-in&lt;/a&gt; effect when the hi-res image is swapped in.&lt;/p&gt;
&lt;p&gt;So, if I’d known how easy this was I’d have done it earlier. I’ve even reduced the resolution of the initial image to 1px per cm, although when I throttle the connection to ‘slow 3G’ it feels like those images are too blurry and distorted. maybe an SVG approximation is an option.&lt;/p&gt;
&lt;h2 id=&quot;async-scripts&quot;&gt;async scripts&lt;/h2&gt;
&lt;p&gt;I tried moving scripts into &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; and adding the &lt;code&gt;async&lt;/code&gt; property, but this seemed to end up with a lot of them not loading.&lt;/p&gt;
&lt;p&gt;For the time-being I’ve put a few external libraries like jQuery and infinite-scroll.js into &lt;code&gt;&amp;lt;head &amp;gt;&lt;/code&gt; with the &lt;code&gt;defer&lt;/code&gt; property and that seems to work OK. there’s obviously more i need to understand before I can use async properly.&lt;/p&gt;
&lt;h2 id=&quot;fewer-css-files&quot;&gt;fewer css files&lt;/h2&gt;
&lt;p&gt;I merged a subset of the &lt;code&gt;ui-kit.min.css&lt;/code&gt; file into &lt;code&gt;styles.css&lt;/code&gt; to avoid multiple external stylesheets (following on from doing the same with &lt;code&gt;component.css&lt;/code&gt;. There’s a lot more that could be cut down from it, but I’m hoping to get rid of the last UIkit component soon, so it’s not good use of time to pick through it now.&lt;/p&gt;
&lt;h2 id=&quot;critical-css&quot;&gt;critical CSS&lt;/h2&gt;
&lt;h3 id=&quot;learns&quot;&gt;learns&lt;/h3&gt;
&lt;h4 id=&quot;read-the-documentation&quot;&gt;read the documentation&lt;/h4&gt;
&lt;p&gt;another RTFM moment when I look at docs for the &lt;code&gt;{{asset}}&lt;/code&gt; helper.&lt;/p&gt;
&lt;p&gt;WRONG:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;src=&quot;{{asset &#39;assets/js/jquery.min.js}}&quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;use it on external sources&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;RIGHT:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;src=&quot;{{asset &#39;js/jquery.min.js}}&quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;points to the &lt;code&gt;assets&lt;/code&gt; folder (duh)&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;selectors&quot;&gt;selectors&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;in CSS a white space between tags/identifies will select on &lt;strong&gt;all descendants&lt;/strong&gt;. I suppose I did know this in a functional way, but I’ve never actually formulated it as a rule before&lt;/li&gt;
&lt;li&gt;&lt;code&gt;:not()&lt;/code&gt; is a &lt;a href=&quot;https://www.w3.org/TR/CSS22/selector.html#selector-syntax&quot;&gt;simple selector&lt;/a&gt; and can’t take nested/relational arguments&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;random-thots&quot;&gt;random thots&lt;/h3&gt;
&lt;p&gt;what else could be done with intersection observers? it’s feels like a significant change in me that now when I learn about a web api I actually go and read &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API&quot;&gt;the api&lt;/a&gt; and absorb that, oh, it returns a boolean and so forth.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;svg animation triggers on some (late) intersection value.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/body&gt;

&lt;/html&gt;
</content><link rel='replies' type='application/atom+xml' href='https://markup-mitchell.blogspot.com/feeds/8293085546214085081/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://markup-mitchell.blogspot.com/2019/02/2019-02-06-website-log-perf.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/8293085546214085081'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/8293085546214085081'/><link rel='alternate' type='text/html' href='https://markup-mitchell.blogspot.com/2019/02/2019-02-06-website-log-perf.html' title='2019-02-06-website-log-perf'/><author><name>markup mitchell</name><uri>http://www.blogger.com/profile/04110229624586413585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5683362339713645548.post-1415206670746020110</id><published>2019-02-04T14:41:00.002-08:00</published><updated>2019-02-04T14:41:56.742-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="blogs"/><category scheme="http://www.blogger.com/atom/ns#" term="ghost"/><category scheme="http://www.blogger.com/atom/ns#" term="handlebars"/><category scheme="http://www.blogger.com/atom/ns#" term="work"/><title type='text'>2019-02-03-website-log-routes</title><content type='html'>&lt;!DOCTYPE html&gt;
&lt;html&gt;

&lt;head&gt;
  &lt;meta charset=&quot;utf-8&quot;&gt;
  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
  &lt;title&gt;2019-02-03-website-log-routes&lt;/title&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;https://stackedit.io/style.css&quot; /&gt;
&lt;/head&gt;

&lt;body class=&quot;stackedit&quot;&gt;
  &lt;div class=&quot;stackedit__html&quot;&gt;&lt;p&gt;I’ve following &lt;a href=&quot;https://docs.ghost.org/tutorials/custom-home-page/&quot;&gt;the instructions&lt;/a&gt; and edited the file names and so forth, and routing is working as hoped.&lt;/p&gt;
&lt;p&gt;Now I’m reading into &lt;a href=&quot;https://docs.ghost.org/tutorials/creating-content-collections/&quot;&gt;collections&lt;/a&gt; and… and… &lt;a href=&quot;https://docs.ghost.org/tutorials/building-a-content-hub/&quot;&gt;channels&lt;/a&gt; and as far as I can see the result only differs in that there’s a visible url path for one and not for another? I dunno.&lt;/p&gt;
&lt;p&gt;I’ve tried a few things, basically checking tags in the admin portal and following the instructions for &lt;code&gt;routes.yaml&lt;/code&gt; but it’s not working as I’d expected. I can get a list of blog posts, but no filtering seems to be happening,…&lt;/p&gt;
&lt;h3 id=&quot;next-day&quot;&gt;next day&lt;/h3&gt;
&lt;p&gt;I noticed there’s already a &lt;code&gt;tag.hbs&lt;/code&gt; file in the project, so I added that to &lt;code&gt;routes&lt;/code&gt; and now I can display a collection of tagged articles with the appropriate query like &lt;code&gt;/tag/yuread&lt;/code&gt; or &lt;code&gt;/tag/life%20insurance/&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;But these other things, collections, channels, content hubs, whatever, I’m not sure I’m getting that.&lt;/p&gt;
&lt;p&gt;…&lt;/p&gt;
&lt;p&gt;once I saw the above, I tried replacing the &lt;code&gt;yuniversity&lt;/code&gt; file I’d previously specified as a template in &lt;code&gt;routes.yaml&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/yuniversity/yuread/:
	controller: channel
	filter: tag:yuread
	template: tag
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;great. then realised that route can be whatever I want, so&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/yuread/:
	controller: channel
	filter: tag:yuread
	template: tag
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;okay. so what are &lt;strong&gt;collections&lt;/strong&gt; for?&lt;/p&gt;
&lt;h3 id=&quot;the-docs&quot;&gt;&lt;a href=&quot;https://docs.ghost.org/concepts/routing/#data&quot;&gt;the docs&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;they say:&lt;/p&gt;
&lt;h4 id=&quot;routes&quot;&gt;routes&lt;/h4&gt;
&lt;blockquote&gt;
&lt;p&gt;A route is a single URL that is assigned a specific template and/or set of data. Routes allow you to create custom content and templates such as a home page, an about page or a custom RSS feed.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.ghost.org/tutorials/custom-home-page/&quot;&gt;this tutorial&lt;/a&gt; relates to routes. the &lt;a href=&quot;https://docs.ghost.org/concepts/routing/#data&quot;&gt;data attribute&lt;/a&gt; looks relevant.&lt;/p&gt;
&lt;h4 id=&quot;collections&quot;&gt;collections&lt;/h4&gt;
&lt;blockquote&gt;
&lt;p&gt;Collections allow you to create groups of posts that match a filter, and &lt;strong&gt;alters the URL for all posts&lt;/strong&gt;. Each collection has an index URL where all posts in that collection are listed and paginated and posts can only belong to one collection.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;my emphasis - this seems to be the main difference&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Use a collection when you want to create distinct areas on your site, where posts belong explicitly to one group or another. If you’re building a content hub that does not affect the URL of posts, check out the  &lt;code&gt;controller: channel&lt;/code&gt;  &lt;a href=&quot;https://docs.ghost.org/concepts/routing/#controller-channels&quot;&gt;property&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I wonder if this has relevance to links that may be used elsewhere and are not obviously accessible from within the site.&lt;/p&gt;
&lt;p&gt;Also important: because the url is mutated, articles can &lt;strong&gt;only belong to one collection&lt;/strong&gt;&lt;/p&gt;
&lt;h4 id=&quot;taxonomies&quot;&gt;taxonomies&lt;/h4&gt;
&lt;blockquote&gt;
&lt;p&gt;Taxonomies are used to group posts based on a common relation. In Ghost, this is always the author of the post, or using tags.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Using taxonomies, Ghost will automatically generate URLs like  &lt;code&gt;/tag/getting-started/&lt;/code&gt;which will render a list of posts that have this tag. Posts can appear in multiple taxonomies and the URL of the post is not affected.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;hmmm. not sure we’ve any immediate call for this, and I’m not getting it working anyway. the author slug comes from the admin (individual) profile and in my case is just my first name. when used in the above way (&lt;code&gt;/author/mark&lt;/code&gt;) I get an empty template page back… maybe it’s falling back to &lt;code&gt;index&lt;/code&gt;?&lt;/p&gt;
&lt;p&gt;(don’t really care)&lt;/p&gt;
&lt;h3 id=&quot;conclusion&quot;&gt;conclusion&lt;/h3&gt;
&lt;p&gt;these distinctions still don’t mean a lot to me in the abstract. for myself, I wouldn’t care either way, but there may be use-cases I’m not aware of.&lt;/p&gt;
&lt;p&gt;I’ll wait and see what’s asked of me, esp in response to a naive implementation.&lt;/p&gt;
&lt;h2 id=&quot;next-issue&quot;&gt;next issue&lt;/h2&gt;
&lt;p&gt;the &lt;code&gt;tag&lt;/code&gt; template outputs &lt;code&gt;{{#tag}}&lt;/code&gt; information as a header using the (existing) &lt;code&gt;/tag/&lt;/code&gt; routing, but fails to do so when using the route I defined. why would that be?&lt;/p&gt;
&lt;pre class=&quot; language-html&quot;&gt;&lt;code class=&quot;prism  language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;section section-hero text-center&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;container&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
      &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;hero&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
        &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;h1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;yuread&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;h1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
            &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;p&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;A collection of 1 post&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;p&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
      &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;here’s what’s missing from &lt;code&gt;/yuread/&lt;/code&gt; that appears in &lt;code&gt;/tag/yuread&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;this suggests to me that the filter makes content available, but not the filter criteria? (or something).&lt;/p&gt;
&lt;p&gt;maybe adding a data link like &lt;code&gt;data.tag&lt;/code&gt; to the route is the answer?&lt;/p&gt;
&lt;/div&gt;
&lt;/body&gt;

&lt;/html&gt;
</content><link rel='replies' type='application/atom+xml' href='https://markup-mitchell.blogspot.com/feeds/1415206670746020110/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://markup-mitchell.blogspot.com/2019/02/2019-02-03-website-log-routes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/1415206670746020110'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/1415206670746020110'/><link rel='alternate' type='text/html' href='https://markup-mitchell.blogspot.com/2019/02/2019-02-03-website-log-routes.html' title='2019-02-03-website-log-routes'/><author><name>markup mitchell</name><uri>http://www.blogger.com/profile/04110229624586413585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5683362339713645548.post-7900704364594650436</id><published>2019-01-31T07:41:00.002-08:00</published><updated>2019-01-31T07:41:51.548-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="browser support"/><category scheme="http://www.blogger.com/atom/ns#" term="compatibility"/><category scheme="http://www.blogger.com/atom/ns#" term="IE11"/><category scheme="http://www.blogger.com/atom/ns#" term="work"/><title type='text'>2019-01-29-website-log</title><content type='html'>&lt;!DOCTYPE html&gt;
&lt;html&gt;

&lt;head&gt;
  &lt;meta charset=&quot;utf-8&quot;&gt;
  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
  &lt;title&gt;2019-01-29-website-log&lt;/title&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;https://stackedit.io/style.css&quot; /&gt;
&lt;/head&gt;

&lt;body class=&quot;stackedit&quot;&gt;
  &lt;div class=&quot;stackedit__html&quot;&gt;&lt;h2 id=&quot;more-compatibility-issues&quot;&gt;More compatibility issues&lt;/h2&gt;
&lt;p&gt;While dealing with the horrendous grid failure in the previous post, I also realised that the ‘jargon-buster’ wasn’t working.&lt;/p&gt;
&lt;p&gt;You can click the buttons but the articles don’t change. &lt;em&gt;sigh&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I was getting an error to do with jQuery not being available so I spent longer than I should have flipping the handler on the radio buttons to native js.&lt;/p&gt;
&lt;p&gt;Didn’t work.&lt;/p&gt;
&lt;h3 id=&quot;update&quot;&gt;UPDATE&lt;/h3&gt;
&lt;p&gt;I’ve replaced the whole radio-button based jargon buster with a column of &lt;code&gt;&amp;lt;section&amp;gt;&lt;/code&gt; tags, each of which displays the explanation of  a term from the list.&lt;/p&gt;
&lt;p&gt;This swaps in on the same grid-testing logic as the cost calculator.&lt;/p&gt;
&lt;p&gt;I left in the native JS replacement for jQuery. Just in case I ever need it again, here are the two side by side:&lt;/p&gt;
&lt;pre class=&quot; language-js&quot;&gt;&lt;code class=&quot;prism  language-js&quot;&gt;
&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; Divs &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; Array&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;document&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;querySelectorAll&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;.jargon-buster__display &amp;gt; div&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; TermList &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; Array&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;document&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;querySelectorAll&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;.jargon-buster__term-list input[type=&quot;radio&quot;]&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

TermList&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;term&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    term&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;change&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; selected &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token template-string&quot;&gt;&lt;span class=&quot;token string&quot;&gt;`#&lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;dataset&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;def&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;`&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

TermList&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;term&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; x &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token template-string&quot;&gt;&lt;span class=&quot;token string&quot;&gt;`#&lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;term&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;dataset&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;def&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;`&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
        document&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;x&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;style&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;display &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;none&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
        console&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;x&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
        document&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;selected&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;style&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;display &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;block&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
      &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot; language-js&quot;&gt;&lt;code class=&quot;prism  language-js&quot;&gt;
&lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; divs &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;.jargon-buster__display&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;div&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;token function&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;.jargon-buster__term-list input[type=&quot;radio&quot;]&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;change&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; id &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;def&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

divs&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;hide&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token comment&quot;&gt;// hide all&lt;/span&gt;

&lt;span class=&quot;token function&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;#&#39;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; id&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;show&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Annoyingly, the jQuery is more concise and readable.&lt;/p&gt;
&lt;/div&gt;
&lt;/body&gt;

&lt;/html&gt;
</content><link rel='replies' type='application/atom+xml' href='https://markup-mitchell.blogspot.com/feeds/7900704364594650436/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://markup-mitchell.blogspot.com/2019/01/2019-01-29-website-log.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/7900704364594650436'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/7900704364594650436'/><link rel='alternate' type='text/html' href='https://markup-mitchell.blogspot.com/2019/01/2019-01-29-website-log.html' title='2019-01-29-website-log'/><author><name>markup mitchell</name><uri>http://www.blogger.com/profile/04110229624586413585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5683362339713645548.post-509088390972722356</id><published>2019-01-29T02:07:00.001-08:00</published><updated>2019-01-29T02:08:08.978-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="feature detection"/><category scheme="http://www.blogger.com/atom/ns#" term="grid"/><category scheme="http://www.blogger.com/atom/ns#" term="IE"/><category scheme="http://www.blogger.com/atom/ns#" term="legacy"/><category scheme="http://www.blogger.com/atom/ns#" term="support"/><category scheme="http://www.blogger.com/atom/ns#" term="work"/><title type='text'>compatibility</title><content type='html'>&lt;!DOCTYPE html&gt;
&lt;html&gt;

&lt;head&gt;
  &lt;meta charset=&quot;utf-8&quot;&gt;
  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
  &lt;title&gt;2019-01-24-website-log&lt;/title&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;https://stackedit.io/style.css&quot; /&gt;
&lt;/head&gt;

&lt;body class=&quot;stackedit&quot;&gt;
  &lt;div class=&quot;stackedit__html&quot;&gt;&lt;p&gt;Wow.&lt;/p&gt;
&lt;p&gt;I’ve spent most of the week trying to set up a usable way to access IE 11 on my mac, since I’m supposed to be making &lt;a href=&quot;https://markup-mitchell.blogspot.com/2018/11/2018-11-19-website-log-negotiation.html&quot;&gt;a particular component&lt;/a&gt; minimally legible on that browser.&lt;/p&gt;
&lt;p&gt;I’m not surprised in the slightest that it’s broken; no consideration was given to IE as it was explicitly out of scope for the work at hand.&lt;/p&gt;
&lt;p&gt;I’ll get onto the task itself in a moment, but right now I just want to capture the basic conclusion of my trying to get IE set up.&lt;/p&gt;
&lt;h2 id=&quot;accessing-ie-on-mac&quot;&gt;Accessing IE on mac&lt;/h2&gt;
&lt;p&gt;I tried VirtualBox running windows images from &lt;a href=&quot;http://modern.ie&quot;&gt;modern.ie&lt;/a&gt; but (long story short) it was unusably slow, not to mention the process of setting up the virtual windows account was absolutely horrendous. I could write an essay on the the UX nightmare of the birthdate picker alone.&lt;/p&gt;
&lt;p&gt;So in the end I got Parallels desktop working, and it seems fine.&lt;/p&gt;
&lt;h3 id=&quot;takeaways&quot;&gt;takeaways&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;use the 32 bit image for VMs, you idiot&lt;/li&gt;
&lt;li&gt;virtual machines take up LOTS of space to download and run. make sure you have dozens of gigs of hard drive free&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://gist.github.com/ernsheong/23c00e65219b10db7bc072772ea509d4&quot;&gt;this gist&lt;/a&gt; held the key to solving things in the end. update the &lt;code&gt;config.development.json&lt;/code&gt; to use &lt;code&gt;0.0.0.0&lt;/code&gt; as the host.&lt;/li&gt;
&lt;li&gt;access localhost at &lt;code&gt;http://[local ip]:[local port]&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;ie-compatibility&quot;&gt;IE compatibility&lt;/h2&gt;
&lt;p&gt;Currently the page looks like this:&lt;br&gt;
&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcfY_4h3Q49A3qw-0t_btt221bGKWdKpHHsKAFNZ6c_DtKBJi61_VTvsQ-ZR72Cb3BVwEg7taPBAP0MGPipGv7wZgeCyIF70Woy5HcXWeORX8qFCBq0Cs8NBU_LZ-_k6JeSf7Ep1YQxmkZ/&quot; alt=&quot;enter image description here&quot;&gt;&lt;br&gt;
So, not good.&lt;/p&gt;
&lt;h3 id=&quot;options&quot;&gt;options&lt;/h3&gt;
&lt;h4 id=&quot;do-nothing&quot;&gt;do nothing&lt;/h4&gt;
&lt;p&gt;I love me an option 0.&lt;/p&gt;
&lt;p&gt;TBH, we &lt;strong&gt;could&lt;/strong&gt; do nothing and it’d probably be fine. There’s a new design for the product cards in the works and I could just make sure that works on IE11 from the off.&lt;/p&gt;
&lt;p&gt;If I don’t get this done quick enough we’ll end up with this option, or a combination of this and the swap out option (swapping out for the new component).&lt;/p&gt;
&lt;h4 id=&quot;fallbacks&quot;&gt;fallbacks&lt;/h4&gt;
&lt;p&gt;My colleague E pointed me towards &lt;code&gt;-ms-grid&lt;/code&gt; and &lt;code&gt;-ms-flexbox&lt;/code&gt;, suggesting that a more basic version of the grid could be made, but&lt;/p&gt;
&lt;p&gt;a) I’ve poked about with that and it looks like I’d have to spend too long learning about those to do even the simple bits at any speed&lt;/p&gt;
&lt;p&gt;b) I don’t think the underlying structure of the component can be addressed with those methods, so I don’t think it can - ultimately - be done. or rather, I don’t think it’s anywhere near worth doing&lt;/p&gt;
&lt;h4 id=&quot;swap-out&quot;&gt;swap out&lt;/h4&gt;
&lt;p&gt;my second thought was to detect if IE is in use and swap out the whole component for a simple table or something. scratching the surface of that plan shows me that there’s lots of ways to achieve it, so that’s when I started this log entry.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://api.jquery.com/jQuery.browser/&quot;&gt;jquery.browser&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Conditional_comment&quot;&gt;conditional comments&lt;/a&gt; looked promising, but &lt;a href=&quot;https://technet.microsoft.com/en-us/windows/hh801214(v=vs.60)&quot;&gt;support ended ages ago&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;looking around for an alternative, &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Feature_detection&quot;&gt;feature detection&lt;/a&gt; looks promising, and this article is from 2018&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;feature-detection&quot;&gt;feature detection&lt;/h2&gt;
&lt;p&gt;If I can learn something useful this week it might not be quite the write-off I currently feel it to be.&lt;/p&gt;
&lt;p&gt;As the &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Feature_detection&quot;&gt;MDN article&lt;/a&gt; explains, &lt;code&gt;@supports&lt;/code&gt; rules look very neat, but (oh the irony) are not supported in any version of IE (:facepalm:)&lt;/p&gt;
&lt;p&gt;So I might have a play around with the js method and see if I can use it without too much overhead.&lt;/p&gt;
&lt;p&gt;From what I’ve read so far I’m probably better just adding conditional &lt;code&gt;display: none;&lt;/code&gt; rules on two separate wrappers rather than even trying to re-style the structure of the existing component.&lt;/p&gt;
&lt;h2 id=&quot;conclusion&quot;&gt;conclusion&lt;/h2&gt;
&lt;p&gt;… so that’s what I did in the end.&lt;/p&gt;
&lt;p&gt;The block looks like this (I’m including the handlebars helpers to reinforce the context):&lt;/p&gt;
&lt;pre class=&quot; language-js&quot;&gt;&lt;code class=&quot;prism  language-js&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;#contentFor &lt;span class=&quot;token string&quot;&gt;&quot;scripts&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;script&lt;span class=&quot;token operator&quot;&gt;&amp;gt;&lt;/span&gt;
	&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; CostCalcGrid &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; document&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;.cost-calc__grid&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; ProductTable &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; document&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;.product-table&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; testElem &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; document&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;createElement&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;div&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	
	&lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;testElem&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;style&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;grid &lt;span class=&quot;token operator&quot;&gt;===&lt;/span&gt; undefined&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
		  CostCalcGrid&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;style&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;display &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;none&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
		  ProductTable&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;style&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;display &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;block&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;/&lt;/span&gt;script&lt;span class=&quot;token operator&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;/&lt;/span&gt;contentFor&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The logic is pretty clear, but just to be explicit: an empty div is created and tested for the grid property (&lt;code&gt;testElem.style.grid&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;A browser that supports the grid property will evaluate this expression as &lt;code&gt;false&lt;/code&gt; since there is no grid property present. The page will take no action on this and the default display properties of the cost-calc grid and product table components will remain &lt;code&gt;grid&lt;/code&gt; and &lt;code&gt;none&lt;/code&gt; respectively.&lt;/p&gt;
&lt;p&gt;A browser that &lt;strong&gt;does not&lt;/strong&gt; support grid will evaluate the expression as &lt;code&gt;undefined&lt;/code&gt;, in which case the display attributes are modified to show the table and hide the grid.&lt;/p&gt;
&lt;p&gt;This means it’s not an IE specific solution - it will work on any browser that doesn’t support grid. I like that.&lt;/p&gt;
&lt;/div&gt;
&lt;/body&gt;

&lt;/html&gt;
</content><link rel='replies' type='application/atom+xml' href='https://markup-mitchell.blogspot.com/feeds/509088390972722356/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://markup-mitchell.blogspot.com/2019/01/compatibility.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/509088390972722356'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/509088390972722356'/><link rel='alternate' type='text/html' href='https://markup-mitchell.blogspot.com/2019/01/compatibility.html' title='compatibility'/><author><name>markup mitchell</name><uri>http://www.blogger.com/profile/04110229624586413585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcfY_4h3Q49A3qw-0t_btt221bGKWdKpHHsKAFNZ6c_DtKBJi61_VTvsQ-ZR72Cb3BVwEg7taPBAP0MGPipGv7wZgeCyIF70Woy5HcXWeORX8qFCBq0Cs8NBU_LZ-_k6JeSf7Ep1YQxmkZ/s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5683362339713645548.post-3314919036829839878</id><published>2019-01-27T09:16:00.002-08:00</published><updated>2019-01-27T09:16:46.271-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bash"/><category scheme="http://www.blogger.com/atom/ns#" term="docs"/><category scheme="http://www.blogger.com/atom/ns#" term="documentation"/><category scheme="http://www.blogger.com/atom/ns#" term="work"/><title type='text'>2019-01-25-website-log-docs</title><content type='html'>&lt;!DOCTYPE html&gt;
&lt;html&gt;

&lt;head&gt;
  &lt;meta charset=&quot;utf-8&quot;&gt;
  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
  &lt;title&gt;2019-01-25-website-log-docs&lt;/title&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;https://stackedit.io/style.css&quot; /&gt;
&lt;/head&gt;

&lt;body class=&quot;stackedit&quot;&gt;
  &lt;div class=&quot;stackedit__html&quot;&gt;&lt;p&gt;Updating the README for the website project repo.&lt;/p&gt;
&lt;p&gt;Man, documentation is hard.&lt;/p&gt;
&lt;p&gt;It’s such an erratic, hacky kind of dev environment as well, with all kinds of quirks.&lt;/p&gt;
&lt;p&gt;Is it best to list the setup steps in a way that optimises them for speed and convenience? Or in conceptual chunks that sheds light on the workflow?&lt;/p&gt;
&lt;p&gt;Even then, the choice is between some annoying to-and-fro and &lt;strong&gt;lots&lt;/strong&gt; of annoying to and fro.&lt;/p&gt;
&lt;p&gt;It crossed my mind to write highly imperative steps telling the user to open two terminal windows and leave them open in their respective locations for ease of switching, but that’s just too much.&lt;/p&gt;
&lt;p&gt;In the end I wrote a bash script that takes at least some of the hassle out of it. And then I start thinking “how much error-detection do I have to include in this? under what circumstances will this break for people?” (hint: millions).&lt;/p&gt;
&lt;p&gt;Anyway, it’s up and running and seems to do a pretty decent job of configuring the folder structure.&lt;/p&gt;
&lt;h3 id=&quot;learns&quot;&gt;learns&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;mkdir -m 777 [-p] [path to directory]&lt;/code&gt; to create with permissions&lt;/li&gt;
&lt;li&gt;&lt;code&gt;(cd ../[new directory])&lt;/code&gt; the parentheses spawn a new sub-shell process that can navigate into the new directory to execute commands there&lt;/li&gt;
&lt;li&gt;&lt;code&gt;.&lt;/code&gt; as the source was copying dotfiles (&lt;code&gt;.git&lt;/code&gt; files were causing the permissions issues when they tried to overwrite. changing &lt;code&gt;.&lt;/code&gt; to &lt;code&gt;./*&lt;/code&gt; &lt;a href=&quot;https://stackoverflow.com/a/11557164&quot;&gt;ignores dotfiles at the top level only&lt;/a&gt; when the &lt;code&gt;-R&lt;/code&gt; recursive flag is set)&lt;/li&gt;
&lt;li&gt;setting the &lt;code&gt;cp -R ./* ../ghost-local&lt;/code&gt; to yarn script &lt;code&gt;build&lt;/code&gt; in &lt;code&gt;package.json&lt;/code&gt; sort of normalizes the dev experience in this project. it’s almost like an API, isn’t it?&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/body&gt;

&lt;/html&gt;
</content><link rel='replies' type='application/atom+xml' href='https://markup-mitchell.blogspot.com/feeds/3314919036829839878/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://markup-mitchell.blogspot.com/2019/01/2019-01-25-website-log-docs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/3314919036829839878'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/3314919036829839878'/><link rel='alternate' type='text/html' href='https://markup-mitchell.blogspot.com/2019/01/2019-01-25-website-log-docs.html' title='2019-01-25-website-log-docs'/><author><name>markup mitchell</name><uri>http://www.blogger.com/profile/04110229624586413585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5683362339713645548.post-8815311666768760711</id><published>2019-01-17T03:19:00.002-08:00</published><updated>2019-01-17T03:19:42.240-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="handlebars"/><category scheme="http://www.blogger.com/atom/ns#" term="process"/><category scheme="http://www.blogger.com/atom/ns#" term="sucess"/><category scheme="http://www.blogger.com/atom/ns#" term="troubleshooting"/><category scheme="http://www.blogger.com/atom/ns#" term="website"/><category scheme="http://www.blogger.com/atom/ns#" term="work"/><title type='text'>form not firing</title><content type='html'>&lt;!DOCTYPE html&gt;
&lt;html&gt;

&lt;head&gt;
  &lt;meta charset=&quot;utf-8&quot;&gt;
  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
  &lt;title&gt;2019-01-17-website-log&lt;/title&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;https://stackedit.io/style.css&quot; /&gt;
&lt;/head&gt;

&lt;body class=&quot;stackedit&quot;&gt;
  &lt;div class=&quot;stackedit__html&quot;&gt;&lt;p&gt;I’ve not been keeping up my log! bad dev!&lt;/p&gt;
&lt;p&gt;here’s a quick list of topics to help give me a nudge in remembering later:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;ghost 2.0 upgrade&lt;/li&gt;
&lt;li&gt;processing&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;huh. that might be about it! no wonder I’ve not been posting.&lt;/p&gt;
&lt;h3 id=&quot;todays-problem&quot;&gt;today’s problem&lt;/h3&gt;
&lt;p&gt;My current problem that I need to work through is that a form in the homepage is not behaving as it ought. There’s no confirmation message on submit; the page returns to the top and no subscription is received via hubspot, (the API it’s hitting to trigger the email newsletter).&lt;/p&gt;
&lt;p&gt;thoughts&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;jQuery is not loading&lt;/li&gt;
&lt;li&gt;jQuery CDN has changed&lt;/li&gt;
&lt;li&gt;I’ve messed some code up somewhere&lt;/li&gt;
&lt;li&gt;the upgrade has changed something&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The last confirmed usage was on 9th Jan. A new version went live on Jan 10th, but I’ve checked the commit history and I can’t see how any of the changes might have caused this issue.&lt;/p&gt;
&lt;p&gt;So maybe it was a subsequent release and we just didn’t have anyone trying it in the intervening time?&lt;/p&gt;
&lt;p&gt;A modified version of the html component and script is working on another page, and when I investigated that I discovered it’s not even in the codebase. The html is embedded in the content and the script is injected through the admin portal.&lt;/p&gt;
&lt;p&gt;the handler function is &lt;strong&gt;identical&lt;/strong&gt;… so now I’m thinking this has something to do with the way the page is being built with handlebars. Maybe the script isn’t getting connected up, or there’s an id conflict or something?&lt;/p&gt;
&lt;p&gt;…&lt;/p&gt;
&lt;p&gt;OHO!&lt;/p&gt;
&lt;p&gt;could this be the culprit?&lt;/p&gt;
&lt;pre class=&quot; language-js&quot;&gt;&lt;code class=&quot;prism  language-js&quot;&gt;&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;script  src&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;{{asset &quot;&lt;/span&gt;js&lt;span class=&quot;token operator&quot;&gt;/&lt;/span&gt;footer&lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;scripts&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;min&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;js&lt;span class=&quot;token string&quot;&gt;&quot;}}&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;/&lt;/span&gt;script&lt;span class=&quot;token operator&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Those &lt;code&gt;&quot;&lt;/code&gt;&#39;s aren’t parsing that helper call properly.&lt;/p&gt;
&lt;p&gt;…&lt;/p&gt;
&lt;p&gt;dang. line history doesn’t indicate changes in the right timeframe, and amending it doesn’t fix the problem.&lt;/p&gt;
&lt;p&gt;So let’s compare the code from the form that works vs the one that doesn’t:&lt;/p&gt;
&lt;p&gt;HTML - broken&lt;/p&gt;
&lt;pre class=&quot; language-html&quot;&gt;&lt;code class=&quot;prism  language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;section section-less-padding text-center section-yuread&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;container&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;card&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
      &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;h2&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;ready for a happier, healthier team?&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;h2&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
      &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;p&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;Enter your details and we’ll drop our latest yuread straight to your inbox, together with updates on our products.&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;p&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
      &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;form&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;yuread&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;cta&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
          &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;input&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;email&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;get-started-email&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;placeholder&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;name@company.com&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;
          &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;button&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;get your copy&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;button&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
      &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;form&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
      &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;p&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;message&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;p&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;HTML - working&lt;/p&gt;
&lt;pre class=&quot; language-html&quot;&gt;&lt;code class=&quot;prism  language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;section section-less-padding section-less-padding-top text-center section-yuread&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;container&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;card&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
      &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;h2&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;Download the long read here&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;h2&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
      &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;p&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;Enter your details and we’ll drop our latest yuread straight to your inbox, together with updates on our products.&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;p&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
      &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;form&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;yuread&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;cta&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
          &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;input&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;email&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;get-started-email&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;placeholder&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;name@company.com&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;
           &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;input&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;hidden&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;client-name&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;
          &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;button&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;get your copy&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;button&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
      &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;form&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
      &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;p&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;message&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;p&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;conclusion&quot;&gt;conclusion&lt;/h4&gt;
&lt;p&gt;the HTML is (functionally) identical.&lt;/p&gt;
&lt;h4 id=&quot;js-script-tags&quot;&gt;JS script tags&lt;/h4&gt;
&lt;p&gt;JS - broken&lt;/p&gt;
&lt;pre class=&quot; language-js&quot;&gt;&lt;code class=&quot;prism  language-js&quot;&gt;&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;script&lt;span class=&quot;token operator&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;token function&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;#yuread&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;on&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;submit&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; handleYureadFormSubmit&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;/&lt;/span&gt;script&lt;span class=&quot;token operator&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;JS - working&lt;/p&gt;
&lt;pre class=&quot; language-js&quot;&gt;&lt;code class=&quot;prism  language-js&quot;&gt;&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;script type&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;text/javascript&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;&amp;gt;&lt;/span&gt;
document&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;#yuread&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;submit&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; handleYureadFormSubmit&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;/&lt;/span&gt;script&lt;span class=&quot;token operator&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;OHO! The non-working form tries to use jQuery (a suspect in my inquiries).&lt;/p&gt;
&lt;p&gt;Let’s just sack off that jQuery bullshit and replace it with another native eventListener.&lt;/p&gt;
&lt;p&gt;…&lt;/p&gt;
&lt;p&gt;DAMMIT&lt;/p&gt;
&lt;p&gt;No dice.&lt;/p&gt;
&lt;p&gt;And actually, I shouldn’t be surprised because the form that works in the footer also used the jQuery syntax, so…&lt;/p&gt;
&lt;p&gt;bleh.&lt;/p&gt;
&lt;h3 id=&quot;next-attempt&quot;&gt;next attempt&lt;/h3&gt;
&lt;p&gt;This feels a like slightly desperate trial and error, but I’m going to take the &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tags out of the partial and whack &#39;em right into the default page that wraps all content.&lt;/p&gt;
&lt;h4 id=&quot;result&quot;&gt;result&lt;/h4&gt;
&lt;p&gt;OK, that’s got it. Hmmmmmmmmmmmmmmm.&lt;/p&gt;
&lt;p&gt;I don’t know why that happened. It was working previously. It’s not to do with jQuery loading because it was demonstrably available for other interactions.&lt;/p&gt;
&lt;p&gt;I can only think that the problem lay between the &lt;code&gt;{{#contentFor &quot;scripts&quot;}}&lt;/code&gt; helper input and &lt;code&gt;{{{block &quot;scripts&quot;}}}&lt;/code&gt; block somehow in compilation. Which isn’t a great conclusion to reach, because if that’s the case I can expect to see bugs in the same class pop up elsewhere in the site.&lt;/p&gt;
&lt;p&gt;Well, forewarned is forearmed, I guess.&lt;/p&gt;
&lt;/div&gt;
&lt;/body&gt;

&lt;/html&gt;
</content><link rel='replies' type='application/atom+xml' href='https://markup-mitchell.blogspot.com/feeds/8815311666768760711/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://markup-mitchell.blogspot.com/2019/01/form-not-firing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/8815311666768760711'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/8815311666768760711'/><link rel='alternate' type='text/html' href='https://markup-mitchell.blogspot.com/2019/01/form-not-firing.html' title='form not firing'/><author><name>markup mitchell</name><uri>http://www.blogger.com/profile/04110229624586413585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5683362339713645548.post-2112652550057262573</id><published>2019-01-17T02:28:00.004-08:00</published><updated>2019-01-17T02:28:51.350-08:00</updated><title type='text'>neural networks, scrimba, hidden layers</title><content type='html'>&lt;!DOCTYPE html&gt;
&lt;html&gt;

&lt;head&gt;
  &lt;meta charset=&quot;utf-8&quot;&gt;
  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
  &lt;title&gt;2019-01-14-scrimba-neural-networks&lt;/title&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;https://stackedit.io/style.css&quot; /&gt;
&lt;/head&gt;

&lt;body class=&quot;stackedit&quot;&gt;
  &lt;div class=&quot;stackedit__html&quot;&gt;&lt;p&gt;All these ideas I have about what-to-do-next and I can’t decide where to direct my energies.&lt;/p&gt;
&lt;p&gt;Python seems easy and unimportant and boring enough that I’m happy to defer it. Plus I can use it in my processing experiments, so I have a toofer there.&lt;/p&gt;
&lt;p&gt;I looked at svelte.js this morning, but it didn’t really grab me for whatever reason. I feel like I maybe need a external goal associated with that.&lt;/p&gt;
&lt;p&gt;Anyways, what I’m trying now is &lt;a href=&quot;https://scrimba.com/g/gneuralnetworks&quot;&gt;this scrimba course&lt;/a&gt; on neural networks. I’ve no massive expectations on myself, and I might crash out of it pretty fast, but let’s see what happens.&lt;/p&gt;
&lt;p&gt;It’s new and different enough that I at least feel I might be able to get excited!&lt;/p&gt;
&lt;h3 id=&quot;initial-thoughts&quot;&gt;initial thoughts&lt;/h3&gt;
&lt;p&gt;The platform seems cool! the ‘IDE’ in which the instructor’s code goes during the lecture can be edited and used as a scratch editor in the browser to do the challenges.&lt;/p&gt;
&lt;p&gt;I incidentally learned to convert &lt;code&gt;1&lt;/code&gt; and &lt;code&gt;0&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; and &lt;code&gt;false&lt;/code&gt; just by adding &lt;code&gt;!!&lt;/code&gt; at the start of the expression. I’ve seen that before, but I think I’ll remember it this time.&lt;/p&gt;
&lt;p&gt;The reason is that neural networks (I’m told) output rational numbers between 0 and 1, so I’m &lt;code&gt;Math.round&lt;/code&gt;ing the return value and then turning it into a boolean to give the correct output from the XOR function.&lt;/p&gt;
&lt;pre class=&quot; language-js&quot;&gt;&lt;code class=&quot;prism  language-js&quot;&gt;&lt;span class=&quot;token comment&quot;&gt;// input 0 0, output 0&lt;/span&gt;
&lt;span class=&quot;token comment&quot;&gt;// input 0 1, output 1&lt;/span&gt;
&lt;span class=&quot;token comment&quot;&gt;// input 1 0, output 1&lt;/span&gt;
&lt;span class=&quot;token comment&quot;&gt;// input 1 1, output 0&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; net &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;brain&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;NeuralNetwork&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; hiddenLayers&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; trainingData &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; input&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; output&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; input&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; output&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; input&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; output&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; input&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; output&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

net&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;train&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;trainingData&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

console&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token template-string&quot;&gt;&lt;span class=&quot;token string&quot;&gt;`XOR? &lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;!&lt;/span&gt;Math&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;net&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;`&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
console&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token template-string&quot;&gt;&lt;span class=&quot;token string&quot;&gt;`XOR? &lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;!&lt;/span&gt;Math&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;net&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;`&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
console&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token template-string&quot;&gt;&lt;span class=&quot;token string&quot;&gt;`XOR? &lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;!&lt;/span&gt;Math&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;net&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;`&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
console&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token template-string&quot;&gt;&lt;span class=&quot;token string&quot;&gt;`XOR? &lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;!&lt;/span&gt;Math&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;net&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;`&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;ongoing-notes&quot;&gt;ongoing notes&lt;/h3&gt;
&lt;p&gt;Forward and back propagation explained as throwing a ball at a target:&lt;/p&gt;
&lt;h4 id=&quot;propagation&quot;&gt;propagation&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Predictions&lt;/strong&gt; are &lt;em&gt;&lt;strong&gt;forward propagation&lt;/strong&gt;&lt;/em&gt;; estimates about how hard to throw the ball, aiming information.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Measurement&lt;/strong&gt; and &lt;strong&gt;learning&lt;/strong&gt; is &lt;em&gt;&lt;strong&gt;back propagation&lt;/strong&gt;&lt;/em&gt;; how far &lt;em&gt;did&lt;/em&gt; the ball go? next time throw harder/softer, more left/right etc.&lt;/p&gt;
&lt;h4 id=&quot;training&quot;&gt;training&lt;/h4&gt;
&lt;p&gt;The training period starts with &lt;strong&gt;random values&lt;/strong&gt; - this is mathematically proven to be a valuable way to begin.&lt;/p&gt;
&lt;h4 id=&quot;activation-function&quot;&gt;activation function&lt;/h4&gt;
&lt;p&gt;The &lt;a href=&quot;https://en.wikipedia.org/wiki/Activation_function&quot;&gt;activation function&lt;/a&gt; is the function that determines the return value - the output - when a node is fired.&lt;/p&gt;
&lt;p&gt;The example here is “&lt;a href=&quot;https://en.wikipedia.org/wiki/Rectifier_(neural_networks)&quot;&gt;relu&lt;/a&gt;” (and I can already feel myself getting lost among maths concepts I don’t understand), and there are links to the actual code of brain.js &lt;a href=&quot;https://github.com/BrainJS/brain.js/blob/9595fe1d0069939ba271b25c1e7db785edd11936/src/neural-network.js#L227&quot;&gt;here&lt;/a&gt; and, further in the same file &lt;a href=&quot;https://github.com/BrainJS/brain.js/blob/9595fe1d0069939ba271b25c1e7db785edd11936/src/neural-network.js#L527&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The function in the exercise is given as:&lt;/p&gt;
&lt;pre class=&quot; language-js&quot;&gt;&lt;code class=&quot;prism  language-js&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;relu&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;value&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; value &lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; value&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;hidden-layers&quot;&gt;hidden layers&lt;/h4&gt;
&lt;p&gt;OK, it didn’t take long for me to reach the point where I totally don’t understand what’s happening.&lt;/p&gt;
&lt;p&gt;In &lt;a href=&quot;https://scrimba.com/p/pVZJQfg/cagZeTW&quot;&gt;this video&lt;/a&gt; the tutor talks about hidden layers without being explicit about what they are or their relationship to the overall process.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfpYlGapaYMj6MRLtyKXAY5vp0lg9ct6rhd-n-zezVQlJ7jzOSO1SlQzqKg6cYHwU0whNUZlhlUCxzcOTDUlpZxJUtHL9PjJa2jSeizpXY7wRJy6b9UaNQsw6RlxmDMZbQ-s5BxXeKolci/&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;
&lt;p&gt;This is similar to the example diagram in the lesson (one less hidden layer).&lt;/p&gt;
&lt;p&gt;I guess hidden layers are like refining steps in a process that don’t output anything?&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://stats.stackexchange.com/questions/63152/what-does-the-hidden-layer-in-a-neural-network-compute/63163#63163&quot;&gt;here’s a reasonable attempt&lt;/a&gt; to answer the same questions I have.&lt;/p&gt;
&lt;/div&gt;
&lt;/body&gt;

&lt;/html&gt;
</content><link rel='replies' type='application/atom+xml' href='https://markup-mitchell.blogspot.com/feeds/2112652550057262573/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://markup-mitchell.blogspot.com/2019/01/neural-networks-scrimba-hidden-layers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/2112652550057262573'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/2112652550057262573'/><link rel='alternate' type='text/html' href='https://markup-mitchell.blogspot.com/2019/01/neural-networks-scrimba-hidden-layers.html' title='neural networks, scrimba, hidden layers'/><author><name>markup mitchell</name><uri>http://www.blogger.com/profile/04110229624586413585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfpYlGapaYMj6MRLtyKXAY5vp0lg9ct6rhd-n-zezVQlJ7jzOSO1SlQzqKg6cYHwU0whNUZlhlUCxzcOTDUlpZxJUtHL9PjJa2jSeizpXY7wRJy6b9UaNQsw6RlxmDMZbQ-s5BxXeKolci/s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5683362339713645548.post-6745356390393231178</id><published>2019-01-12T04:32:00.002-08:00</published><updated>2019-01-12T04:32:55.205-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="asset"/><category scheme="http://www.blogger.com/atom/ns#" term="asset helper"/><category scheme="http://www.blogger.com/atom/ns#" term="ghost"/><category scheme="http://www.blogger.com/atom/ns#" term="ghost 2.0"/><category scheme="http://www.blogger.com/atom/ns#" term="upgrade"/><category scheme="http://www.blogger.com/atom/ns#" term="work"/><title type='text'>prep for ghost 2.0 upgrade</title><content type='html'>&lt;!DOCTYPE html&gt;
&lt;html&gt;

&lt;head&gt;
  &lt;meta charset=&quot;utf-8&quot;&gt;
  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
  &lt;title&gt;2019-01-11-website-log&lt;/title&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;https://stackedit.io/style.css&quot; /&gt;
&lt;/head&gt;

&lt;body class=&quot;stackedit&quot;&gt;
  &lt;div class=&quot;stackedit__html&quot;&gt;&lt;h2 id=&quot;ghost-upgrade&quot;&gt;ghost upgrade&lt;/h2&gt;
&lt;p&gt;Been looming for ages, and efforts to upgrade have found issues.&lt;/p&gt;
&lt;p&gt;Just found a thing on ghost called &lt;a href=&quot;https://gscan.ghost.org/&quot;&gt;gscan&lt;/a&gt; that analyses your theme and tells you what you need to change.&lt;/p&gt;
&lt;p&gt;I got 93/100, so in theory this is manageable.&lt;/p&gt;
&lt;p&gt;Result for version 2.1.0:&lt;/p&gt;
&lt;h3 id=&quot;must-fix&quot;&gt;Must fix:&lt;/h3&gt;
&lt;p&gt;The  &lt;code&gt;{{#author}}&lt;/code&gt;  block helper should be replaced with  &lt;code&gt;{{#primary_author}}&lt;/code&gt;  or  &lt;code&gt;{{#foreach authors}}...{{/foreach}}&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Show details&lt;/p&gt;
&lt;p&gt;The  &lt;code&gt;.kg-width-wide&lt;/code&gt;  CSS class is required to use your theme with 2.0&lt;/p&gt;
&lt;p&gt;Show details&lt;/p&gt;
&lt;p&gt;The  &lt;code&gt;.kg-width-full&lt;/code&gt;  CSS class is required to use your theme with 2.0&lt;/p&gt;
&lt;p&gt;Show details&lt;/p&gt;
&lt;p&gt;The  &lt;code&gt;.kg-gallery-container&lt;/code&gt;  CSS class is required to use your theme with 2.0&lt;/p&gt;
&lt;p&gt;Show details&lt;/p&gt;
&lt;p&gt;The  &lt;code&gt;.kg-gallery-row&lt;/code&gt;  CSS class is required to use your theme with 2.0&lt;/p&gt;
&lt;p&gt;Show details&lt;/p&gt;
&lt;p&gt;The  &lt;code&gt;.kg-gallery-image&lt;/code&gt;  CSS class is required to use your theme with 2.0&lt;/p&gt;
&lt;p&gt;Show details&lt;/p&gt;
&lt;h3 id=&quot;should-fix&quot;&gt;Should fix:&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;.kg-card-markdown&lt;/code&gt;  doesn’t exist in Ghost 2.0, ensure your theme works without it&lt;/p&gt;
&lt;p&gt;Show details&lt;/p&gt;
&lt;p&gt;&lt;code&gt;package.json&lt;/code&gt;  property  &lt;code&gt;keywords&lt;/code&gt;  should contain  &lt;code&gt;ghost-theme&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Show details&lt;/p&gt;
&lt;p&gt;Assets such as CSS &amp;amp; JS must use the  &lt;code&gt;{{asset}}&lt;/code&gt;  helper&lt;/p&gt;
&lt;p&gt;Show details&lt;/p&gt;
&lt;h3 id=&quot;consider-fixing&quot;&gt;Consider fixing:&lt;/h3&gt;
&lt;p&gt;The output of  &lt;code&gt;{{id}}&lt;/code&gt;  changed in Ghost v1.0.0, you may need to use  &lt;code&gt;{{comment_id}}&lt;/code&gt;  instead.&lt;/p&gt;
&lt;p&gt;Show details&lt;/p&gt;
&lt;h3 id=&quot;passed-rules&quot;&gt;102 Passed Rules&lt;/h3&gt;
&lt;h2 id=&quot;huh&quot;&gt;Huh&lt;/h2&gt;
&lt;p&gt;I’m working my way down this list, making changes and &lt;code&gt;yarn zip&lt;/code&gt;ping the theme every so often to retest.&lt;/p&gt;
&lt;p&gt;Having replaced the &lt;code&gt;{{#author}}&lt;/code&gt; block helpers and included mandatory styles I’m up to 99/100!&lt;/p&gt;
&lt;p&gt;I know I’m jinxing myself here, but so far I’m well ahead of schedule.&lt;/p&gt;
&lt;h3 id=&quot;kg-card-markdown&quot;&gt;&lt;code&gt;.kg-card-markdown&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;This is the biggie. I have this in like 30 or 40 places in my stylesheet.&lt;/p&gt;
&lt;p&gt;Am wondering if I can just sub it out for something else and leave the rules otherwise intact.&lt;/p&gt;
&lt;p&gt;Let’s try.&lt;br&gt;
…&lt;br&gt;
seems to be fine!&lt;/p&gt;
&lt;h3 id=&quot;conclusion&quot;&gt;conclusion&lt;/h3&gt;
&lt;p&gt;So I can meet the requirements of the upgrade - I got a 100/100, no issues from gscan.&lt;/p&gt;
&lt;p&gt;Only thing left is some &lt;code&gt;{{asset}}&lt;/code&gt; helper instances I removed because they were return values from a bit of JS and it was raising warnings on my linting or whatever.&lt;/p&gt;
&lt;p&gt;I’d rather get a couple of warnings from ghost on deployment than live with warnings in my IDE that I then become blind to because I habitually ignore them&lt;/p&gt;
&lt;p&gt;END&lt;/p&gt;
&lt;/div&gt;
&lt;/body&gt;

&lt;/html&gt;
</content><link rel='replies' type='application/atom+xml' href='https://markup-mitchell.blogspot.com/feeds/6745356390393231178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://markup-mitchell.blogspot.com/2019/01/prep-for-ghost-20-upgrade.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/6745356390393231178'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5683362339713645548/posts/default/6745356390393231178'/><link rel='alternate' type='text/html' href='https://markup-mitchell.blogspot.com/2019/01/prep-for-ghost-20-upgrade.html' title='prep for ghost 2.0 upgrade'/><author><name>markup mitchell</name><uri>http://www.blogger.com/profile/04110229624586413585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>