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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thank you. I am working on a reboot of that one. Back when I did it I was new to LiveView and there are things I would like to do differently now- both in backend and frontend.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="226621" 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/surface-a-component-based-library-for-phoenix-liveview/27671/174">Post #173</a>
	                </div>
	            </div>
              <div id="likers-container-226621" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="226621"
                     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 #173"></div>
  </section>
</div>
    <div class="postbit" id="226622" data-post-id="226622">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I was working on this one for Spawnfest. (That code isn’t as polished… yet)</p>
<p><a href="https://github.com/spawnfest/lotus" class="onebox" target="_blank" rel="noopener nofollow ugc">https://github.com/spawnfest/lotus</a></p>
<p>While it was planned and done in the span of 48 hours, I realize given time and guidance i can pull if off. I will be using the Covid19 Dashboard reboot as test-bed for that. UIKit is a great UI framework and getting a Surface wrapper for it was easier than I feared.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="226622" 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/surface-a-component-based-library-for-phoenix-liveview/27671/175">Post #174</a>
	                </div>
	            </div>
              <div id="likers-container-226622" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="226622"
                     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 #174"></div>
  </section>
</div>
    <div class="postbit" id="226726" data-post-id="226726">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hey! This sounds excellent! Note that I hit an error following the instructions in the readme. Using a Mac, recent elixir/erlang, I do “mix deps.get”, then “mix dev” and it ends like this:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">Generated surface_catalogue app
** (ArgumentError) unknown application: :lotus
    (elixir 1.12.3) lib/application.ex:893: Application.app_dir/1
    (surface 0.5.0) lib/mix/tasks/compile/surface.ex:139: Mix.Tasks.Compile.Surface.app_modules/1
    (surface 0.5.0) lib/mix/tasks/compile/surface.ex:59: anonymous fn/2 in Mix.Tasks.Compile.Surface.get_colocated_assets/0
    (elixir 1.12.3) lib/enum.ex:2385: Enum."-reduce/3-lists^foldl/2-0-"/3
    (surface 0.5.0) lib/mix/tasks/compile/surface.ex:16: Mix.Tasks.Compile.Surface.run/1
    (mix 1.12.3) lib/mix/task.ex:394: anonymous fn/3 in Mix.Task.run_task/3
    (mix 1.12.3) lib/mix/tasks/compile.all.ex:92: Mix.Tasks.Compile.All.run_compiler/2
    (mix 1.12.3) lib/mix/tasks/compile.all.ex:72: Mix.Tasks.Compile.All.compile/4
</code></pre>
<p>However, notwithstanding that, this sounds really interesting. I think surface potentially makes for the ultimate “wiki” language. I’ve been chasing various ideas for static websites for many years, and it’s always a problem to use wiki shortcuts as you inevitably get boxed in when you want to wrap more complex UI components. The surface approach is great for hiding all the implementation details within the fewest XML alike enclosing blocks.</p>
<p>How do you rate UIKit vs Bulma/Bootstrap for this use case though? There seems like a reasonable amount of overlap? I’m not familiar with UIKit, what is it’s advantage?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="226726" 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/surface-a-component-based-library-for-phoenix-liveview/27671/176">Post #175</a>
	                </div>
	            </div>
              <div id="likers-container-226726" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="226726"
                     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 #175"></div>
  </section>
</div>
    <div class="postbit" id="226730" data-post-id="226730">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Which means I did a pretty bad job at writing that Readme :facepalm: I’ll get back to you later today on 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="226730" 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/surface-a-component-based-library-for-phoenix-liveview/27671/177">Post #176</a>
	                </div>
	            </div>
              <div id="likers-container-226730" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="226730"
                     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 #176"></div>
  </section>
</div>
    <div class="postbit" id="227691" data-post-id="227691">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Is rendering a Phoenix Component in a Surface View possible?</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule AppWeb.Shared do
   def logo(assigns)
        &lt;img src={Routes.static_path(@conn, "/images/logo.svg")}/&gt;
   end
end

defmodule AppWeb.Shared.Components.Navbar do
   use AppWeb, :surface_component
  
   def render(assigns) do
    ~F"""
        &lt;.AppWeb.logo /&gt;
    """
   end 
end
</code></pre>
<p>Something like this is possible?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="227691" 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/surface-a-component-based-library-for-phoenix-liveview/27671/178">Post #177</a>
	                </div>
	            </div>
              <div id="likers-container-227691" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="227691"
                     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 #177"></div>
  </section>
</div>
    <div class="postbit" id="227753" data-post-id="227753">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>you have to use the master branch for doing this, as already answered in <a href="https://forum.elixirforum.com/t/surface-a-component-based-library-for-phoenix-liveview/27671/169" rel="nofollow">post 169</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="227753" 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/surface-a-component-based-library-for-phoenix-liveview/27671/179">Post #178</a>
	                </div>
	            </div>
              <div id="likers-container-227753" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="227753"
                     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 #178"></div>
  </section>
</div>
    <div class="postbit" id="227793" data-post-id="227793">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Not sure if they are same. The link you gave suggests that we use sigil F instead of sigil H. Once we use sigil H, that component is not usable in regular heex.<br>
My question was how to use a phoenix component inside surface component.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="227793" 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/surface-a-component-based-library-for-phoenix-liveview/27671/180">Post #179</a>
	                </div>
	            </div>
              <div id="likers-container-227793" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="227793"
                     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 #179"></div>
  </section>
</div>
    <div class="postbit" id="227796" data-post-id="227796">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>ok, this is more or less answered in followup post (170), as the mentioned branch is already merged into master, give it try.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="227796" 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/surface-a-component-based-library-for-phoenix-liveview/27671/181">Post #180</a>
	                </div>
	            </div>
              <div id="likers-container-227796" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="227796"
                     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 #180"></div>
  </section>
</div>
    <div class="postbit" id="227804" data-post-id="227804">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Dear <a class="mention" href="/u/odix67" rel="nofollow">@odix67</a> , Thanks for pointing to the correct resource.<br>
I can confirm that it is indeed working. We can call Phoenix component inside surface component.<br>
For all others, my sincere apology for posting a question with out verifying existing knowledge base.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="227804" 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/surface-a-component-based-library-for-phoenix-liveview/27671/182">Post #181</a>
	                </div>
	            </div>
              <div id="likers-container-227804" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="227804"
                     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 #181"></div>
  </section>
</div>
    <div class="postbit" id="227813" data-post-id="227813">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Can a Surface LiveComponent(or Surface.LiveView) detect the <code>socket.assigns.uploads</code> that LiveView Upload assigns to the socket with <code>allow_uploads()</code>?</p>
<p>I’m making a page where I use the <code>&lt;%= live_file_input @uploads.photo %&gt;</code> tag in a Surface Component and I’m getting this error:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">== Compilation error in file lib/faithful_word_web/components/new_upload_form.ex ==
** (Surface.Compiler.ParseError) lib/faithful_word_web/components/new_upload_form.ex:35:13: expected attribute name
    (surface 0.5.0) lib/surface/compiler/tokenizer.ex:502: Surface.Compiler.Tokenizer.handle_attribute/5
    (surface 0.5.0) lib/surface/compiler/parser.ex:39: Surface.Compiler.Parser.parse!/2
    (surface 0.5.0) lib/surface/compiler.ex:103: Surface.Compiler.compile/5
    (surface 0.5.0) expanding macro: Surface.sigil_F/2
    lib/faithful_word_web/components/new_upload_form.ex:31: FaithfulWordWeb.Components.NewUploadForm.render/1
    (elixir 1.12.2) lib/kernel/parallel_compiler.ex:319: anonymous fn/4 in Kernel.ParallelCompiler.spawn_workers/7
</code></pre>
<p>on the parent page this is the code I use to assign the socket:</p>
<p><code>       {:ok, allow_upload(socket, :photo, accept: ~w(.png .jpg .jpeg), external: &amp;presign_entry/2), temporary_assigns: [posts: [], new_posts: [], new_media_items: []]}</code></p>
<p>and inside the ~F"“” body I have:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">&lt;NewUploadForm id="new-upload-form" submit="upload_submit" uploads={@uploads} /&gt;
</code></pre>
<p><code>new_upload_form.ex</code>:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule FaithfulWordWeb.Components.NewUploadForm do
  use Surface.LiveComponent

  alias FaithfulWordWeb.Components.{
    Button
  }

  alias Surface.Components.{
    Form
  }

  alias Surface.Components.Form.{
    Field,
    TextInput,
    Select,
  }

  @doc "Post data"
  prop uploads, :map, required: true

  @doc "On form submit event"
  prop submit, :event, required: true

  def render(assigns) do
    ~F"""
    &lt;Form for={:uploads} submit={@submit} class="rounded-xl shadow-xl overflow-hidden bg-gray-700"&gt;
      &lt;div class="flex flex-row"&gt;
        &lt;div class="flex-1 px-4 py-3 border-none text-sm font-medium placeholder-gray-400 text-white bg-gray-700 rounded-none group outline-none focus:outline-none focus:ring-0 w-full"&gt;
          &lt;%= live_file_input @uploads.photo %&gt;
        &lt;/div&gt;
        &lt;Button type="submit" class="rounded-none bg-gray-700 hover:bg-gray-600"&gt;Upload&lt;/Button&gt;
      &lt;/div&gt;
    &lt;/Form&gt;
    """
  end

end

</code></pre>
<p>dependencies:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">  phoenix 1.6.0
  phoenix_ecto 4.3.0
  phoenix_html 3.0.0 RETIRED!
    (security) The :class attribute in content_tag and in class={@class} for HEEx is not escaped against XSS
  phoenix_live_dashboard 0.5.0
  phoenix_live_reload 1.3.3
  phoenix_live_session 0.1.3
  phoenix_live_view 0.16.0
  phoenix_pubsub 2.0.0
  phoenix_view 1.0.0
  surface 0.5.0
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="227813" 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/surface-a-component-based-library-for-phoenix-liveview/27671/183">Post #182</a>
	                </div>
	            </div>
              <div id="likers-container-227813" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="227813"
                     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 #182"></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/27671/load_more?page=19">Load more posts (34 remaining)</a>
</div></template></turbo-stream>