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


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="grych" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/grych/120/5610_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  grych
                    <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 class="user-title">
									<span>Creator of Drab</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<h3><a name="p-82102-v081-released-1" class="anchor" href="#p-82102-v081-released-1" aria-label="Heading link" rel="nofollow"></a>v0.8.1 released</h3>
<p>A story about rebuilding Live Engine continues, thanks to all the users who find the bugs and share with me! Especially one guy <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p>
<p>But there is a one more thing…</p>
<pre><code>mix drab.install
</code></pre>
<p>Since the beginning, one of Drab’s goals is to encourage beginners to start working with modern web frameworks. I know guys, working in IT, but not professional programmers, who are using only plain php, because <em>frameworks are too complicated</em>. Even those, who made this one more step and moved to CherryPy or even Django, never use async model with partial page updates with Ajax. <em>Ajax is too complicated</em>. It may sound strange for us, who made thousands of Ajax based apps, but believe me, it is true. And here comes Drab, mimicking the standard <code>submit</code> → <code>action</code> model with <code>event</code> → <code>handler</code>.</p>
<p>But there is also an another barrier: complexity of installing stuff***. Someone read about Phoenix and Drab, want to try and start learning, but he can see the <code>INSTALLATION.md</code> with bullets, <code>use Drab.Socket</code> mambo-jumbo. Many people give up at this point. Now the entry level is lowered to few simple steps:</p>
<pre><code>mix phx.new myapp
cd myapp
vi mix.exs
mix deps.get
mix drab.install
</code></pre>
<p>In the future, may it be good to add <code>--with-drab</code> option to <code>mix phx.new</code>?</p>
<p>***) This is also I am still using Floki, even if there are better alternatives (<a class="mention" href="/u/f34nk" rel="nofollow">@f34nk</a>’s one, for example). You need to have compilers, rusts, etc, etc - too complex for a beginner. But I am planning to enable it as an option for power users, so you always could choose yourself.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="82102" data-batch-url="/posts/batch_likers">
                        5
                      </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/drab-remote-controlled-frontend-framework-for-phoenix/3277/353">Post #352</a>
	                </div>
	            </div>
              <div id="likers-container-82102" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="82102"
                     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 #352"></div>
  </section>
</div>
    <div class="postbit" id="83660" data-post-id="83660">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hey everyone,<br>
just had my first try today with drab because I think it offers amazing functionality. Many thanks for all that hard work put in!</p>
<p>So, I’m working with contexts in my elixir app and for taking my first steps, I just took a random eex template, in “web/templates/user_assets/”, renamed it with .drab and generated a drab commander with</p>
<pre><code>mix drab.gen.commander UserAssets/Structure
</code></pre>
<p>Drab then did</p>
<pre><code>* creating lib/app_web/commanders/user_assets/structure_commander.ex
</code></pre>
<p>like I assumed, but inside structure_commander.ex the module was created as:</p>
<pre><code>defmodule AppWeb.StructureCommander do
</code></pre>
<p>missing the context name in between. Is this desired for any reason?</p>
<p>– edit<br>
Created an Issue at <a href="https://github.com/grych/drab/issues/142" rel="noopener nofollow ugc">Issue142</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="83660" 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/drab-remote-controlled-frontend-framework-for-phoenix/3277/354">Post #353</a>
	                </div>
	            </div>
              <div id="likers-container-83660" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="83660"
                     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 #353"></div>
  </section>
</div>
    <div class="postbit" id="83662" data-post-id="83662">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="grych" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/grych/120/5610_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  grych
                    <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 class="user-title">
									<span>Creator of Drab</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hi <a class="mention" href="/u/sorebrez" rel="nofollow">@Sorebrez</a>,<br>
this is a bug in the generator, actually I did not think about nested modules while creating this task…<br>
Could you please open an issue in github, so it will not be forgotten?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="83662" 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/drab-remote-controlled-frontend-framework-for-phoenix/3277/355">Post #354</a>
	                </div>
	            </div>
              <div id="likers-container-83662" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="83662"
                     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 #354"></div>
  </section>
</div>
    <div class="postbit" id="84908" data-post-id="84908">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="grych" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/grych/120/5610_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  grych
                    <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 class="user-title">
									<span>Creator of Drab</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<h3><a name="p-84908-v082-is-out-1" class="anchor" href="#p-84908-v082-is-out-1" aria-label="Heading link" rel="nofollow"></a>v0.8.2 is out</h3>
<p>In preparations to <a href="https://github.com/grych/drab/issues/127" rel="noopener nofollow ugc">the final API</a>, there are new functions <code>poke!</code> and <code>peek!</code>, throwing exceptions in case of disconnection. I did not change the API yet, so old <code>poke</code> and <code>peek</code> behaves as previous, but they are raising depreciation warnings.</p>
<p>There is a plan to introduce the final API in <code>0.9.0</code>, which will probably be the next release in a couple of weeks.</p>
<p>Take a look at the <a href="https://github.com/grych/drab/releases/tag/v0.8.2" rel="noopener nofollow ugc">release notes</a>, as many more changes and fixes are covered in this release.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="84908" data-batch-url="/posts/batch_likers">
                        4
                      </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/drab-remote-controlled-frontend-framework-for-phoenix/3277/356">Post #355</a>
	                </div>
	            </div>
              <div id="likers-container-84908" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="84908"
                     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 #355"></div>
  </section>
</div>
    <div class="postbit" id="85644" data-post-id="85644">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="grych" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/grych/120/5610_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  grych
                    <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 class="user-title">
									<span>Creator of Drab</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<h2><a name="p-85644-drab-news-1" class="anchor" href="#p-85644-drab-news-1" aria-label="Heading link" rel="nofollow"></a>Drab news</h2>
<p>Last few months I’ve been busy with refactoring, bug fixing, depreciating, etc, etc. Not very exciting stuff <img src="https://forum.elixirforum.com/images/emoji/apple/wink.png?v=15" title=":wink:" class="emoji" alt=":wink:" loading="lazy" width="20" height="20"> and most of the announcement I’ve posted here was about <em>Drab.Live engine refactored, again</em> or <em>getting closer to stable version</em>. Let me introduce next releases, which will contain a little bit more interesting features.</p>
<h3><a name="p-85644-upcomping-v083-in-internal-tests-now-coming-next-week-2" class="anchor" href="#p-85644-upcomping-v083-in-internal-tests-now-coming-next-week-2" aria-label="Heading link" rel="nofollow"></a>Upcomping v0.8.3 (in internal tests now, coming next week)</h3>
<p>This release will go with two features, making life easier, especially for the newcomers to Phoenix.</p>
<h4><a name="p-85644-runtime-subscribe-to-external-topics-3" class="anchor" href="#p-85644-runtime-subscribe-to-external-topics-3" aria-label="Heading link" rel="nofollow"></a>Runtime subscribe to external topics</h4>
<p>Finally, you are not limited to the compile-time topic you’ve set with <code>broadcasting/1</code> macro in the commander. Now you can <code>subscribe/2</code> to the external topic, receiving broadcasts sent to it.</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">      iex&gt; subscribe(socket, same_action(MyApp.MyController, :index))
      :ok
      iex&gt; subscribe(socket, same_topic("product_#{42}"))
      :ok 
</code></pre>
<h4><a name="p-85644-conveniences-for-phoenixpresence-4" class="anchor" href="#p-85644-conveniences-for-phoenixpresence-4" aria-label="Heading link" rel="nofollow"></a>Conveniences for <code>Phoenix.Presence</code></h4>
<p>If configured (it is disabled by default), tracks the user presence on the topic. As an example, let’s display the number of connected users, live:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">      defmodule MyAppWeb.MyCommander
        use Drab.Commander
        import Drab.Presence

        broadcasting "global"
        onconnect :connected
        ondisconnect :disconnected

        def connected(socket) do
          broadcast_html socket, "#number_of_users", count_users(socket)
        end

        def disconnected(_store, _session) do
          topic = same_topic("global")
          broadcast_html topic, "#number_of_users", count_users(topic)
        end
      end
</code></pre>
<p>Actually, the similar code is already running on the <a href="https://tg.pl/drab" rel="noopener nofollow ugc">Drab page</a>. See the number in the upper right! And notice that is is actually showing the number of distinct browsers connected to the page. Yeah, Drab sets the browser UUID and stores it in the local storage. This is for anonymous pages, but you may track the presence also based on the user ID, stored in the session, with simple <code>config :drab, :presence, id: :current_user_id</code>.</p>
<h3><a name="p-85644-upcomping-v090-5" class="anchor" href="#p-85644-upcomping-v090-5" aria-label="Heading link" rel="nofollow"></a>Upcomping v0.9.0</h3>
<p>This will (hopefully) be the last API-chaning and breaking release before 1.0. Lots of depreciations, <a href="https://github.com/grych/drab/issues/127" rel="noopener nofollow ugc">core API changes</a>, so it might be painful for existing users, but it is worth. The goal is the holy grail for open source projects, <strong>v1.0</strong>.</p>
<h3><a name="p-85644-beyond-v10-6" class="anchor" href="#p-85644-beyond-v10-6" aria-label="Heading link" rel="nofollow"></a>Beyond v1.0</h3>
<p>After reaching the grail, I plan to focus on the education material, like docs, example page and the beginners guide to elixir |&gt; phoenix |&gt; drab. The goal is to convince more beginners that web programming of living pages does not have to be scary and painful</p>
<p>Then I’ll rest.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="85644" data-batch-url="/posts/batch_likers">
                        6
                      </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/drab-remote-controlled-frontend-framework-for-phoenix/3277/357">Post #356</a>
	                </div>
	            </div>
              <div id="likers-container-85644" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="85644"
                     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 #356"></div>
  </section>
</div>
    <div class="postbit" id="85645" data-post-id="85645">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="grych" data-post="357" data-topic="3277">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/grych/48/5610_2.png" class="avatar"> grych:</div>
<blockquote>
<p>Then I’ll rest.</p>
</blockquote>
</aside>
<p>Lol, nope never.  <img src="https://forum.elixirforum.com/images/emoji/apple/wink.png?v=15" title=":wink:" class="emoji" alt=":wink:" 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="85645" 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/drab-remote-controlled-frontend-framework-for-phoenix/3277/358">Post #357</a>
	                </div>
	            </div>
              <div id="likers-container-85645" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="85645"
                     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 #357"></div>
  </section>
</div>
    <div class="postbit" id="86027" data-post-id="86027">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="grych" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/grych/120/5610_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  grych
                    <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 class="user-title">
									<span>Creator of Drab</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Girls and boys,<br>
<a href="https://github.com/grych/drab/releases/tag/v0.8.3" rel="noopener nofollow ugc">v0.8.3</a> has landed.</p>
<p>Upgrading from the previous releases: please ensure you have <code>:main_phoenix_app</code> configured in <code>config.ex</code>. I’ve fixed a terrible bug of how Drab was searching for the application it is joining to.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="86027" data-batch-url="/posts/batch_likers">
                        6
                      </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/drab-remote-controlled-frontend-framework-for-phoenix/3277/359">Post #358</a>
	                </div>
	            </div>
              <div id="likers-container-86027" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="86027"
                     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 #358"></div>
  </section>
</div>
    <div class="postbit" id="86787" data-post-id="86787">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="grych" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/grych/120/5610_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  grych
                    <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 class="user-title">
									<span>Creator of Drab</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<h2><a name="p-86787-v090-breaking-release-1" class="anchor" href="#p-86787-v090-breaking-release-1" aria-label="Heading link" rel="nofollow"></a>v0.9.0 BREAKING RELEASE</h2>
<p>This release introduces the final API. There is no intention to change it, unless very<br>
significant errors are found.</p>
<p>If you are using Drab already, prepare for the changes in the configuration and also in the code.</p>
<h3><a name="p-86787-drablive-api-changed-2" class="anchor" href="#p-86787-drablive-api-changed-2" aria-label="Heading link" rel="nofollow"></a><code>Drab.Live</code> API changed</h3>
<p>As described in <span class="hashtag-raw">#127</span>, API has changed. The most painful change is <code>Drab.Live.peek</code>, as it now<br>
returns <code>{:ok, value}</code> or <code>{:error, why}</code>. Raising <code>Drab.Live.peek</code> is for convinience.</p>
<p><code>Drab.Live.poke</code> returns tuple now as well, to catch update errors or disconnections.</p>
<h3><a name="p-86787-redesigned-drabconfig-3" class="anchor" href="#p-86787-redesigned-drabconfig-3" aria-label="Heading link" rel="nofollow"></a>Redesigned <code>Drab.Config</code></h3>
<p>Since this version, Drab is no longer configured globally. This means that you may use it in the<br>
multiple endpoints environments.<br>
This requires configuration API change. Most of the Drab options are now located under<br>
the endpoint module:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">config :drab, MyAppWeb.Endpoint,
  otp_app: :my_app_web,
  ...
</code></pre>
<p>The endpoint and application name are mandatory.</p>
<p>However, there are still few global options, like <code>:enable_live_scripts</code>. Please read<br>
<a href="https://hexdocs.pm/drab/Drab.Config.html#content" rel="noopener nofollow ugc"><code>Drab.Config</code></a> documentation<br>
for more information.</p>
<p><a href="https://hexdocs.pm/drab/Drab.Config.html" rel="noopener nofollow ugc">Do You Want to Know More?</a></p>
<h3><a name="p-86787-more-api-changes-4" class="anchor" href="#p-86787-more-api-changes-4" aria-label="Heading link" rel="nofollow"></a>More API changes</h3>
<p>All functions returning <code>{:timeout, description}</code> now return just <code>{:error, :timeout}</code>.</p>
<h3><a name="p-86787-undeclared-handler-or-shared-commander-raises-5" class="anchor" href="#p-86787-undeclared-handler-or-shared-commander-raises-5" aria-label="Heading link" rel="nofollow"></a>Undeclared handler or shared commander raises</h3>
<p>All handlers must now be strictly declared by using <code>Drab.Commander.defhandler</code> or<br>
<code>Drab.Commander.public</code> macro.</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defhandler my_handler(socket, payload), do: ..
</code></pre>
<p>or</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">public :my_handler
def my_handler(socket, payload), do: ...
</code></pre>
<p>The same is with shared commanders, if you want to use it, declare it with <code>Drab.Controller</code>:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">use Drab.Controller, commanders: [My.Shared.Commander]
</code></pre>
<h3><a name="p-86787-hard-depreciations-of-various-functions-6" class="anchor" href="#p-86787-hard-depreciations-of-various-functions-6" aria-label="Heading link" rel="nofollow"></a>Hard depreciations of various functions</h3>
<ul>
<li><span class="chcklst-box checked fa fa-square-check-o"></span> Drab.Client.js/2</li>
<li><span class="chcklst-box checked fa fa-square-check-o"></span> Drab.run_handler()</li>
<li><span class="chcklst-box checked fa fa-square-check-o"></span> Drab.Browser.console!/2</li>
<li><span class="chcklst-box checked fa fa-square-check-o"></span> Drab.Browser.redirect_to!/2</li>
<li><span class="chcklst-box checked fa fa-square-check-o"></span> Drab.Core.broadcast_js!/2</li>
</ul>
<h3><a name="p-86787-drab-event-and-drab-handler-combination-no-longer-exists-7" class="anchor" href="#p-86787-drab-event-and-drab-handler-combination-no-longer-exists-7" aria-label="Heading link" rel="nofollow"></a><code>drab-event</code> and <code>drab-handler</code> combination no longer exists</h3>
<p>The existing syntax <code>drab-event</code> and <code>drab-handler</code> is removed. Please use the new syntax of:</p>
<pre><code>&lt;tag drab="event:handler"&gt;
&lt;input drab="focus:input_focus blur:input_blur"
&lt;input drab-focus="input_focus" drab-blur="input_blur"&gt;
</code></pre>
<p><a href="https://hexdocs.pm/drab/Drab.Core.html#module-events" rel="noopener nofollow ugc">Do You Want to Know More?</a></p>
<h3><a name="p-86787-updating-from-v083-8" class="anchor" href="#p-86787-updating-from-v083-8" aria-label="Heading link" rel="nofollow"></a>Updating from &lt;= v0.8.3</h3>
<h4><a name="p-86787-configexs-9" class="anchor" href="#p-86787-configexs-9" aria-label="Heading link" rel="nofollow"></a><code>config.exs</code></h4>
<p>Replace:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">config :drab, main_phoenix_app: :my_app_web, endpoint: MyAppWeb.Endpoint
</code></pre>
<p>with:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">config :drab, MyAppWeb.Endpoint, otp_app: :my_app_web
</code></pre>
<p>Most of the configuration options now must be placed under the endpoint. Please read<br>
<a href="https://hexdocs.pm/drab/Drab.Config.html#content" rel="noopener nofollow ugc"><code>Drab.Config</code></a> documentation for more info.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="86787" data-batch-url="/posts/batch_likers">
                        4
                      </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/drab-remote-controlled-frontend-framework-for-phoenix/3277/360">Post #359</a>
	                </div>
	            </div>
              <div id="likers-container-86787" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="86787"
                     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 #359"></div>
  </section>
</div>
    <div class="postbit" id="86788" data-post-id="86788">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>A question, is there a way to run (javascript or queued command set) code on the client when the connection dies as a fallback that I’m missing?  I want to display the connection is lost and disable some elements when the connection dies (which seems to happen after a few hours (24?) it seems as well as other conditions).</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="86788" 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/drab-remote-controlled-frontend-framework-for-phoenix/3277/361">Post #360</a>
	                </div>
	            </div>
              <div id="likers-container-86788" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="86788"
                     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 #360"></div>
  </section>
</div>
    <div class="postbit" id="86790" data-post-id="86790">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="grych" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/grych/120/5610_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  grych
                    <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 class="user-title">
									<span>Creator of Drab</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>It is not documented (yet), but I was about to publish it as an official API (internally it is used by drab modules). You may register your own callbacks with functions from global <code>Drab</code></p>
<pre data-code-wrap="javascript"><code class="lang-javascript">Drab.on_disconnect(function() {console.log("disconnect");});
</code></pre>
<p>Similar is for <code>on_connect</code> and <code>on_load</code>.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="86790" 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/drab-remote-controlled-frontend-framework-for-phoenix/3277/362">Post #361</a>
	                </div>
	            </div>
              <div id="likers-container-86790" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="86790"
                     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 #361"></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/3277/load_more?page=37">Load more posts (128 remaining)</a>
</div></template></turbo-stream>