Drab v0.5.0 Release Notes
-
⚡️ This version is a major update. The default module,
Drab.Query
has been replaced withDrab.Live
andDrab.Element
. Drab is not jQuery dependent by default anymore.Drab.Live
👍 Allows to remotely (from the server side) replace the value of the assign in the displayed paged, without re-rendering and reloading the page.
Such template:
<a href="https://<%= @url%>" @style.backgroundColor=<%= @color%>> <%= @url %> </a>
⚡️ can be updates live with
poke/2
:poke socket, url: "tg.pl/drab", color: "red"
Drab.Element
⚡️ Query and update displayed page from the server side.
set_prop socket, "p", style: %{"backgroundColor" => "red"} # awesome effect
Broadcasting
Broadcasting functions now get
subject
instead ofsocket
. There is no need to have an active socket to broadcast anymore. Useful when broadcasting from background servers orondisconnect
callback.Form parameters in sender
If the event launching element is inside a
<FORM>
, it gets a values of all input elements within that form. This is a map, where keys are the element'sname
orid
.⬆️ Upgrading from 0.4
➕ Add
Drab.Query
andDrab.Modal
to your commanders:use Drab.Commander, module: [Drab.Query, Drab.Modal]
Depreciations
All soft depreciations up to 0.4.1 became hard.