View Source Changelog
v1.0.0-rc.3 (20.08.25)
The
:updatemethod will now be able to insert new values into the state.Fixed a bug where attributes with dashes could not be assigned state values.
DOM elements added via DOM Actions now get existing state values injected upon being added.
Fixed a bug where elements with an assigned inner value (
innerText/innerHTML) would not get action listeners parsed properly.Errors are now logged to the browser and server consoles.
The
:debugmethod now also logs to the browser console.Minor documentation changes.
v1.0.0-rc.2 (09.08.25)
Fixed a bug where DOM elements added via actions would not get diffs injected into them.
Renamed the
:forceattribute inTamnoon.DOM.Actions.ToggleAttributeto:force_to.Fixed a bug where DOM elements added via actions would not be able to trigger methods.
Fixed a missing app name injection in the success message for the
Mix.Tasks.Tamnoon.OverrideRoottask.Added a note about setting the
:initial_statewith a function in the docs.Updated the sample apps list.
v1.0.0-rc.1 (30.07.25)
Added DOM Actions: Methods can now return a third argument of actions, which are used to manipulate the DOM in ways that are impossible or convoluted to achieve with the state.
Revamped the documentation.
Methods will now return a tuple of the form
{},{diffs},{diffs, actions}or{diffs, actions, new_state}. For the first two,diffswill automatically be merged into the state.Changed
Tamnoon.Methods.subbed_channels/0to a regular function instead of a method.
Minor changes:
Removed
Tamnoon.MethodManager'sdiff/2function.Changed debug mode to be able to log only the
reqorstate, and changed the debug messages formatting.Changed the default router to use plug's
Plug.Static.Renamed the driver script to tamnoon_driver.js (was ws_connect.js).
Changed methods to accept the
"value"key for the value instead of"val".Changed
subandunsubto accept the channel name via the"channel"key.Fixed a bug where after setting an element's
disabledattribute to a state value, changes to it wouldn't re-enable the element properly.Setting an element's
classto a state value will now not override Tamnoon's listener classes.Silenced the unused variable "state" warnings for methods.
Changed the
rootcomponent that gets generated withMix.Tasks.Tamnoon.OverrideRootto not try rendering anapp.html.heexcomponent by default.Fixed a bug causing
<a>elements to not send their value when triggering a method.Fixed a bug where having a hash (#) in the URL would cause the socket connection to error out.
Renamed the
timeoutparameter ofTamnoon.MethodManager.trigger_method/3totimeout_ms.
v1.0.0-a.5 (13.06.25)
Made Tamnoon HEEx values invertable: for example, assigning @not-some_value to an attribute will turn it
truewhensome_valueisfalse, and vice versa.Added the
tamnoon.setuptask, which runs all recommended tasks for starting a new Tamnoon app.Removed the app-container div from the default root, and fixed the indentation in its HTML.
Fixed a bug where
Tamnoon.MethodManager.defmethod/2caused a no match found error.
Minor changes:
Fixed a bug where live reload did not reload some changes for the client that triggered it.
Removed the (empty) documentation page for the default root component.
Altered the "no method found" error message to be clearer.
Made the
Tamnoon.Componentdocumentation more concise.
v1.0.0-a.4 (05.06.25)
Added live reload. When not disabled, Tamnoon will automatically recompile when new connections are made (including existing connections refreshing the page).
Changed method modules such that now multiple modules are used instead of a singular one. Deprecated the
__using__macro ofTamnoon.Methodsbecause of this too.Added the
tamnoon.override_rootMix task. The task generates a router and a root component for you.Added debug mode. Enabling it will log the payload and current state whenever a method is triggered.
Added
Tamnoon.MethodManager.diff. (Removed in v1.0.0-rc.1)Fixed bugs where unrelated HTML classes interfere with Tamnoon classes.
Added support for setting initial_state as a function, allowing the initial state to be recomputed for every client.
Silenced the unused variable "req" warnings for methods.
v1.0.0-a.3 (25.07.24)
Added support for running Tamnoon over HTTPS.
Added support for Mix Releases (via
Tamnoon.make_release/1).Updated the client script to try reconnecting to the server if it disconnects.
Updated the client script to keep a copy of the state which will be sent to the server on a reconnect. Note: this also means that string keys in the state are now not supported, as the state will have its keys converted to atoms on the reconnect.
Minor changes:
Added deployment guide (WIP)
v1.0.0-a.2 (29.06.24)
Added implicit events: setting an input event attribute (such as onchange) to
@method-keywill make it fire the method with the specified key. The"pub"method can be triggered like so:@pub-[channel]-[method]-[key (optional)].A component with a Tamnoon variable inside it (
<p>@val</p>) will now set the inner text of the element instead of the inner HTML. The inner HTML can be set by prefixing the variable name with "raw-" like so:<p>@raw-val</p>.Added the
mix tamnoon.make_dirstask that creates a "lib/components" directory and a "tamnoon_out" directory.Added
Tamnoon.Compiler.escape_html/1and made it available as<%= h.(content) %>inside components.Completely rewrote the guides, the readme, and revamped some of the existing module documentation.
Minor changes:
Changed the default port to 8000 from 4000.
Fixed "imported function conflicts with local function" when invoking a method handler inside the methods module.
Fixed the client-side handling of updates for elements with the "value" attribute not functioning properly.
Changed the WebSocket script in the root layout to connect to the WebSocket at the current URL (instead of localhost:8000/ws).
Changed
Tamnoon.Compiler.build_from_root/1to no longer accept a WebSocket address.
v1.0.0-a.1 (26.06.24)
Added the sync method (
Tamnoon.Methods.tmnn_sync/2) that returns the current state to the client. By default, it is invoked when the WebSocket connection is opened.Added the keep_alive method (
Tamnoon.Methods.tmnn_keep_alive/2) that is invoked every 55 seconds by the client in order to prevent idle timeouts.Moved the WebSocket connection script to a separate file, and updated the default router (
Tamnoon.Router) to serve a default root layout.
Minor changes:
Changed the console message sent when Tamnoon starts to include the full address.
Changed
Tamnoon.SocketHandler.init/2so connections have a 120 second idle timeout (instead of 60).Changed
Tamnoon.Compiler.render_component/3so using<%= r.(args..) %>will callTamnoon.Compiler.render_component_dyn/1instead ofTamnoon.Compiler.render_component/1, to allow passing in multiple arguments.Added (temporary) documentation.
v1.0.0-a.0 (25.06.24)
Added support for HEEx components and changed the default router to display the root page by default.
v0.1.1
Very minor changes.
v0.1.0
First release.