PhoenixKitWeb.Components.MediaBrowser.View (phoenix_kit v2.63.0)

Copy Markdown View Source

The media browser's template and the helpers it draws with.

Split off PhoenixKitWeb.Components.MediaBrowser — the template alone took seconds to compile, and together with the component's event code the module regularly crossed the compiler's "taking more than 10s" notice. Two modules compile in parallel.

MediaBrowser.render/1 calls browser/1 as a plain function with the component's own assigns, so change tracking is exactly what it was with the colocated template.

The biggest parts of the template are function components in modules of their own — MediaBrowser.Header (the hero header and toolbar) and the three views, MediaBrowser.GridView, MediaBrowser.StacksView and MediaBrowser.ListView — each handed every assign it reads by name, so LiveView tracks them per value. What they draw with is MediaBrowser.Helpers.

Summary

Functions

browser(assigns)