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


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="sevenseacat" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sevenseacat/120/23153_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  sevenseacat
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Author of Ash Framework</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="AHBruns" data-post="20" data-topic="72106">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/ahbruns/48/27529_2.png" class="avatar"> AHBruns:</div>
<blockquote>
<p>E.g. if an input is focused it will ignore any updates from the server, this breaks ui = f(state) in a really profound way.</p>
</blockquote>
</aside>
<p>wait, if I’m actively focused and typing in an input, the server should just be able to update that input right under me? I think if I ever saw that, I’d consider it a bug</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="382305" data-batch-url="/posts/batch_likers">
                        2
                      </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/option-to-pass-a-no-daisy-flag-when-creating-a-new-phoenix-project/72106/23">Post #22</a>
	                </div>
	            </div>
              <div id="likers-container-382305" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="382305"
                     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 #22"></div>
  </section>
</div>
    <div class="postbit" id="382306" data-post-id="382306">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>No, that’s not what I described.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="382306" 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/option-to-pass-a-no-daisy-flag-when-creating-a-new-phoenix-project/72106/24">Post #23</a>
	                </div>
	            </div>
              <div id="likers-container-382306" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="382306"
                     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 #23"></div>
  </section>
</div>
    <div class="postbit" id="382307" data-post-id="382307">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="garrison" data-post="21" data-topic="72106">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/g/3bc359/48.png" class="avatar"> garrison:</div>
<blockquote>
<p>Strangely it is actually possible, as after a week of wasting my time thinking about it I realized that you can abuse the client-side <code>phx-remove</code> binding to run a callback on the server. Utterly cursed, of course.</p>
</blockquote>
</aside>
<p>I wrote a framework for data loading and injection à la React Query (now TanStack Query I think) that had to solve this exact problem. The issue with phx-remove is that it’s not called when a parent of a component that has phx-remove is removed. It’s only called when the component is removed directly. The more reliable, though equally silly solution is to use the internal telemetry event that live view emits when it removes a component. That was added relatively recently though.</p>
<p>Before that I was doing some process state dark magic to make every component that read data record itself in a lookup table then after every render I checked which components that “should” have rendered didn’t. It work reliably, but trying to explain to people the value of such a library was too draining. It was/is called LiveQuery if you’re interested.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="382307" data-batch-url="/posts/batch_likers">
                        2
                      </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/option-to-pass-a-no-daisy-flag-when-creating-a-new-phoenix-project/72106/25">Post #24</a>
	                </div>
	            </div>
              <div id="likers-container-382307" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="382307"
                     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 #24"></div>
  </section>
</div>
    <div class="postbit" id="382308" data-post-id="382308">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="garrison" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  garrison
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I guess this hinges on what “can be fixed” actually means. I understood what you’re suggesting but it makes me uncomfortable.</p>
<p>For example, take a simple controlled component that just upcases its input. With latency, your solution would produce:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">f -&gt; F -&gt; Fo -&gt; FO -&gt; FOo -&gt; FOO
</code></pre>
<p>With more latency:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">foo -&gt; FOO
</code></pre>
<p>Note that this simple case is in fact conflict-free and will always converge to the correct solution. But it displays intermediate states that are <em>not valid</em> under the user’s expectation, which is that the contents of the input should always be uppercase.</p>
<p>They might make a valid CRDT if you declare that those states are valid under the rules of your CRDT (you can make up any rules!), but in practice I think you will have a hard time designing a <em>general</em> API that solves this problem. The fact that “multiplayer editing” solutions are often extremely domain-specific is a good hint.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="382308" 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/option-to-pass-a-no-daisy-flag-when-creating-a-new-phoenix-project/72106/26">Post #25</a>
	                </div>
	            </div>
              <div id="likers-container-382308" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="382308"
                     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 #25"></div>
  </section>
</div>
    <div class="postbit" id="382309" data-post-id="382309">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="garrison" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  garrison
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="AHBruns" data-post="25" data-topic="72106">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/ahbruns/48/27529_2.png" class="avatar"> AHBruns:</div>
<blockquote>
<p>The issue with phx-remove is that it’s not called when a parent of a component that has phx-remove is removed.</p>
</blockquote>
</aside>
<p>That’s ridiculous and should be considered a bug.</p>
<aside class="quote no-group" data-username="AHBruns" data-post="25" data-topic="72106">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/ahbruns/48/27529_2.png" class="avatar"> AHBruns:</div>
<blockquote>
<p>The more reliable, though equally silly solution is to use the internal telemetry event that live view emits when it removes a component.</p>
</blockquote>
</aside>
<p>Huh, the more you know. But like you I simply refuse to live 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="382309" 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/option-to-pass-a-no-daisy-flag-when-creating-a-new-phoenix-project/72106/27">Post #26</a>
	                </div>
	            </div>
              <div id="likers-container-382309" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="382309"
                     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 #26"></div>
  </section>
</div>
    <div class="postbit" id="382310" data-post-id="382310">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I mean, yeah, you can’t magically make latency go away. If the sever is responsible for updating, you gotta wait for a round trip to see the result. That said, with normal typing speed you’d probably get</p>
<p>“f” → “fo” → “foo” → “FOO”</p>
<p>because the sever replies would always be behind until the user stopped typing. In this case I’d probably just suggest the client do the upcasing though.</p>
<p>The place where this comes in handy is places like live updating select inputs where you can search for options and that hits the DB. That fundamentally doesn’t work with vanilla live view. You’ll notice all the libraries (aka LiveSelect) that try to do it end up exposing imperative APIs to update the options (e.g. you have to call send_update).</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="382310" 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/option-to-pass-a-no-daisy-flag-when-creating-a-new-phoenix-project/72106/28">Post #27</a>
	                </div>
	            </div>
              <div id="likers-container-382310" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="382310"
                     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 #27"></div>
  </section>
</div>
    <div class="postbit" id="382311" data-post-id="382311">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="garrison" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  garrison
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>What I’m getting at is there are classes of problem for which something like <code>foo -&gt; FOO</code> is an unacceptable (i.e. broken) solution, and this cannot be fixed in general. You can make latency <em>very small</em> by rendering on the client and this is exactly what e.g. React does by default. This is not an <em>accident</em> btw, modern React has an engine that is entirely capable of running asynchronously and the fact that input events trigger a synchronous render is an <em>intentional choice</em>, because otherwise you would have <em>exactly</em> this problem.</p>
<p>LiveView could fix a lot of things, just not this one particular thing. Maybe there is some API that would make it <em>less</em> bad, though. Personally I think it would be better to always client-render components for which this is a concern (also an imperfect solution).</p>
<aside class="quote no-group" data-username="AHBruns" data-post="28" data-topic="72106">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/ahbruns/48/27529_2.png" class="avatar"> AHBruns:</div>
<blockquote>
<p>The place where this comes in handy is places like live updating select inputs where you can search for options and that hits the DB.</p>
</blockquote>
</aside>
<p>Note that this is an edge case where users have been extensively trained to accept the unnatural idea that search results are out of date for the query they’re typing.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="382311" 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/option-to-pass-a-no-daisy-flag-when-creating-a-new-phoenix-project/72106/29">Post #28</a>
	                </div>
	            </div>
              <div id="likers-container-382311" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="382311"
                     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 #28"></div>
  </section>
</div>
    <div class="postbit" id="382313" data-post-id="382313">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Yeah, that’s fair. I would agree, logic that doesn’t need to be run on the server should be run on the client, but self proclaimed backend devs don’t like to write JS, and so users suffer…</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="382313" 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/option-to-pass-a-no-daisy-flag-when-creating-a-new-phoenix-project/72106/30">Post #29</a>
	                </div>
	            </div>
              <div id="likers-container-382313" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="382313"
                     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 #29"></div>
  </section>
</div>
    <div class="postbit" id="382314" data-post-id="382314">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I think your discussion should be moved to an own topic.</p>
<p>It doesn’t have very much to do with “should the installer have a no daisy flag” IMO.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="382314" 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/option-to-pass-a-no-daisy-flag-when-creating-a-new-phoenix-project/72106/31">Post #30</a>
	                </div>
	            </div>
              <div id="likers-container-382314" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="382314"
                     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 #30"></div>
  </section>
</div>
    <div class="postbit" id="382316" data-post-id="382316">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Should it have a flag? Always</p>
<p>But let’s nog forget that a larger project is made once in a while while hobby projects are made al the time (POC included). So having it as default saves a lot of time compared to to not having it.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="382316" 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/option-to-pass-a-no-daisy-flag-when-creating-a-new-phoenix-project/72106/32">Post #31</a>
	                </div>
	            </div>
              <div id="likers-container-382316" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="382316"
                     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 #31"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/72106/load_more?page=4">Load more posts (35 remaining)</a>
</div></template></turbo-stream>