<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="268809" data-post-id="268809">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="mgwidmann" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/mgwidmann/120/7249_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  mgwidmann
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>This looks cool. I’m trying to figure out if I can use this for a project, but I’m unsure if even live view can do the animation I want. Basically, I need to make a cell of a table scale in and out when the value inside the table cell changes. The css to animate is pretty simple, something like:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">@keyframes scaleInOut {
    0% {
        transform: scale(1);
        background: white;
    }

    50% {
        transform: scale(1.35);
        /* bg-amber-300 */
        background: rgb(252 211 77);
    }

    100% {
        transform: scale(1);
        background: white;
    }
}
</code></pre>
<p>But I’m not sure theres a phoenix hook for when an element is updated, not at least one we can get on the server side from what I can tell.</p>
<p>Only thing I can think to do is track the change on the server side and add the class, then in a second or so remove the class later. Seems overkill and maybe better to just do it with javascript. Any ideas? Will LiveMotion be able to do something like this?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="268809" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/livemotion-high-performance-animations-for-phoenix-liveview/47165/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-268809" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="268809"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #11"></div>
  </section>
</div>
    <div class="postbit" id="269832" data-post-id="269832">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="benlime" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/benlime/120/5858_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  benlime
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hey, sorry for replying so late. I added a little sample project on how you could make it work.</p>
<p>You can see/run the code directly here using Gitpod - <a href="https://gitpod.io/#https://github.com/benvp/live_motion/tree/update-animation" rel="noopener nofollow ugc">Open Workspace</a>. When opened, navigate to <code>/content-update</code></p>
<p>Alternative the code is on github <a href="https://github.com/benvp/live_motion_examples/commit/ecee0db3d0e7ab618243d79fb8d0fb0d91e4bbd6" class="inline-onebox" rel="noopener nofollow ugc">update example · benvp/live_motion_examples@ecee0db · GitHub</a></p>
<p><a href="https://media.cleanshot.cloud/media/26144/IyvKow9gozS2jctkKmdt34ayjOQP9z6uXLU0gP6p.gif?Expires=1669832435&amp;Signature=ccLZP9Eq4fclkMqLsyzcm2s34eizkQVdP3L~TSQqZ2qY3dADf12llJSNH1yjoHBl~det9EPT2DXg43GjnZty5X1MalxkWO4DO1saKtRvFzNt0ClokUetlz5DTbw7QYM6jq4ypTh~bju1Skza6ngGWxgfnmUjWEV9VNq-oKOYNDaeWyTHHSV7techqF2Iek0APPSSWUCKs~snpfOVLxP4z0J4yzOHg6ZhU3ggkB~Mg~Z8iroBgujhEzFOVXtmv4VmX~FxA9r0mmXP1WVUtN34DqNbQTI2a-kblag77u3-8RbXe9cQikIEJsssKR8I1Zxe9VerxBtmFanWDvv8NPH3Lg__&amp;Key-Pair-Id=K269JMAT9ZF4GZ" class="onebox" target="_blank" rel="noopener nofollow ugc">https://media.cleanshot.cloud/media/26144/IyvKow9gozS2jctkKmdt34ayjOQP9z6uXLU0gP6p.gif?Expires=1669832435&amp;Signature=ccLZP9Eq4fclkMqLsyzcm2s34eizkQVdP3L~TSQqZ2qY3dADf12llJSNH1yjoHBl~det9EPT2DXg43GjnZty5X1MalxkWO4DO1saKtRvFzNt0ClokUetlz5DTbw7QYM6jq4ypTh~bju1Skza6ngGWxgfnmUjWEV9VNq-oKOYNDaeWyTHHSV7techqF2Iek0APPSSWUCKs~snpfOVLxP4z0J4yzOHg6ZhU3ggkB~Mg~Z8iroBgujhEzFOVXtmv4VmX~FxA9r0mmXP1WVUtN34DqNbQTI2a-kblag77u3-8RbXe9cQikIEJsssKR8I1Zxe9VerxBtmFanWDvv8NPH3Lg__&amp;Key-Pair-Id=K269JMAT9ZF4GZ</a></p>
<p>Right now I added a separate container for the highlight with an id, which changes when the data updates. This triggers the animation again. I originally had this in the container wrapping the value, but it results in UI flickering and sometimes multiple containers. I’m not sure yet what the cause of this is.</p>
<p>Hope it helps.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="269832" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/livemotion-high-performance-animations-for-phoenix-liveview/47165/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-269832" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="269832"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #12"></div>
  </section>
</div>
    <div class="postbit" id="269834" data-post-id="269834">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="LostKobrakai" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/LostKobrakai/120/3072_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  LostKobrakai
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="benlime" data-post="13" data-topic="47165">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/benlime/48/5858_2.png" class="avatar"> benlime:</div>
<blockquote>
<p>You can see/run the code directly here using Gitpod</p>
</blockquote>
</aside>
<p>This seems to be private.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="269834" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/livemotion-high-performance-animations-for-phoenix-liveview/47165/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-269834" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="269834"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #13"></div>
  </section>
</div>
    <div class="postbit" id="269835" data-post-id="269835">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="benlime" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/benlime/120/5858_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  benlime
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>You need to have a Gitpod account. The repo is publicly available. If you have a (free) gitpod account you can open it up in your browser. Otherwise you can check out <a href="https://github.com/benvp/live_motion_examples" rel="noopener nofollow ugc">this</a> repo locally and run it on your machine.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="269835" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/livemotion-high-performance-animations-for-phoenix-liveview/47165/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-269835" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="269835"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #14"></div>
  </section>
</div>
    <div class="postbit" id="269836" data-post-id="269836">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="LostKobrakai" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/LostKobrakai/120/3072_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  LostKobrakai
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="benlime" data-post="15" data-topic="47165">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/benlime/48/5858_2.png" class="avatar"> benlime:</div>
<blockquote>
<p>Otherwise you can check out <a href="https://github.com/benvp/live_motion_examples" rel="nofollow">this</a> repo locally and run it on your machine.</p>
</blockquote>
</aside>
<p>This also gives me a 404 <img src="https://forum.elixirforum.com/images/emoji/apple/smiley.png?v=15" title=":smiley:" class="emoji" alt=":smiley:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="269836" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/livemotion-high-performance-animations-for-phoenix-liveview/47165/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-269836" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="269836"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #15"></div>
  </section>
</div>
    <div class="postbit" id="269838" data-post-id="269838">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="benlime" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/benlime/120/5858_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  benlime
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Oh boy,… the example repo has been private. No idea why I haven’t made that public. Should work now.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="269838" data-batch-url="/posts/batch_likers">
                        3
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/livemotion-high-performance-animations-for-phoenix-liveview/47165/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-269838" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="269838"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #16"></div>
  </section>
</div>
    <div class="postbit" id="270365" data-post-id="270365">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="mgwidmann" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/mgwidmann/120/7249_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  mgwidmann
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Wow super cool, thanks for the example!</p>
<p>For others coming here later, I made a gif screenshot to see what it does.</p>
<p><img src="https://forum.elixirforum.com/uploads/default/original/3X/d/c/dcf5e736c62f744bc184f3f4312feea3d2dd984c.gif" alt="Screen-Recording-2022-12-03-at-11.07.39-PM" data-base62-sha1="vwHT5TGHqLu5WjnPXKZzCVopiig" width="690" height="251" class="animated"></p>
<p>I was doing this with a phoenix hook before, to add the class (and this works) but I’d much prefer your version so I’ll definitely give this a try. Another one that I am unclear how to do at all with LiveView is animating a row movement in a table which happens from a server side event.</p>
<p>That is, if a table has row A, B and C, then an event server side says the order should be C, B, A, I’d like to animate the movement of those rows instead of just making them appear in their new location. Basically, in your example, just do an <code>Enum.shuffle()</code> on the instead of the 3 columns you have. Is this possible at all with LiveView? I know it will just mutate the DOM directly whereas if you were doing this in JavaScript you’d have to manipulate the <code>top</code> position with the element being <code>absolute</code>ly positioned to put it into its correct location, none of which information we have server side.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="270365" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/livemotion-high-performance-animations-for-phoenix-liveview/47165/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-270365" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="270365"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>