<?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 Moataz Mohamed on Medium]]></title>
        <description><![CDATA[Stories by Moataz Mohamed on Medium]]></description>
        <link>https://medium.com/@motazhamada?source=rss-f022f1ccdfaf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*gOMWG3k7UaNhdYhJwvFQqA.jpeg</url>
            <title>Stories by Moataz Mohamed on Medium</title>
            <link>https://medium.com/@motazhamada?source=rss-f022f1ccdfaf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 00:16:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@motazhamada/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[Let your content float around the floating rail]]></title>
            <link>https://medium.com/@motazhamada/let-your-content-float-around-the-floating-rail-c5cf3f5ce441?source=rss-f022f1ccdfaf------2</link>
            <guid isPermaLink="false">https://medium.com/p/c5cf3f5ce441</guid>
            <category><![CDATA[ui-ux-design]]></category>
            <category><![CDATA[ui-design]]></category>
            <category><![CDATA[tablets]]></category>
            <category><![CDATA[foldable-phone]]></category>
            <category><![CDATA[adaptive-layout]]></category>
            <dc:creator><![CDATA[Moataz Mohamed]]></dc:creator>
            <pubDate>Wed, 11 Nov 2026 17:35:30 GMT</pubDate>
            <atom:updated>2026-11-11T19:16:11.338Z</atom:updated>
            <content:encoded><![CDATA[<p>A small idea for Compose and Flutter on tablets and foldables: give every row its own exclusion zone.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/0*mTeiOhFnqPbD2fOo.gif" /></figure><p>Floating navigation is everywhere again. On a tablet or an unfolded foldable there is finally room to lift the rail off the screen edge, round it into a pill and let the page run underneath it. It looks great in a screenshot.</p><p>Then you scroll.</p><p>A section title slides under the pill. The first card of a carousel hides behind it. A paragraph loses its first three words on every line. The pill that was supposed to make the screen feel bigger now covers the content people came for.</p><h3>The two usual answers</h3><p><strong>Pad the whole page.</strong> Give the list a start padding as wide as the pill and the problem is gone. So is the point of floating the rail. The pill is maybe 300dp tall on a screen that is 2000px high; every row above and below it now wastes the same strip of space for nothing.</p><p><strong>Let it run underneath.</strong> This is the iPadOS direction: content slides under the floating sidebar, and the system mirrors and blurs the background so it looks continuous. Beautiful for photos and hero images. Not great for text, buttons or the first item in a carousel.</p><p>I wanted something in between.</p><h3>Every row asks one question</h3><p>What if each row only cared about its own position?</p><blockquote><em>How close am I to the pill right now?</em></blockquote><ul><li>If I am beside it, I step aside by exactly as much as it covers me, plus a small gap.</li><li>If I am close to it, I step aside a little.</li><li>If I am far away, I keep the full width.</li></ul><p>That is the whole idea. The pill stops being a page-level inset and becomes an obstacle that each element avoids individually, the way text in a magazine wraps around a photo.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SzBcXheG5-y6LU6y.png" /></figure><h3>The math fits in a tweet</h3><pre>fun startInset(row: Rect, obstacle: Rect, gap: Float, feather: Float): Float {<br>    val intrusion = obstacle.right + gap - row.left<br>    if (intrusion &lt;= 0f) return 0f<br>    val distance = maxOf(obstacle.top - row.bottom, row.top - obstacle.bottom, 0f)<br>    if (distance == 0f) return intrusion<br>    if (distance &gt;= feather) return 0f<br>    val t = 1f - distance / feather<br>    return intrusion * t * t * t * (t * (t * 6f - 15f) + 10f)<br>}</pre><p>feather is the distance over which a row eases in. I use 140dp. The curve is smootherstep, which starts and ends with zero velocity and zero acceleration, so rows glide in and out instead of snapping.</p><p>There is no animation here. The inset is a pure function of where the row is, so it is always exactly in sync with your finger, and the moment you stop scrolling everything is already at rest. Fold or unfold the device, rotate it, resize the window: the pill moves, every row recalculates, done.</p><h3>Not every element should move the same way</h3><p>This is where it got interesting. Treating “a row” as one block looked wrong almost everywhere:</p><ul><li><strong>Paragraphs</strong> should step aside one by one. A long article as a single block jumps as a whole; split into paragraphs it flows around the pill like text around a picture.</li><li><strong>Section headers</strong> with a line on each side of a centred title should not move the title at all. Only the leading line gets shorter.</li><li><strong>Carousels</strong> should keep their frame full width and shift their content padding instead, so the first card steps aside while the others still scroll under the pill to the screen edge.</li><li><strong>Hero images</strong> should not move. They are decoration, they can run under the pill. Only the text on top of them steps aside.</li></ul><p>So the library gives you three tools instead of one.</p><h3>FloatAround</h3><pre>val obstacle = remember { FloatingObstacle() }</pre><pre>// The pill publishes its bounds<br>MyPill(Modifier.align(Alignment.CenterStart).floatingObstacle(obstacle))</pre><pre>// Anything that should step aside<br>Text(paragraph, Modifier.avoid(obstacle))</pre><pre>// Only the leading line of a header<br>HorizontalDivider(Modifier.weight(1f).avoid(obstacle))</pre><pre>// Carousels shift their padding, not their frame<br>val tracker = rememberAvoidanceTracker(obstacle)<br>LazyRow(<br>    modifier = Modifier.track(tracker),<br>    contentPadding = PaddingValues(16.dp).plusAvoidance(tracker, LocalDensity.current),<br>) { ... }</pre><p>Modifier.avoid is a Modifier.Node that reads the inset during measure. Scrolling re-lays out only the rows near the pill and nothing recomposes. Since 0.2.0 the pill can sit on either edge: each row pads whichever side the pill is on.</p><h3>Same idea in Flutter</h3><p>Because the whole thing is one function of geometry, it ports cleanly. The Flutter package has the same three tools as widgets:</p><pre>final obstacle = FloatingObstacle(gap: 12, feather: 140);</pre><pre>// The pill publishes its bounds<br>FloatingObstacleRegion(obstacle: obstacle, child: MyPill());</pre><pre>// Anything that should step aside<br>Avoid(obstacle: obstacle, child: Text(paragraph));</pre><pre>// Carousels shift their padding, not their frame<br>AvoidanceBuilder(<br>  obstacle: obstacle,<br>  builder: (context, insets) =&gt; ListView(<br>    scrollDirection: Axis.horizontal,<br>    padding: EdgeInsets.fromLTRB(16 + insets.left, 0, 16 + insets.right, 0),<br>    children: cards,<br>  ),<br>);</pre><p>Flutter does not repaint list items while you scroll, so each widget listens to the scroll position and reads its own position after the frame.</p><h3>Where the pill goes on iOS</h3><p>On iPhone Duo, iOS keeps a column on the camera side for the camera and status icons and puts vertical bars in it, right below them. Then it pads the content away from that whole column, top to bottom, which leaves an empty strip under the bar. With FloatAround the obstacle is just the status block plus the pill, so rows reclaim that column everywhere below the pill. On iPad the pill follows the system sidebar on the leading edge. The Flutter example does both.</p><h3>Trying it in a real app</h3><p>A demo is the easy part. To see if the idea holds up, I put it into Hafiz, my Quran memorization app, which has a long home screen of cards and a two-column surah index on tablets. The full-height rail became a floating pill with the main destinations and a “More” button for the rest, and the avoidance went into the two shared list containers, so no individual card had to change. Phones are untouched: without a pill, every row stays exactly as it was.</p><p>The code, sample apps with an on/off switch, and the tests are on GitHub: <a href="https://github.com/moatazhamada/FloatAround">github.com/moatazhamada/FloatAround</a></p><p>I also wrote the idea up as a short paper, with the algorithm, the element roles and related work: <a href="https://doi.org/10.5281/zenodo.24144275">doi.org/10.5281/zenodo.24144275</a></p><h3>Has this been done before?</h3><p>Parts of it, yes, and it is worth knowing where it comes from.</p><ul><li><strong>Text exclusion paths.</strong> Apple’s TextKit (NSTextContainer.exclusionPaths) and CSS shape-outside wrap lines of text around a shape. Same intuition, but for text only and not tied to scrolling.</li><li><strong>Background extension on iPadOS.</strong> Content slides under the floating sidebar and the system blurs a mirrored copy. Great for imagery, but nothing moves aside.</li><li><strong>Window inset rulers in Compose.</strong> WindowInsetsRulers and Modifier.fitInside let a layout fit inside a region. They are not designed for elements inside a scrolling list, which is exactly where this problem lives.</li></ul><p>I could not find anything that does per-element, scroll-linked avoidance for general UI. If you know of one, tell me in the comments.</p><h3>Limits</h3><ul><li>A paragraph that gets narrower can wrap to an extra line, which pushes the rows below it. In practice the feather makes this gradual, but it is real.</li><li>Position is read after layout, so a row reacts to where it was in the previous frame. At normal scroll speeds I have not been able to see it.</li><li>I have not run a user study. It feels better to me, which is not the same thing as being better.</li></ul><h3>Try it</h3><ul><li>Compose: implementation(&quot;com.github.moatazhamada:FloatAround:0.2.0&quot;) from JitPack</li><li>Flutter: float_around: ^0.2.0 (<a href="https://pub.dev/packages/float_around">flutter pub add float_around</a>)</li></ul><p>Install a sample on a tablet or a foldable emulator, open it unfolded, flip the “Avoidance on/off” chip and scroll. If you build floating navigation into your own app I would love to see how it looks there.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c5cf3f5ce441" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Stopped Duplicating AI Skills Across Claude Code, Cursor, Codex, Gemini CLI, and Other Tools]]></title>
            <link>https://medium.com/@motazhamada/how-i-stopped-duplicating-ai-skills-across-claude-code-cursor-codex-gemini-cli-and-other-tools-6ce31ad10ca4?source=rss-f022f1ccdfaf------2</link>
            <guid isPermaLink="false">https://medium.com/p/6ce31ad10ca4</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[ai-skills]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[cli]]></category>
            <dc:creator><![CDATA[Moataz Mohamed]]></dc:creator>
            <pubDate>Mon, 22 Jun 2026 15:45:08 GMT</pubDate>
            <atom:updated>2026-06-22T15:45:08.612Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pX_rQcOUCdxDaj395B4Utg.png" /></figure><p>Has anyone else ended up maintaining the same AI skill in multiple places?</p><p>I use Claude Code, Codex, Cursor, Gemini CLI, Kimi, and several other AI tools.</p><p>Over time I accumulated a huge collection of skills and workflows.</p><p>The annoying part wasn’t creating them.</p><p>It was keeping them synchronized.</p><p>A skill would exist in one format for Claude Code, another for Cursor, another for Gemini, and so on.</p><p>Eventually I got tired of duplicating everything and built an open-source project called AI Omni Skills.</p><p>The idea is to keep a single source of truth and generate the formats required by different AI tools.</p><p>Now I update a skill once and regenerate whatever structure a specific tool expects.</p><p>I’m curious:</p><ul><li>How are you managing skills today?</li><li>Are you duplicating them across tools?</li><li>What integrations would you want to see?</li></ul><p>Repo: <a href="https://github.com/moatazhamada/ai-omni-skills">https://github.com/moatazhamada/ai-omni-skills</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ce31ad10ca4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>