Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare release 0.8 #42

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,12 @@ Releasing new bundle (meant to compile it in `v0.6.1`).
- Big fix to longstanding issue where toasts don't work properly across navigations: #28
- Added gettext internationalization from #16 (thanks @elephantoss)
- A couple other random cleanups and docs changes.

## [v0.8.0] (2024-02-14) ❤️

- Fixed typespecs from #26 (thanks @wkirschbaum)
- Added `:top_center` and `:bottom_center` positions in #29 (thanks @nallwhy)
- Feature: infinite duration toasts from #31 (thanks @vanderhoop)
- Readme fixes in #32
- Fix earlier weirdness with gettext usage in 0.7.0 in #34 (thanks @neilberkman)
- Fix docs source ref in #39 (thanks @Flo0807)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ application:
```elixir
def deps do
[
{:live_toast, "~> 0.7"}
{:live_toast, "~> 0.8.0"}
]
end
```
Expand Down
2 changes: 1 addition & 1 deletion demo/lib/demo_web/components/core_components.ex
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ defmodule DemoWeb.CoreComponents do
]}
{@rest}
>
<%= render_slot(@inner_block) %>
{render_slot(@inner_block)}
</button>
"""
end
Expand Down
4 changes: 1 addition & 3 deletions demo/lib/demo_web/components/layouts/app.html.heex
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,5 @@
[]
end
}
/>

<%= @inner_content %>
/> {@inner_content}
</div>
4 changes: 2 additions & 2 deletions demo/lib/demo_web/components/layouts/root.html.heex
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="csrf-token" content={get_csrf_token()} />
<.live_title suffix=" · Phoenix Framework">
<%= assigns[:page_title] || "Live Toast" %>
{assigns[:page_title] || "Live Toast"}
</.live_title>
<link
rel="icon"
Expand Down Expand Up @@ -43,7 +43,7 @@
/>
</head>
<body class="h-full flex flex-col bg-white antialiased">
<%= @inner_content %>
{@inner_content}
<footer class="mt-10 px-10 py-6 flex gap-4">
<.link href="https://github.com/srcrip/live_toast" class="text-zinc-700 text-xs">
github
Expand Down
14 changes: 7 additions & 7 deletions demo/lib/demo_web/live/home_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,10 @@ defmodule DemoWeb.HomeLive do
data-part="title"
class="mb-2 flex items-center text-base font-semibold leading-6"
>
<%= @title %>
{@title}
</p>
<p class="text-sm leading-5">
<%= @body %>
{@body}
</p>
</div>
</div>
Expand All @@ -272,10 +272,10 @@ defmodule DemoWeb.HomeLive do
~H"""
<div class="grow flex flex-col items-start justify-center">
<h1 class="mb-2 text-lg font-bold text-zinc-900">
<%= @title %>
{@title}
</h1>
<p class="text-sm font-medium text-indigo-500">
<%= @body %>
{@body}
</p>
</div>
"""
Expand Down Expand Up @@ -308,10 +308,10 @@ defmodule DemoWeb.HomeLive do
clip-rule="evenodd"
/>
</svg>
<%= @title %>
{@title}
</p>
<p class="text-sm leading-5">
<%= @body %>
{@body}
</p>
</div>

Expand All @@ -322,7 +322,7 @@ defmodule DemoWeb.HomeLive do

<p class="w-full mt-2 text-xs font-medium text-gray-500 flex">
<span class="grow text-indigo-600">View details</span>
<span><%= DateTime.utc_now() |> DateTime.to_iso8601() %></span>
<span>{DateTime.utc_now() |> DateTime.to_iso8601()}</span>
</p>
</div>
"""
Expand Down
14 changes: 7 additions & 7 deletions lib/live_toast/components.ex
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ defmodule LiveToast.Components do
{@rest}
>
<%= if @component do %>
<%= @component.(Map.merge(assigns, %{body: msg})) %>
{@component.(Map.merge(assigns, %{body: msg}))}
<% else %>
<div class="grow flex flex-col items-start justify-center">
<p
Expand All @@ -67,17 +67,17 @@ defmodule LiveToast.Components do
]}
>
<%= if @icon do %>
<%= @icon.(assigns) %>
{@icon.(assigns)}
<% end %>
<%= @title %>
{@title}
</p>
<p class="text-sm leading-5">
<%= msg %>
{msg}
</p>
</div>

<%= if @action do %>
<%= @action.(assigns) %>
{@action.(assigns)}
<% end %>
<% end %>
<button
Expand Down Expand Up @@ -148,7 +148,7 @@ defmodule LiveToast.Components do
phx-connected={Utility.hide("#client-error")}
hidden
>
<%= Utility.translate("Attempting to reconnect") %>
{Utility.translate("Attempting to reconnect")}
<Utility.svg name="hero-arrow-path" class="inline-block ml-1 h-3 w-3 animate-spin" />
</.toast>

Expand All @@ -164,7 +164,7 @@ defmodule LiveToast.Components do
phx-connected={Utility.hide("#server-error")}
hidden
>
<%= Utility.translate("Hang in there while we get back on track") %>
{Utility.translate("Hang in there while we get back on track")}
<Utility.svg name="hero-arrow-path" class="inline-block ml-1 h-3 w-3 animate-spin" />
</.toast>
"""
Expand Down
2 changes: 1 addition & 1 deletion lib/live_toast/live_component.ex
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ defmodule LiveToast.LiveComponent do
title={if title, do: Utility.translate(title), else: nil}
target={@myself}
>
<%= Utility.translate(body) %>
{Utility.translate(body)}
</Components.toast>
</div>

Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule LiveToast.MixProject do

use Mix.Project

@version "0.7.0"
@version "0.8.0"

def project do
[
Expand Down
Loading