<?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 Engin Üstün on Medium]]></title>
        <description><![CDATA[Stories by Engin Üstün on Medium]]></description>
        <link>https://medium.com/@enginustun?source=rss-cde3f527af32------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*BjNA7ExtREjA0Fyur8QOiw.jpeg</url>
            <title>Stories by Engin Üstün on Medium</title>
            <link>https://medium.com/@enginustun?source=rss-cde3f527af32------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 05:42:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@enginustun/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[How Do We Serve New Frontend Developments to Our QAs for Testing]]></title>
            <link>https://medium.com/trendyol-tech/how-do-we-serve-new-frontend-developments-to-our-qas-for-testing-f4250c9ae24f?source=rss-cde3f527af32------2</link>
            <guid isPermaLink="false">https://medium.com/p/f4250c9ae24f</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[deployment]]></category>
            <category><![CDATA[feature-branch-workflow]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[testing]]></category>
            <dc:creator><![CDATA[Engin Üstün]]></dc:creator>
            <pubDate>Wed, 09 Feb 2022 20:13:35 GMT</pubDate>
            <atom:updated>2022-02-09T20:13:35.158Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QxxvDlb0LUjiN5dnIIzjCw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@johnschno?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">John Schnobrich</a> on <a href="https://unsplash.com/s/photos/quality-assurance?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>It might be challenging to separate, develop and test tasks meaningfully and painlessly. I will try to explain our practices to follow development process using git and how we serve our developments to QA’s for testing purposes.</p><p>We practically have 3 different environments for our applications:</p><ul><li>dev/local</li><li>staging</li><li>production</li></ul><p>We are using feature based branch names on git and giving names like <strong>FEAT-1, FEAT-2</strong> that are equal to Jira tasks. Our feature development lifecycle was like:</p><ol><li>Complete development</li><li><strong>Open a merge request</strong> to the <strong>main</strong> branch</li><li>Review code</li><li>Apply reviews if any necessary</li><li><strong>Merge feature</strong> into the <strong>main</strong> branch</li><li><strong>Deploy</strong> application to the <strong>staging</strong> environment</li><li>Perform manual and automation tests (by QAs)</li><li>Open a bug if any defects are found (by QAs)</li><li>Reapply <strong>from the first step</strong></li><li>If everything is OK then production deployment phase starts (I skip its details)</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DzvumBjv-LLhvGxG_2lfuA.png" /><figcaption>Old flow before we started to use <strong>branch-up</strong></figcaption></figure><h4>Problem of This Approach</h4><p>A merge request will be merged into main branch after code review step is done. We may have more than one new commits that are merged into main branch since latest deployment. We faced this kind of situations countless times. When we have main branch in this situation and if we have to release a bugfix, hotfix or an urgent thing, the problem begins.</p><p>Why? Because we have untested commits in main branch and we can’t deploy them yet. To solve the problem we may create a new branch from latest deployed commit and develop necessary fix and deploy it. But we have to break our deployment rule, because we want to keep main branch equals production. Doing it in this way we need to deploy another branch to production and we won’t have this latest fix in main branch. A lot of pain wait us when we want to include the latest fix into main branch.</p><p>Should we include it into main branch with <strong>cherry-pick</strong> or should we do it with <strong>merge</strong>? We will most probably encounter code conflicts during the solution. I know it can be resolvable but we believe that all these struggles are unnecessary. I like to solve problems in a way that I don’t have to think about the same problem over and over again. So, there should be more elegant ways.</p><h4>Solution</h4><p>Since we are doing our developments feature-based, why don’t we serve our application in the same way on staging environment? By doing this we will be able to test features independently. When the test of a feature is done, we can merge it into main branch. It doesn’t matter anymore we need to deploy hotfix or urgent feature because we have tested and ready-to-deploy commits in main branch. We can separately develop new necessary <em>fix/feature</em> and apply same <em>code review/test/merge</em> process on it too.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vlb97MuKRFCJaw8cckvaxw.png" /><figcaption>New flow after we started to use <strong>branch-up</strong></figcaption></figure><p>Our new feature development lifecycle is like:</p><ol><li>Complete development</li><li><strong>Open a merge request</strong> to the <strong>main</strong> branch</li><li>Review code</li><li>Apply reviews if any necessary</li><li><strong>Deploy</strong> <em>branch</em> to the <strong>staging</strong> environment <strong>without merging it into main branch</strong></li><li>Perform manual and automation tests (by QAs)</li><li>Open a bug if any defects are found (by QAs)</li><li>Fix bug if found and commit into the same feature branch and push</li><li>Reapply <strong>from the step-3</strong></li><li>If there is no bug and QAs says “Test is OK” then merge feature branch into main branch</li></ol><p>Thus, main branch will always be ready-to-deploy and clean. If you need to add <em>hotfix/feature</em> into your application, the only thing you need to do is creating a new branch from main branch. So you are ready to go without thinking anything. (We might still have backend-dependent features which we didn’t deploy yet in our main branch, we have <strong>feature-toggle</strong> feature to handle this kind of situations but this is the subject of another post)</p><blockquote>If you have dependent features need to be tested together, it is easy-to-do task. Let’s say you have FEAT-1 and FEAT-2 branches but you need to test them together, just create a new branch and merge both of them into it. e.g. In <strong><em>combination-of-FEAT-1-FEAT-2 </em></strong>branch. Follow the above steps starting from step-5. Follow the above steps starting from step-3 if any conflict occurs. You don’t need FEAT-1 and FEAT-2 branches anymore.</blockquote><h4>How We Applied the Solution</h4><p>As you can guess there are some ways to do it. You may try to apply devops solution and create new environment for each branch to realize this but you will need more resources and it will be relatively complex.</p><p>Our colleagues from another team implemented a solution by using <a href="https://istio.io/">istio</a> but it was also too complex to me. We need to learn many of its concepts and configurations and we thought it is time consuming. I always consider reinventing the wheel in such cases. I believe it is arguably more challenging, instructive and satisfying. We mostly go with custom solutions.</p><blockquote>Disclaimer: I do not suggest to do things from scratch on your own all the time. Especially if technical know-how of team is not enough, in the strict deadline circumstances, if there is mature and robust solution exists out there somewhere, and if you don’t want to hear complaints from your spouse about lack of time to see each other :) and so on…</blockquote><h4>Application We Developed</h4><p>We developed an application called <strong>branch-up</strong> to apply the solution above. This application is working based on webhooks. Basically whenever a merge request is open/updated/merged, a webhook will be triggered. Consequently, the <strong>branch-up</strong> application pulls the latest commit of <strong>source branch</strong> from the remote repository, builds it and deploys the UI under specific branch name.</p><p>Branch-up flow;</p><ol><li>Create a merge request from any branch to main branch (which is called master in our project)</li><li><strong>Branch-up</strong> will start the process automatically for source branch (*1)</li><li>Source branch will be pulled</li><li>Pulled code will be built</li><li>Built code will be deployed and served via <em>branch-up.trendyol.com/source-branch</em></li><li>Deployed branch can be tested now</li></ol><blockquote>1. If the merge request just created is not in draft mode. You can see in below image, PT-58 is in draft mode. It means that it is in code review phase for developers, and not ready to test for QAs. Thus, we know which branch is at which phase without looking at Jira.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*zVfgRo7lSL2aQso8EQ6Qwg.png" /><figcaption>UI of branch-up application</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*gv9RxNv6vWzxd7aeNUw1EA.png" /><figcaption>source-branch <strong>TDES-1412</strong> is accessible under related route</figcaption></figure><h4>Conclusion</h4><p>By doing this we gained ability to test branches independently. After each successful test, we are merging tested branch into main branch. Thus, the main branch only contains production-ready deployable codes. Whenever we need to deploy the application we will be able to do this.</p><p>Since using this solution;</p><p>From developers’ side, we are freed from the burden of branch management. Thanks to clean main branch we no longer think about how to fix the warnings and urgent errors that we need to fix.</p><p>From QAs’ side, we are able to test branches task-oriented. And also we can compare the branch with previous version before merge, because /master endpoint contains previous version of application. (Also we still have staging environment for this)</p><p>We can say that as a negative affect, we need to do last one test on stage environment after merging all features to check that is there any problem.</p><p>Thank you for reading!</p><p>Please leave a comment and feel free to share if you like it.</p><p>More from the author</p><p><a href="https://medium.com/trendyol-tech/micro-frontends-how-to-encapsulate-your-styles-between-projects-bd303025abdd">Micro Frontends — How to Encapsulate Your Styles Between Projects</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f4250c9ae24f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/trendyol-tech/how-do-we-serve-new-frontend-developments-to-our-qas-for-testing-f4250c9ae24f">How Do We Serve New Frontend Developments to Our QAs for Testing</a> was originally published in <a href="https://medium.com/trendyol-tech">Trendyol Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Micro Frontends — How to Encapsulate Your Styles Between Projects]]></title>
            <link>https://medium.com/trendyol-tech/micro-frontends-how-to-encapsulate-your-styles-between-projects-bd303025abdd?source=rss-cde3f527af32------2</link>
            <guid isPermaLink="false">https://medium.com/p/bd303025abdd</guid>
            <category><![CDATA[style-encapsulation]]></category>
            <category><![CDATA[micro-frontends]]></category>
            <dc:creator><![CDATA[Engin Üstün]]></dc:creator>
            <pubDate>Wed, 08 Dec 2021 10:07:02 GMT</pubDate>
            <atom:updated>2021-12-08T10:07:02.116Z</atom:updated>
            <content:encoded><![CDATA[<h3>Micro Frontends — How to Encapsulate Your Styles Between Projects</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*C1wiNb-3E6HafrU2AzKPnw.png" /><figcaption>Magali Blandin and Joy Caroni collaborating to create one piece of art. <a href="https://www.joycaronistudio.com/post/art-challenge">source</a></figcaption></figure><p>I am planning to write <strong>Micro Frontends — How to …</strong> series to share our experiences with micro frontends, problems we encountered and how we try to solve them.</p><blockquote>Since there are a lot of resource on everywhere about what micro frontends is, I will not mention it.</blockquote><p>We implemented a custom client-side architecture to serve our applications. If you need server-side solution, I encourage you to check our <a href="https://github.com/puzzle-js/puzzle-js">puzzle-js</a> library.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/524/1*s2K8zXk2ropwBG6sAcXRVw.png" /><figcaption>There is a container application that serves front-end applications by domain</figcaption></figure><p>TX stands for Trendyol Experience. We put common experience applications such as Customer Experience, Fraud Experience, Seller Experience and others together under the TX. Thus, agents who need to use more than one of these applications will no longer need to switch between different applications. This will save the agents considerable time. Although it is a wide-ranging application, we have formed autonomous teams, each of which has independent development, test and deployment processes and has relatively less responsibility.</p><p>When we render <strong>sx-ui</strong> project, its CSS will be injected to the document. Let’s say we have a class named .title and contains following CSS.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/69769f33801cfe78ef874c59c41b2f67/href">https://medium.com/media/69769f33801cfe78ef874c59c41b2f67/href</a></iframe><p>Then we change our route to <strong>cx-ui</strong>. What if it has a same class name?</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/89da6e3238e85f7ddc265bce8b83b315/href">https://medium.com/media/89da6e3238e85f7ddc265bce8b83b315/href</a></iframe><p>The CSS that injected to the document lastly will always override other ones and we get a result we don’t want. For the above example, if we go back to the <strong>sx-ui</strong> route, we will see the text with the .title class as blue and 20px instead of seeing it in red.</p><p>There are a lot of approaches to write maintainable CSS;</p><ul><li>First option may be defining a naming convention. This requires developers to be careful. But you know we are talking about humans.</li><li>Second may be to use <a href="https://css-tricks.com/css-modules-part-1-need/"><strong>CSS modules</strong></a><strong>.</strong></li><li>Another one may be using <a href="https://sass-lang.com/"><strong>SASS</strong></a><strong>.</strong></li><li>Another one may be using a <a href="https://webdesign.tutsplus.com/articles/an-introduction-to-css-in-js-examples-pros-and-cons--cms-33574"><strong>CSS-in-JS</strong></a> library.</li></ul><p>Actually it is not important which one we use if we can provide independent environment to developers that they can write class names without thinking to break styling.</p><h4>Solution</h4><p>Our solution is writing entire CSS under a container class by project.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/668210a559f0df4692a0f9d74160affb/href">https://medium.com/media/668210a559f0df4692a0f9d74160affb/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7698efe9c0889db6f50dc2eeb7e5dcd1/href">https://medium.com/media/7698efe9c0889db6f50dc2eeb7e5dcd1/href</a></iframe><p>By doing this, we can avoid overriding styles between projects. But this as well requires developer to be careful. Of course, we do not want to leave this to the developer’s discretion. So we decided to go with automated solution to implement this approach.</p><p>We used a post CSS plugin named <a href="https://github.com/dbtedman/postcss-prefixwrap">postcss-prefixwrap</a> to add acontainer class to our CSS classes.</p><p>Because of we used <a href="https://github.com/facebook/create-react-app"><strong>cra</strong></a> to create our react SPA, we are using <a href="https://github.com/timarney/react-app-rewired"><strong>react-app-rewired</strong></a> to override webpack config. Here is config-overrides file content by project:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5b670cc59535228d1a571f24ddaa2ac7/href">https://medium.com/media/5b670cc59535228d1a571f24ddaa2ac7/href</a></iframe><p>So after compilation, we will ensure that our styles are wrapped with the class name we specified. e.g. PrefixWrap(&quot;.sx-ui&quot;) or PrefixWrap(&quot;.cx-ui&quot;)</p><p>We have experienced this solution for at least a year. There was no complain, problem or bug we encountered because of overriden styles since we applied it. So we are very happy with the result.</p><p>You may be using another frontend technology or another bundler but I wanted to share our perspective on solving this issue with you. You can easily apply it to your development stack.</p><p>Please leave a comment about what you think.</p><p>Thank you for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bd303025abdd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/trendyol-tech/micro-frontends-how-to-encapsulate-your-styles-between-projects-bd303025abdd">Micro Frontends — How to Encapsulate Your Styles Between Projects</a> was originally published in <a href="https://medium.com/trendyol-tech">Trendyol Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>