<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Dave Ahern on Medium]]></title>
        <description><![CDATA[Stories by Dave Ahern on Medium]]></description>
        <link>https://medium.com/@daveahern?source=rss-ff0730dbb236------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*OGY0vJddZREBA-ff.</url>
            <title>Stories by Dave Ahern on Medium</title>
            <link>https://medium.com/@daveahern?source=rss-ff0730dbb236------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 23:18:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@daveahern/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Rethinking Frontend with Tailwind]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@daveahern/rethinking-frontend-with-tailwind-a49780fda514?source=rss-ff0730dbb236------2"><img src="https://cdn-images-1.medium.com/max/1536/1*lqUm9G_sURI_ubJfBaArxw.png" width="1536"></a></p><p class="medium-feed-snippet">I didn&#x2019;t think it was possible to write an entire web application without a single line of CSS. Not only is it possible, but it&#x2019;s also&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@daveahern/rethinking-frontend-with-tailwind-a49780fda514?source=rss-ff0730dbb236------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@daveahern/rethinking-frontend-with-tailwind-a49780fda514?source=rss-ff0730dbb236------2</link>
            <guid isPermaLink="false">https://medium.com/p/a49780fda514</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[tailwind]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[ux]]></category>
            <dc:creator><![CDATA[Dave Ahern]]></dc:creator>
            <pubDate>Wed, 26 Mar 2025 15:01:32 GMT</pubDate>
            <atom:updated>2025-03-26T15:03:12.299Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Persisting and rehydrating ag-grid state with angular]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@daveahern/persisting-and-rehydrating-ag-grid-state-with-angular-3f48cfedbcc8?source=rss-ff0730dbb236------2"><img src="https://cdn-images-1.medium.com/max/1024/1*hmMecFFPaOK3RfItPCtnng.png" width="1024"></a></p><p class="medium-feed-snippet">I recently came across an interesting problem with ag-grid. How do you store the state of the grid on a backend database and load the grid&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@daveahern/persisting-and-rehydrating-ag-grid-state-with-angular-3f48cfedbcc8?source=rss-ff0730dbb236------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@daveahern/persisting-and-rehydrating-ag-grid-state-with-angular-3f48cfedbcc8?source=rss-ff0730dbb236------2</link>
            <guid isPermaLink="false">https://medium.com/p/3f48cfedbcc8</guid>
            <category><![CDATA[grid-layout]]></category>
            <category><![CDATA[ag-grid]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[directives-in-angular]]></category>
            <dc:creator><![CDATA[Dave Ahern]]></dc:creator>
            <pubDate>Thu, 05 Dec 2024 18:46:14 GMT</pubDate>
            <atom:updated>2024-12-05T18:57:29.022Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Unit Testing Standalone Components, Signals, and Defer Blocks in Angular: A Practical Guide]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@daveahern/unit-testing-standalone-components-signals-and-defer-blocks-in-angular-a-practical-guide-821e6d593102?source=rss-ff0730dbb236------2"><img src="https://cdn-images-1.medium.com/max/1024/1*oIQMWDs41ed2oGF_8qudSA.png" width="1024"></a></p><p class="medium-feed-snippet">Unit testing is essential for maintaining high-quality Angular applications, especially with the framework&#x2019;s frequent updates. As Angular&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@daveahern/unit-testing-standalone-components-signals-and-defer-blocks-in-angular-a-practical-guide-821e6d593102?source=rss-ff0730dbb236------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@daveahern/unit-testing-standalone-components-signals-and-defer-blocks-in-angular-a-practical-guide-821e6d593102?source=rss-ff0730dbb236------2</link>
            <guid isPermaLink="false">https://medium.com/p/821e6d593102</guid>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[testing-tools]]></category>
            <category><![CDATA[jest]]></category>
            <category><![CDATA[unit-testing]]></category>
            <dc:creator><![CDATA[Dave Ahern]]></dc:creator>
            <pubDate>Fri, 15 Nov 2024 10:51:52 GMT</pubDate>
            <atom:updated>2024-11-15T12:21:57.553Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Automated Dependency updates with NX and Gitlab]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@daveahern/automated-dependency-updates-with-nx-and-gitlab-e6e2bc65ecdc?source=rss-ff0730dbb236------2"><img src="https://cdn-images-1.medium.com/max/2048/1*EwQYkjSGH4V2C0yNJ1vaAA.jpeg" width="2048"></a></p><p class="medium-feed-snippet">In today&#x2019;s fast-paced development environment, automation can save a significant amount of time and effort. One area where automation can&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@daveahern/automated-dependency-updates-with-nx-and-gitlab-e6e2bc65ecdc?source=rss-ff0730dbb236------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@daveahern/automated-dependency-updates-with-nx-and-gitlab-e6e2bc65ecdc?source=rss-ff0730dbb236------2</link>
            <guid isPermaLink="false">https://medium.com/p/e6e2bc65ecdc</guid>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[nx-monorepo]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Dave Ahern]]></dc:creator>
            <pubDate>Mon, 11 Nov 2024 19:31:00 GMT</pubDate>
            <atom:updated>2024-11-11T19:31:00.428Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Angular Signals in Action: Use Cases Explored]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@daveahern/angular-signals-in-action-use-cases-explored-a779e5ad4817?source=rss-ff0730dbb236------2"><img src="https://cdn-images-1.medium.com/max/1024/1*Ds-VUlsBkDGZKC8hoxHnuw.jpeg" width="1024"></a></p><p class="medium-feed-snippet">Angular&#x2019;s signal API introduces a powerful, reactive way to manage component state, offering new ways to handle inputs, outputs, computed&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@daveahern/angular-signals-in-action-use-cases-explored-a779e5ad4817?source=rss-ff0730dbb236------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@daveahern/angular-signals-in-action-use-cases-explored-a779e5ad4817?source=rss-ff0730dbb236------2</link>
            <guid isPermaLink="false">https://medium.com/p/a779e5ad4817</guid>
            <category><![CDATA[angular-signals]]></category>
            <category><![CDATA[reactive-programming]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[angular]]></category>
            <dc:creator><![CDATA[Dave Ahern]]></dc:creator>
            <pubDate>Fri, 08 Nov 2024 12:07:19 GMT</pubDate>
            <atom:updated>2024-11-08T12:07:19.918Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[A cautionary tale of migrating to NX]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@daveahern/a-cautionary-tale-of-migrating-to-nx-211f18ce8c4f?source=rss-ff0730dbb236------2"><img src="https://cdn-images-1.medium.com/max/1024/1*PMjNo_u7Gy9R7GWtlzGc6Q.png" width="1024"></a></p><p class="medium-feed-snippet">I have long been an advocate of NX. I spent 6 months migrating an entire codebase to NX. I even created a blog about how amazing the&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@daveahern/a-cautionary-tale-of-migrating-to-nx-211f18ce8c4f?source=rss-ff0730dbb236------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@daveahern/a-cautionary-tale-of-migrating-to-nx-211f18ce8c4f?source=rss-ff0730dbb236------2</link>
            <guid isPermaLink="false">https://medium.com/p/211f18ce8c4f</guid>
            <category><![CDATA[nx-monorepo]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[monorepo]]></category>
            <category><![CDATA[frontend]]></category>
            <dc:creator><![CDATA[Dave Ahern]]></dc:creator>
            <pubDate>Fri, 01 Nov 2024 14:12:00 GMT</pubDate>
            <atom:updated>2024-11-01T14:12:45.871Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Energy monitoring with home assistant]]></title>
            <link>https://medium.com/@daveahern/energy-monitoring-with-home-assistant-b6905589519d?source=rss-ff0730dbb236------2</link>
            <guid isPermaLink="false">https://medium.com/p/b6905589519d</guid>
            <category><![CDATA[energy-monitoring]]></category>
            <category><![CDATA[home-assistant]]></category>
            <category><![CDATA[home-automation]]></category>
            <category><![CDATA[electricty]]></category>
            <category><![CDATA[energy-consumption]]></category>
            <dc:creator><![CDATA[Dave Ahern]]></dc:creator>
            <pubDate>Sun, 31 Dec 2023 21:30:16 GMT</pubDate>
            <atom:updated>2023-12-31T21:53:22.813Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yj4SytFQqG3Rfw6emM8D9w.jpeg" /></figure><p>If you live in Ireland like me and have ever tried to predict your electrical bills you will know how absurdly difficult it can be. Energy companies here often claim they provide user friendly energy monitoring, however, once you look under the hood it becomes clear that this claim is for the most part, untrue.</p><p>The ESB (Electricity Supply Board) does provide a utility for downloading your energy usage in a CSV format, however, this is either a manual task or you will have to create scripts to automate the pulling and parsing of the data as well as processing the tariff information. On top of all this you need a smart meter enabled for the data to be collected in the first place.</p><p>Another option is to use smart plugs with energy monitoring enabled. Tapo smart plugs have this feature. This does work to an extent however, you will not be able to monitor some of the more resource intensive utilities in your house such as a heat pump which usually require a direct line to your electricity rather than a plug so accurately predicting your bills can be impossible using this method alone.</p><h3>A workable solution</h3><p>Admittedly, this solution involves investing a small amount of money to purchase a piece of hardware. The hardware is provided by a company called Frient and can be found on <a href="https://www.amazon.co.uk/frient-Electricity-Consumption-Electronics-SmartThings/dp/B0CGVB6LGC/ref=asc_df_B0CGVB6LGC/?tag=googshopuk-21&amp;linkCode=df0&amp;hvadid=658870577929&amp;hvpos=&amp;hvnetw=g&amp;hvrand=7727640267220501685&amp;hvpone=&amp;hvptwo=&amp;hvqmt=&amp;hvdev=c&amp;hvdvcmdl=&amp;hvlocint=&amp;hvlocphy=1007850&amp;hvtargid=pla-2203122716841&amp;psc=1&amp;mcid=023dcac478573062aba03f90ec37fb5b&amp;th=1&amp;psc=1">Amazon at this link</a>. Once you have this piece of hardware, installation is straightforward as long as you have access to your energy meter. No modifications are required to the energy meter.</p><p>I was curious about how this would actually monitor anything, so I did a bit of research into energy meters. Apparently, on most meters, there is a flash of light emitted every time a unit of energy is used within the house. The Frient monitor simply observes this flash of light and can then communicate these readings with Home Assistant over Zigbee.”</p><p>The advantage of this is that because the energy meter is usually the single source of truth for all the energy usage in the house, we can monitor this one location to get an accurate reading. We also don’t have to waste much money buying multiple devices for each power outlet, or spend much time writing scripts. For me, the entire installation took about 30 minutes.</p><h3>Home assistant dashboard</h3><p>As long as your Home Assistant has Zigbee monitoring enabled, the device should automatically be detected. If you do not have a Zigbee-enabled Home Assistant, you will need to buy an extra device to enable this communication. I am using a <a href="https://sonoff.tech/product/gateway-and-sensors/sonoff-zigbee-3-0-usb-dongle-plus-p/">SONOFF Universal Zigbee 3.0 USB</a>.</p><h4>Setting up tariffs</h4><p>Each electricity company may have different tariffs for energy usage. For example, I have a smart energy meter with 3 tariffs for day, night, and peak. To create a tariff for each, you will need to head over to Settings -&gt; Devices and Services, then click the Helpers tab. Click the ‘Create Helper’ button and select the ‘Date and Time’ option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*MC7ZJpcYsYIglCUiiSdAOg.png" /></figure><p>Let’s begin by naming your first tariff, starting with the day tariff. I chose the name ‘Tariff day.’ Select ‘Time’ as the input and click on the ‘Create’ button. Repeat this process for each of your tariffs — I personally have four tariffs.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8XfU69Mcmtz20NjVTxrH1g.png" /></figure><p>You can then add these to a new dashboard for easy editing of the tariff times. If you have not created a new dashboard before then head to Settings -&gt; Dashboards, then click the add dashboard button and give it a name. Next, head to the created dashboard in the left-hand menu. Click the edit button, then click the add card button and select the entities card. Next, add each of the tariffs created in the previous section and provide the correct times.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qZDKUkLDnDegTTM7Mf0TjA.png" /></figure><p>Please note the reason I have 4 tariffs instead of 3 is because the day tariff starts at 08:00 then switches to the peak tariff at 17:00 to 19:00 then switches back to the day tariff until 23:00 which is when the night tariff commences. I could not see a way to do this with just 3 tariffs.</p><h4>Setting up utility meters</h4><p>With the tariffs in place we now need to assign a price point to each one, again this will vary depending on your electricity provider so make sure you have the correct information from your provider.</p><p>Head over to Settings -&gt; Devices and services, select the helpers tab and click the create helper button. This time select the Utility Meter option</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*bT1FVkEKYos7gb-hS8hbaw.png" /></figure><p>Add the following data to the form making sure to provide the correct supported tariffs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MkztrkciHYcD59td998kBQ.png" /></figure><p>Home Assistant needs to know which tariff to use during the day. For this we need to setup an automation that will switch to the correct tariff as the day progresses. Head over to Settings -&gt; Automations &amp; Scenes, then click the Automations tab. Click the Create Automation button. Once in the automation creation screen switch to the YAML editor but clicking the 3 dots in the top right and select edit in YAML. Provide the following YAML and click save.</p><pre>alias: &quot;Energy: Tariffs&quot;<br>description: &quot;&quot;<br>trigger:<br>  - platform: time<br>    at: input_datetime.tariff_day<br>    variables:<br>      tariff: Tariff day<br>  - platform: time<br>    at: input_datetime.tariff_peak<br>    variables:<br>      tariff: Tariff peak<br>  - platform: time<br>    at: input_datetime.tariff_day_2<br>    variables:<br>      tariff: Tariff day - 2<br>  - platform: time<br>    at: input_datetime.tariff_night<br>    variables:<br>      tariff: Tariff night<br>action:<br>  - service: select.select_option<br>    target:<br>      entity_id: select.energy_grid_import<br>    data:<br>      option: &quot;{{ tariff }}&quot;<br>mode: single</pre><p>This YAML file will create the following automation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lLW8AcXksxNZBYoYfTOmbw.png" /></figure><p>Finally we need to configure the price of each tariff. To do this head over over to Settings -&gt; Dashboards -&gt; Energy. Click the add consumption button. and add a tariff and static price for each of the tariffs. For example, for the day tariff we provide the following information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*KuQrDB0PVRkYstR7rwJy6g.png" /></figure><p>When complete we should have a list that looks like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*CN_UYx9h_rncpPD4V0sbHA.png" /></figure><h4>View the data</h4><p>Once everything is setup correctly head over to Energy dashboard. I should also note that the data may take a few hours to show up so don’t be discouraged if nothing shows up immediately. Once the data starts rolling in your screen should appear like this with the grid total displaying an amount in currency as well as a nice chart showing what times of the day we were using the most energy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nf9Eg1P9OpbU_toxvA4bwA.png" /></figure><h3>Disclaimer</h3><p>Please note that this method will estimate only raw energy usage. It does not account for any standing charges your provider might have nor any carbon tax fees.</p><h3>Conclusion</h3><p>I have this running for just over a month at the time of writing. So far everything is going well. I was also curious how accurate the readings were so I compared it to the ESB readings from our provider and I was very happy see that the numbers correlated almost exactly with the actual readings.</p><p>Thank you for taking the time to read this write up and I hope it helps you in your home automation journey.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b6905589519d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Playwright UI Mode]]></title>
            <link>https://medium.com/@daveahern/playwright-ui-mode-b0e887e5ead1?source=rss-ff0730dbb236------2</link>
            <guid isPermaLink="false">https://medium.com/p/b0e887e5ead1</guid>
            <category><![CDATA[cypress]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[automated-testing]]></category>
            <category><![CDATA[playwright-test]]></category>
            <category><![CDATA[e2e-testing]]></category>
            <dc:creator><![CDATA[Dave Ahern]]></dc:creator>
            <pubDate>Sat, 22 Apr 2023 17:01:47 GMT</pubDate>
            <atom:updated>2023-04-22T17:01:47.703Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8vjXOeWSmdPuPxfqYIOztg.png" /></figure><p>Playwright just dropped a great new feature in version 1.32. The new UI mode adds an interface for exploring running and debugging tests as well as an in-built watch mode which has been on my wish list for some time now.</p><h4>The new interface</h4><figure><img alt="Playwright UI mode" src="https://cdn-images-1.medium.com/max/1024/1*JB6ShURw8B18LwMIyPGXiA.png" /></figure><p>I think it’s important to note that this new interface seems to borrow heavily from <a href="https://www.cypress.io/app/?utm_adgroup=132501525000&amp;utm_keyword=cypress&amp;utm_source=google&amp;utm_medium=cpc&amp;utm_campaign=15312994475&amp;utm_term=cypress&amp;hsa_acc=8898574980&amp;hsa_cam=15312994475&amp;hsa_grp=132501525000&amp;hsa_ad=562694869893&amp;hsa_src=g&amp;hsa_tgt=kwd-40454352&amp;hsa_kw=cypress&amp;hsa_mt=e&amp;hsa_net=adwords&amp;hsa_ver=3&amp;gad=1&amp;gclid=Cj0KCQjwi46iBhDyARIsAE3nVrZW-lccYLdY3XJq-SPr1hjipBTQNxy0JUAltA0dnQ1ddMnmMnw039caAtfpEALw_wcB">Cypress</a>. If you are unfamiliar with Cypress, it is another automated UI testing tool.</p><p>Having said that some of the features in the new UI mode do feel new and fresh. Let’s take a closer look at some of the capabilities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/312/1*N4lbg0Qdvo0MmvcmKF40jA.jpeg" /></figure><p>The left-hand pane shows a tree view of the tests in your spec files. There is also a filter input which may prove useful if you have many tests. On top of the filter, there is a theme switcher button, at the moment there are 2 themes, one for light and one for dark.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f8tJZYnQzWNC13A3N-eiLw.jpeg" /></figure><p>Towards the centre of the screen we have the actions preview feature. On the right is a live view of the application under test, as your tests progress you will see this view update. Hovering over the actions on the left automatically highlights the corresponding element in the preview. For example in the screenshot above I have highlighted the welcome header.</p><p>Metadata provides some simple information about the test environment, such as run duration, browser type, and viewport sizes.</p><p>The pick locator is an inline CSS selection tool. As you type in this section you will see any matches highlighted in the live preview.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LFPL5KbmWyP2aOBn4s0nrA.jpeg" /></figure><p>To the top right is the timeline view, as you hover from left to right the live preview will update to reflect what was shown on screen at the corresponding timestamp in the test. This could be very useful for debugging tests.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nuHRdEtl429ogeZE7FpR9Q.jpeg" /></figure><p>Towards the bottom is a small pane showing the actual test code. This synchs up with the timeline, so if you click a particular timestamp then the correct line that was executed will be highlighted. As far as I can tell this is source code view is not editable, though as I was using it I did think to myself that it might be useful if it was, so I would not have to jump back to my IDE to make small updates (Perhaps a future capability).</p><p>The console tab outputs any logs that come from the application under test. If you are looking for any errors that your tests may throw this is probably the place to check.</p><p>The network tab shows any network request that the application under test makes. Both the network console and network tabs are similar in functionality to Chromes development console.</p><h4>Dark theme</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1KlIYk8W23zkQ0ko2LbnDg.jpeg" /></figure><p>As I am a big fan of dark themes here is a brief preview of what it looks like.</p><h4>How do I display the new UI?</h4><p>The UI is currently in preview mode, but it can be accessed using the command below.</p><pre>npx playwright test --ui</pre><h4>Demo application</h4><p>I have prepared a small demo application if you are interested in playing around with the new functionality.</p><p>Simply go to this repository <a href="https://github.com/el-davo/playwright-ui-demo">https://github.com/el-davo/playwright-ui-demo</a></p><p>To install the required dependencies use <a href="https://pnpm.io/">pnpm</a> with the command below</p><pre>pnpm install</pre><p>If you prefer using NPM or Yarn they may also work but might take a bit longer.</p><p>Next run the command to open playwrights ui mode.</p><pre>pnpm nx e2e demo-app-e2e --ui</pre><h4>Conclusion</h4><p>After moving from cypress to playwright losing the user interface was a contentious point among developers. However, playwright having added this new feature is a massive step forward and makes up for this loss. Very excited to see what new features come out in the future.</p><p>Thank you for taking the time to read this article, I hope it has helped you out in some meaningful way.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b0e887e5ead1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Migrating an Angular Application to Module Federation With NX]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/better-programming/migrating-an-angular-application-to-module-federation-with-nx-74f7664bab3e?source=rss-ff0730dbb236------2"><img src="https://cdn-images-1.medium.com/max/2600/1*8voiCplK-S_l5zY469ZuVA.jpeg" width="8357"></a></p><p class="medium-feed-snippet">Over the last six months, we have migrated a large-scale angular application to a module federated architecture using NX. This is the story</p><p class="medium-feed-link"><a href="https://medium.com/better-programming/migrating-an-angular-application-to-module-federation-with-nx-74f7664bab3e?source=rss-ff0730dbb236------2">Continue reading on Better Programming »</a></p></div>]]></description>
            <link>https://medium.com/better-programming/migrating-an-angular-application-to-module-federation-with-nx-74f7664bab3e?source=rss-ff0730dbb236------2</link>
            <guid isPermaLink="false">https://medium.com/p/74f7664bab3e</guid>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[module-federation]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[nx]]></category>
            <dc:creator><![CDATA[Dave Ahern]]></dc:creator>
            <pubDate>Sun, 02 Apr 2023 18:32:01 GMT</pubDate>
            <atom:updated>2024-11-11T19:51:41.950Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Spread operator in Typescript]]></title>
            <link>https://medium.com/@daveahern/spread-operator-in-typescript-1490cdd67dd0?source=rss-ff0730dbb236------2</link>
            <guid isPermaLink="false">https://medium.com/p/1490cdd67dd0</guid>
            <category><![CDATA[redux]]></category>
            <category><![CDATA[spread-operator]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Dave Ahern]]></dc:creator>
            <pubDate>Fri, 03 Mar 2023 21:36:10 GMT</pubDate>
            <atom:updated>2023-03-03T21:36:10.656Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_92zb2Lf8QTYknoFCQKqRw.jpeg" /></figure><p>The spread operator combines a powerful operator with a simplistic syntax. While this is not a new operator in Typescript, I find it can be useful to take a quick refresher on the possibilities of using this feature.</p><p>If you are also looking for a quick and easy refresher, please try the quiz below. We will present you with several questions each containing an answer. Challenge yourself to guess the output without peeking on the answers.</p><h3>Question 1</h3><pre>let user = {username: &#39;user1&#39;, password: &#39;password&#39;};<br>let newUser = {...user, phone: &#39;0864234544&#39;};<br><br>console.log(newUser);</pre><pre>{ username: &#39;user1&#39;, password: &#39;password&#39;, phone: &#39;0864234544&#39; }<br><br>// Its simple to merge 2 objects</pre><h3>Question 2</h3><pre>let user = {username: &#39;user1&#39;, password: &#39;password&#39;};<br>let newUser = {...user, username: &#39;jimmy&#39;};<br><br>console.log(newUser);</pre><pre>{ username: &#39;jimmy&#39;, password: &#39;password&#39; }<br><br>// The right most key takes precedence</pre><h3>Question 3</h3><pre>let user = {username: &#39;user1&#39;, password: &#39;password&#39;};<br>let info = {number: &#39;087 63455424&#39;, address:&#39;Cork, Ireland&#39;};<br><br>let result = {...user, ...info};<br><br>console.log(result);</pre><pre>{ username: &#39;user1&#39;, password: &#39;password&#39;, number: &#39;087 63455424&#39;, address: &#39;Cork, Ireland&#39; }<br><br>// You can easily spread multiple objects</pre><h3>Question 4</h3><pre>let user = {username: &#39;user1&#39;, address: {line1: &#39;Cork&#39;, line2: &#39;Ireland&#39;}};<br><br>let newUser = {...user, address: {line2: &#39;Jamaica&#39;}};<br><br>console.log(newUser);</pre><pre>{ username: &#39;user1&#39;, address: { line2: &#39;Jamaica&#39; } }<br><br>// If your wondering where line1 went from the address don&#39;t worry, this is a common gotcha.<br>// If we wanted to keep line1 of our address then we need to spread this also using the example below<br><br>let user = {username: &#39;user1&#39;, address: {line1: &#39;Cork&#39;, line2: &#39;Ireland&#39;}};<br><br>let newUser = {...user, address: {...user.address, line2: &#39;Jamaica&#39;}};<br><br>console.log(newUser);<br><br>{ username: &#39;user1&#39;, address: { line1: &#39;Cork&#39;, line2: &#39;Jamaica&#39; } }}</pre><h3>Question 5</h3><pre>let users = {<br>    user1: {<br>        username: &#39;timmy&#39;<br>    },<br>    user2: {<br>        username: &#39;jimmy&#39;<br>    },<br>    user3: {<br>        username: &#39;tommy&#39;<br>    }<br>};<br><br>let result = {...users, [&#39;user2&#39;]: {...users.user2, password: &#39;jimmypass&#39;}};<br><br>console.log(result);</pre><pre>{ user1: { username: &#39;timmy&#39; }, user2: { username: &#39;jimmy&#39;, password: &#39;jimmypass&#39; }, user3: { username: &#39;tommy&#39; } }<br><br>// We simply gave jimmy a password. This is a good example of how you update a user based on their user key</pre><h3>Question 6</h3><pre>let users = [&#39;user1&#39;, &#39;user2&#39;];<br>let newUsers = [&#39;user3&#39;, &#39;user4&#39;];<br>let allUsers = [...users, ...newUsers];<br><br>console.log(allUsers);</pre><pre>[&#39;user1&#39;, &#39;user2&#39;, &#39;user3&#39;, &#39;user4&#39;]<br><br>// This demonstrates that we can also spread arrays</pre><h3>Question 7</h3><pre>function saySomething(...args: string[]) {<br>  console.log(args.join(&#39; &#39;));<br>}<br><br>saySomething(&#39;spread&#39;, &#39;operators&#39;, &#39;are&#39;, &#39;fun&#39;);</pre><pre>&quot;spread operators are fun&quot;<br><br>// Function arguments can also be spread</pre><h3>Conclusion</h3><p>I hope this gives quick quiz has helped you out or given you a sense of how powerful this operator is. It can be useful in many scenarios. I use it mainly when working with redux libraries such as <a href="https://ngrx.io/">NGRX</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1490cdd67dd0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>