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

Updating copy on site & feedback form #593

Merged
merged 11 commits into from
Aug 12, 2023
4 changes: 2 additions & 2 deletions lib/banchan/reports/reports.ex
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,13 @@ defmodule Banchan.Reports do
@doc """
File a bug on GitHub
"""
def report_bug(%User{} = actor, title, body, actor_url_fn) do
def report_bug(%User{} = actor, title, body, bug?, actor_url_fn) do
%{access_token: Application.fetch_env!(:banchan, :github_access_token)}
|> Tentacat.Client.new()
|> Tentacat.Issues.create("BanchanArt", "banchan", %{
title: title,
body: "reported by [@#{actor.handle}](#{actor_url_fn.(actor)}):\n\n#{body}",
labels: ["bug", "from-site"]
labels: ["feedback", "from-site" | if(bug? == "true", do: ["bug"], else: [])]
})
|> case do
{201, %{"html_url" => url}, _} ->
Expand Down
2 changes: 1 addition & 1 deletion lib/banchan_web/components/flash.ex
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ defmodule BanchanWeb.Components.Flash do

def render(assigns) do
~F"""
<div class="flash-container">
<div class="fixed bottom-auto z-20 w-auto w-3/5 translate-y-0 toast toast-center top-20 flash-container">
{#if live_flash(@flashes, :success)}
<div
class="p-2 alert alert-success hover:cursor-pointer"
Expand Down
6 changes: 3 additions & 3 deletions lib/banchan_web/components/form/checkbox.ex
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ defmodule BanchanWeb.Components.Form.Checkbox do
}
opts={@opts}
/>
<div class="px-2 label-text flex flex-row items-center gap-1">
<div class="flex flex-row items-center gap-1 px-2 label-text">
<#slot>{@label}</#slot>
{#if @info}
<div class="tooltip" data-tip={@info}>
<Icon name="info" size="4" label="tooltip" />
<div class="tooltip tooltip-right" data-tip={@info}>
<Icon name="info" size="4" label="tooltip tooltip-right" />
</div>
{/if}
</div>
Expand Down
4 changes: 2 additions & 2 deletions lib/banchan_web/components/form/date_time_local_input.ex
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ defmodule BanchanWeb.Components.Form.DateTimeLocalInput do
<span class="flex flex-row items-center gap-1 label-text">
{@label || Phoenix.Naming.humanize(@name)}
{#if @info}
<div class="tooltip" data-tip={@info}>
<Icon name="info" size="4" label="tooltip" />
<div class="tooltip tooltip-right" data-tip={@info}>
<Icon name="info" size="4" label="tooltip tooltip-right" />
</div>
{/if}
</span>
Expand Down
4 changes: 2 additions & 2 deletions lib/banchan_web/components/form/email_input.ex
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ defmodule BanchanWeb.Components.Form.EmailInput do
<span class="flex flex-row items-center gap-1 label-text">
{@label || Phoenix.Naming.humanize(@name)}
{#if @info}
<div class="tooltip" data-tip={@info}>
<Icon name="info" size="4" label="tooltip" />
<div class="tooltip tooltip-right" data-tip={@info}>
<Icon name="info" size="4" label="tooltip tooltip-right" />
</div>
{/if}
</span>
Expand Down
4 changes: 2 additions & 2 deletions lib/banchan_web/components/form/multiple_select.ex
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ defmodule BanchanWeb.Components.Form.MultipleSelect do
<span class="flex flex-row items-center gap-1 label-text">
{@label || Phoenix.Naming.humanize(@name)}
{#if @info}
<div class="tooltip" data-tip={@info}>
<Icon name="info" size="4" label="tooltip" />
<div class="tooltip tooltip-right" data-tip={@info}>
<Icon name="info" size="4" label="tooltip tooltip-right" />
</div>
{/if}
</span>
Expand Down
4 changes: 2 additions & 2 deletions lib/banchan_web/components/form/number_input.ex
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ defmodule BanchanWeb.Components.Form.NumberInput do
<span class="flex flex-row items-center gap-1 label-text">
{@label || Phoenix.Naming.humanize(@name)}
{#if @info}
<div class="tooltip" data-tip={@info}>
<Icon name="info" size="4" label="tooltip" />
<div class="tooltip tooltip-right" data-tip={@info}>
<Icon name="info" size="4" label="tooltip tooltip-right" />
</div>
{/if}
</span>
Expand Down
4 changes: 2 additions & 2 deletions lib/banchan_web/components/form/quill_input/quill_input.ex
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ defmodule BanchanWeb.Components.Form.QuillInput do
<span class="flex flex-row items-center gap-1 label-text">
{@label || Phoenix.Naming.humanize(@name)}
{#if @info}
<div class="tooltip" data-tip={@info}>
<Icon name="info" size="4" label="tooltip" />
<div class="tooltip tooltip-right" data-tip={@info}>
<Icon name="info" size="4" label="tooltip tooltip-right" />
</div>
{/if}
</span>
Expand Down
4 changes: 2 additions & 2 deletions lib/banchan_web/components/form/select.ex
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ defmodule BanchanWeb.Components.Form.Select do
<span class="flex flex-row items-center gap-1 label-text">
{@label || Phoenix.Naming.humanize(@name)}
{#if @info}
<div class="tooltip" data-tip={@info}>
<Icon name="info" size="4" label="tooltip" />
<div class="tooltip tooltip-right" data-tip={@info}>
<Icon name="info" size="4" label="tooltip tooltip-right" />
</div>
{/if}
</span>
Expand Down
4 changes: 2 additions & 2 deletions lib/banchan_web/components/form/tags_input/tags_input.ex
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ defmodule BanchanWeb.Components.Form.TagsInput do
<span class="flex flex-row items-center gap-1 label-text">
{@label || Phoenix.Naming.humanize(@name)}
{#if @info}
<div class="tooltip" data-tip={@info}>
<Icon name="info" size="4" label="tooltip" />
<div class="tooltip tooltip-right" data-tip={@info}>
<Icon name="info" size="4" label="tooltip tooltip-right" />
</div>
{/if}
</span>
Expand Down
4 changes: 2 additions & 2 deletions lib/banchan_web/components/form/text_input.ex
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ defmodule BanchanWeb.Components.Form.TextInput do
<span class="flex flex-row items-center gap-1 label-text">
{@label || Phoenix.Naming.humanize(@name)}
{#if @info}
<div class="tooltip" data-tip={@info}>
<Icon name="info" size="4" label="tooltip" />
<div class="tooltip tooltip-right" data-tip={@info}>
<Icon name="info" size="4" label="tooltip tooltip-right" />
</div>
{/if}
</span>
Expand Down
4 changes: 2 additions & 2 deletions lib/banchan_web/components/form/textarea.ex
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ defmodule BanchanWeb.Components.Form.TextArea do
<span class="flex flex-row items-center gap-1 label-text">
{@label || Phoenix.Naming.humanize(@name)}
{#if @info}
<div class="tooltip" data-tip={@info}>
<Icon name="info" size="4" label="tooltip" />
<div class="tooltip tooltip-right" data-tip={@info}>
<Icon name="info" size="4" label="tooltip tooltip-right" />
</div>
{/if}
</span>
Expand Down
10 changes: 8 additions & 2 deletions lib/banchan_web/components/layout.ex
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ defmodule BanchanWeb.Components.Layout do
<div>
<span class="opacity-100 footer-title text-primary">Co-op</span>
<LiveRedirect to={Routes.static_about_us_path(Endpoint, :show)} class="link link-hover">About Us</LiveRedirect>
<LiveRedirect to={Routes.static_contact_path(Endpoint, :show)} class="link link-hover">Contact</LiveRedirect>
<LiveRedirect to={Routes.static_membership_path(Endpoint, :show)} class="link link-hover">Membership</LiveRedirect>
<LiveRedirect to={Routes.report_bug_new_path(Endpoint, :new)}>Report Bug</LiveRedirect>
<LiveRedirect to={Routes.static_contact_path(Endpoint, :show)} class="link link-hover">Contact</LiveRedirect>
<LiveRedirect to={Routes.report_bug_new_path(Endpoint, :new)}>Feedback</LiveRedirect>
</div>
<div>
<span class="opacity-100 footer-title text-primary">Legal</span>
Expand Down Expand Up @@ -130,6 +130,12 @@ defmodule BanchanWeb.Components.Layout do
target="_blank"
rel="noopener noreferrer"
><i class="text-xl fab fa-discord" /></a>
<a
href="https://github.com/BanchanArt/banchan"
aria-label="Banchan Art on Github (opens in new tab)"
target="_blank"
rel="noopener noreferrer"
><i class="text-xl fab fa-github" /></a>
</div>
</div>
</footer>
Expand Down
2 changes: 1 addition & 1 deletion lib/banchan_web/components/notifications.ex
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ defmodule BanchanWeb.Components.Notifications do
</button>
</div>
{#if @open}
<div class="absolute right-0 z-30 p-2 origin-top translate-x-px translate-y-px border divide-y-2 border-base-content border-opacity-10 menu rounded-box bg-base-100 w-80 divide-neutral-content divide-opacity-10 text-base-content">
<div class="absolute right-0 z-30 p-2 origin-top translate-x-px translate-y-px border divide-y-2 border-base-content border-opacity-10 menu rounded-box bg-base-100 divide-neutral-content divide-opacity-10 text-base-content">
{#if !@notifications || Enum.empty?(@notifications.entries)}
<div class="px-8 m-2">No notifications</div>
{#else}
Expand Down
14 changes: 7 additions & 7 deletions lib/banchan_web/components/user_handle.ex
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ defmodule BanchanWeb.Components.UserHandle do
<span class={"inline-flex items-center gap-1", @class}>
<strong title={@user.name} class="font-semibold hover:underline">{@user.handle}</strong>
{#if :admin in @user.roles}
<div class="tooltip" data-tip="Admin">
<div class="tooltip tooltip-right" data-tip="Admin">
<Icon name="shield-check" size="4" class="text-error">
</Icon>
</div>
{#elseif :mod in @user.roles}
<div class="tooltip" data-tip="Moderator">
<div class="tooltip tooltip-right" data-tip="Moderator">
<Icon name="gavel" size="4" class="text-warning">
</Icon>
</div>
{#elseif :system in @user.roles}
<div class="tooltip" data-tip="System">
<div class="tooltip tooltip-right" data-tip="System">
<Icon name="bot" size="4" class="text-primary">
</Icon>
</div>
Expand All @@ -44,25 +44,25 @@ defmodule BanchanWeb.Components.UserHandle do
{@user.handle}
</strong>
{#if :admin in @user.roles}
<div class="tooltip" data-tip="Admin">
<div class="tooltip tooltip-right" data-tip="Admin">
<Icon name="shield-check" size="4" class="text-error">
</Icon>
</div>
{#elseif :mod in @user.roles}
<div class="tooltip" data-tip="Moderator">
<div class="tooltip tooltip-right" data-tip="Moderator">
<Icon name="gavel" size="4" class="text-warning">
</Icon>
</div>
{#elseif :system in @user.roles}
<div class="tooltip" data-tip="System">
<div class="tooltip tooltip-right" data-tip="System">
<Icon name="bot" size="4" class="text-primary">
</Icon>
</div>
{/if}
</span>
{#else}
<strong title="User deactivated their account" class="font-semibold">
<div class="tooltip" data-tip="Deactivated">
<div class="tooltip tooltip-right" data-tip="Deactivated">
<Icon name="circle-slash" size="4" class="text-primary">
</Icon>
</div>
Expand Down
19 changes: 13 additions & 6 deletions lib/banchan_web/live/report_bug_live/new.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,24 @@ defmodule BanchanWeb.ReportBugLive.New do
alias Surface.Components.Form

alias BanchanWeb.Components.{Button, Layout}
alias BanchanWeb.Components.Form.{QuillInput, Submit, TextInput}
alias BanchanWeb.Components.Form.{Checkbox, QuillInput, Submit, TextInput}

@impl true
def handle_params(_params, _uri, socket) do
{:noreply, assign(socket, report_url: nil)}
end

@impl true
def handle_event("submit", %{"bug_report" => %{"title" => title, "body" => body}}, socket) do
def handle_event(
"submit",
%{"bug_report" => %{"title" => title, "body" => body, "bug?" => bug?}},
socket
) do
case Reports.report_bug(
socket.assigns.current_user,
title,
body,
bug?,
&Routes.denizen_show_url(Endpoint, :show, &1.handle)
) do
{:ok, url} ->
Expand All @@ -48,13 +53,14 @@ defmodule BanchanWeb.ReportBugLive.New do
<div class="w-full bg-base-200">
<div class="w-full max-w-lg p-10 mx-auto rounded-xl md:my-10 bg-base-200">
{#if @report_url}
<p>Thanks for your bug report! You can view the issue and sign up for updates <a href={@report_url} class="link link-primary">here</a>.</p>
<p>Thanks for your feedback! You can view the issue and sign up for updates <a href={@report_url} class="link link-primary">here</a>.</p>
<Button label="Report Another" click="reset" />
{#else}
<Form class="flex flex-col gap-4" for={%{}} as={:bug_report} submit="submit">
<h1 class="text-2xl">Submit a bug report</h1>
<p>Use this form to submit bug reports for Banchan Art. Please include as much context as you can.</p>
<p><span class="text-error">NOTE: This report will be <span class="font-bold">publicly visible</span> on GitHub. Do NOT include anything personal or confidential</span></p>
<h1 class="text-2xl">Submit feedback</h1>
<p>To submit feedback for Banchan Art, you may use this form or <a href="https://github.com/BanchanArt/banchan/issues/new/choose" class="link">Github</a>. Please include as much context as you can.</p>
<p>You may view existing issues using our <a href="https://github.com/BanchanArt/banchan/issues" class="link">Github issues page.</a></p>
<p><span class="text-error">NOTE: This feedback will be <span class="font-bold">publicly visible</span> on GitHub. Do NOT include any personal or confidential information.</span></p>
<p>If you need support for something that shouldn't be public, please contact us at <a href="mailto:[email protected]" class="link">[email protected]</a>.</p>
<TextInput name={:title} label="Title" opts={required: true, maxlength: "256", minlength: "10"} />
<QuillInput
Expand All @@ -63,6 +69,7 @@ defmodule BanchanWeb.ReportBugLive.New do
label="Body"
opts={required: true, maxlength: "2000", minlength: "30"}
/>
<Checkbox name={:bug?} label="Bug Report" opts={"aria-label": "Bug Report"} />
<Submit />
</Form>
{/if}
Expand Down
20 changes: 15 additions & 5 deletions lib/banchan_web/live/static_live/about_us_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,30 @@ defmodule BanchanWeb.StaticLive.AboutUs do
<#Markdown class="prose">
# About Banchan Art

We are a [Platform Co-operative](https://en.wikipedia.org/wiki/Platform_cooperative)
of workers and artists coming together to create a new kind of art community.
Banchan Art is a website focused on providing a user-friendly space for artists for managing their clients, commissions, and invoices, and for patrons to discover new and existing artists to follow and to commission art.

## Our Mission

Our mission is to build an alternative space to the traditional, often funded by
[venture capitalist](https://en.wikipedia.org/wiki/Venture_capital), which are built
Our mission is to become a [Platform Co-operative](https://en.wikipedia.org/wiki/Platform_cooperative)
of workers and artists coming together to create a new kind of art community. You can read more about that on our [membership page](/membership).

The platform co-operative model provides an alternative to the typical media sites that are often funded by
[venture capitalists](https://en.wikipedia.org/wiki/Venture_capital), which are built
to extract value from artists and their work, at their expense, while doing their best
to crush any alternative they might otherwise have.

We work in solidarity with organizations like [Artisans.Coop](https://artisans.coop/),
This platform is created, owned, and maintained with love and solidarity by Banchan Art LLC. We work in solidarity with organizations like [Artisans.Coop](https://artisans.coop/),
[Comradery](https://comradery.co/), and [Ampled](https://www.ampled.com/) to imagine
a different economy for the future.

## Behind the Name

Banchan Art is named for the Korean culinary tradition of shared side dishes known as [banchan](https://en.wikipedia.org/wiki/Banchan).

Banchan includes a variety of dishes with different flavors and meanings. Each meal is a unique experience due to the constantly rotating selection of dishes and your ability to cater your meal by how much of each dish you select for yourself. You are able to satiate your palate for different tastes as you please.

The idea behind Banchan Art is to build a platform that provides a meeting point for artists and their supporters. This is a place where both artists and their patrons can customize their experience in a mutually beneficial and harmonious way. Our ideal for the platform is to make it easy and enjoyable to commission a custom piece of art for both sides. Similar to choosing different amounts of banchan to cater a meal to your taste, supporters can choose from different options set up by artists to commission the art piece that they will treasure.

</#Markdown>
</Layout>
"""
Expand Down
4 changes: 2 additions & 2 deletions lib/banchan_web/live/static_live/contact_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ defmodule BanchanWeb.StaticLive.Contact do
For general support issues, we can be reached at [[email protected]](mailto:[email protected]).
We're a very small team, so please give us some time to respond.

You can provide Feedback via [Github](https://github.com/BanchanArt/banchan/issues/new/choose) or via [our feedback form](report_bug). The latter allows you to submit issues to Github without a Github account, but you will need to be logged into our site.

We're also available [on our Discord](https://discord.gg/FUkTHjGKJF), where
most of the project discussion happens. Come chat with us! We're all stronger together.

Expand All @@ -36,9 +38,7 @@ defmodule BanchanWeb.StaticLive.Contact do
Our mailing address is:

Banchan Art LLC

440 N Barranca Ave #8687

Covina, CA 91723
</#Markdown>
</Layout>
Expand Down
18 changes: 13 additions & 5 deletions test/banchan_web/components/flash_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ defmodule BanchanWeb.Components.FlashTest do
end

assert html =~ """
<div class="flash-container">
<div class="fixed bottom-auto z-20 w-auto w-3/5 translate-y-0 toast toast-center top-20 flash-container">
</div>
"""
end
Expand All @@ -28,7 +28,9 @@ defmodule BanchanWeb.Components.FlashTest do
"""
end

assert html =~ "<div class=\"flash-container\">"
assert html =~
"<div class=\"fixed bottom-auto z-20 w-auto w-3/5 translate-y-0 toast toast-center top-20 flash-container\">"

assert html =~ "alert alert-success"
assert html =~ "womp"
end
Expand All @@ -41,7 +43,9 @@ defmodule BanchanWeb.Components.FlashTest do
"""
end

assert html =~ "<div class=\"flash-container\">"
assert html =~
"<div class=\"fixed bottom-auto z-20 w-auto w-3/5 translate-y-0 toast toast-center top-20 flash-container\">"

assert html =~ "alert alert-info"
assert html =~ "womp"
end
Expand All @@ -54,7 +58,9 @@ defmodule BanchanWeb.Components.FlashTest do
"""
end

assert html =~ "<div class=\"flash-container\">"
assert html =~
"<div class=\"fixed bottom-auto z-20 w-auto w-3/5 translate-y-0 toast toast-center top-20 flash-container\">"

assert html =~ "alert alert-warning"
assert html =~ "womp"
end
Expand All @@ -67,7 +73,9 @@ defmodule BanchanWeb.Components.FlashTest do
"""
end

assert html =~ "<div class=\"flash-container\">"
assert html =~
"<div class=\"fixed bottom-auto z-20 w-auto w-3/5 translate-y-0 toast toast-center top-20 flash-container\">"

assert html =~ "alert alert-error"
assert html =~ "womp"
end
Expand Down
2 changes: 1 addition & 1 deletion test/banchan_web/components/layout_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ defmodule BanchanWeb.Components.NavTest do
end

assert html =~ """
<div class="flash-container">
<div class="fixed bottom-auto z-20 w-auto w-3/5 translate-y-0 toast toast-center top-20 flash-container">
"""
end

Expand Down
Loading