fix debounces

This commit is contained in:
shibao 2023-11-04 21:54:40 -04:00
parent bc29ca6c20
commit 1d6ba5960c
15 changed files with 122 additions and 97 deletions

View File

@ -1,5 +1,6 @@
# v0.1.13
- Update dependencies
- Fix debounces
# v0.1.12
- Code quality fixes

View File

@ -6,13 +6,13 @@
phx-target={@myself}
phx-change="validate"
phx-submit="save"
phx-debounce="300"
class="flex flex-col justify-start items-stretch space-y-4"
>
<%= text_input(f, :slug,
class: "input input-primary",
placeholder: gettext("slug"),
aria_label: gettext("slug")
aria_label: gettext("slug"),
phx_debounce: 300
) %>
<%= error_tag(f, :slug) %>
@ -21,7 +21,8 @@
class: "input input-primary h-64 min-h-64",
phx_update: "ignore",
placeholder: gettext("use [[note-slug]] to link to a note"),
aria_label: gettext("use [[note-slug]] to link to a note")
aria_label: gettext("use [[note-slug]] to link to a note"),
phx_debounce: 300
) %>
<%= error_tag(f, :content) %>
@ -29,7 +30,8 @@
id: "tags-input",
class: "input input-primary",
placeholder: gettext("tag1,tag2"),
aria_label: gettext("tag1,tag2")
aria_label: gettext("tag1,tag2"),
phx_debounce: 300
) %>
<%= error_tag(f, :tags_string) %>
@ -37,7 +39,8 @@
<%= select(f, :visibility, Ecto.Enum.values(Memex.Contexts.Context, :visibility),
class: "grow input input-primary",
prompt: gettext("select privacy"),
aria_label: gettext("select privacy")
aria_label: gettext("select privacy"),
phx_debounce: 300
) %>
<%= submit(dgettext("actions", "save"),

View File

@ -18,13 +18,27 @@
<%= changeset_errors(@changeset) %>
</div>
<%= label(f, :name, gettext("name"), class: "title text-lg text-primary-400") %>
<%= text_input(f, :name, class: "input input-primary col-span-2") %>
<%= label(f, :name, gettext("name"),
class: "title text-lg text-primary-400",
phx_debounce: 300
) %>
<%= text_input(f, :name,
class: "input input-primary col-span-2",
phx_debounce: 300
) %>
<%= error_tag(f, :name, "col-span-3") %>
<%= label(f, :uses_left, gettext("uses left"), class: "title text-lg text-primary-400") %>
<%= number_input(f, :uses_left, min: 0, class: "input input-primary col-span-2") %>
<%= label(f, :uses_left, gettext("uses left"),
class: "title text-lg text-primary-400",
phx_debounce: 300
) %>
<%= number_input(f, :uses_left,
min: 0,
class: "input input-primary col-span-2",
phx_debounce: 300
) %>
<%= error_tag(f, :uses_left, "col-span-3") %>
<span class="col-span-3 text-primary-500 italic text-center">
<%= gettext(~s/leave "uses left" blank to make invite unlimited/) %>
</span>

View File

@ -6,13 +6,13 @@
phx-target={@myself}
phx-change="validate"
phx-submit="save"
phx-debounce="300"
class="flex flex-col justify-start items-stretch space-y-4"
>
<%= text_input(f, :slug,
class: "input input-primary",
placeholder: gettext("slug"),
aria_label: gettext("slug")
aria_label: gettext("slug"),
phx_debounce: 300
) %>
<%= error_tag(f, :slug) %>
@ -21,7 +21,8 @@
class: "input input-primary h-64 min-h-64",
phx_update: "ignore",
placeholder: gettext("content"),
aria_label: gettext("content")
aria_label: gettext("content"),
phx_debounce: 300
) %>
<%= error_tag(f, :content) %>
@ -29,7 +30,8 @@
id: "tags-input",
class: "input input-primary",
placeholder: gettext("tag1,tag2"),
aria_label: gettext("tag1,tag2")
aria_label: gettext("tag1,tag2"),
phx_debounce: 300
) %>
<%= error_tag(f, :tags_string) %>
@ -37,7 +39,8 @@
<%= select(f, :visibility, Ecto.Enum.values(Memex.Notes.Note, :visibility),
class: "grow input input-primary",
prompt: gettext("select privacy"),
aria_label: gettext("select privacy")
aria_label: gettext("select privacy"),
phx_debounce: 300
) %>
<%= submit(dgettext("actions", "save"),

View File

@ -6,13 +6,13 @@
phx-target={@myself}
phx-change="validate"
phx-submit="save"
phx-debounce="300"
class="flex flex-col justify-start items-stretch space-y-4"
>
<%= text_input(f, :slug,
class: "input input-primary",
placeholder: gettext("slug"),
aria_label: gettext("slug")
aria_label: gettext("slug"),
phx_debounce: 300
) %>
<%= error_tag(f, :slug) %>
@ -21,7 +21,8 @@
class: "input input-primary h-64 min-h-64",
phx_update: "ignore",
placeholder: gettext("description"),
aria_label: gettext("description")
aria_label: gettext("description"),
phx_debounce: 300
) %>
<%= error_tag(f, :description) %>
@ -29,7 +30,8 @@
id: "tags-input",
class: "input input-primary",
placeholder: gettext("tag1,tag2"),
aria_label: gettext("tag1,tag2")
aria_label: gettext("tag1,tag2"),
phx_debounce: 300
) %>
<%= error_tag(f, :tags_string) %>
@ -37,7 +39,8 @@
<%= select(f, :visibility, Ecto.Enum.values(Memex.Pipelines.Pipeline, :visibility),
class: "grow input input-primary",
prompt: gettext("select privacy"),
aria_label: gettext("select privacy")
aria_label: gettext("select privacy"),
phx_debounce: 300
) %>
<%= submit(dgettext("actions", "save"),

View File

@ -6,13 +6,13 @@
phx-target={@myself}
phx-change="validate"
phx-submit="save"
phx-debounce="300"
class="flex flex-col justify-start items-stretch space-y-4"
>
<%= text_input(f, :title,
class: "input input-primary",
placeholder: gettext("title"),
aria_label: gettext("title")
aria_label: gettext("title"),
phx_debounce: 300
) %>
<%= error_tag(f, :title) %>
@ -21,7 +21,8 @@
class: "input input-primary h-64 min-h-64",
phx_update: "ignore",
placeholder: gettext("use [[context-slug]] to link to a context"),
aria_label: gettext("use [[context-slug]] to link to a context")
aria_label: gettext("use [[context-slug]] to link to a context"),
phx_debounce: 300
) %>
<%= error_tag(f, :content) %>

View File

@ -108,11 +108,11 @@ msgstr ""
msgid "register"
msgstr ""
#: lib/memex_web/live/context_live/form_component.html.heex:43
#: lib/memex_web/live/invite_live/form_component.html.heex:32
#: lib/memex_web/live/note_live/form_component.html.heex:43
#: lib/memex_web/live/pipeline_live/form_component.html.heex:43
#: lib/memex_web/live/step_live/form_component.html.heex:29
#: lib/memex_web/live/context_live/form_component.html.heex:46
#: lib/memex_web/live/invite_live/form_component.html.heex:46
#: lib/memex_web/live/note_live/form_component.html.heex:46
#: lib/memex_web/live/pipeline_live/form_component.html.heex:46
#: lib/memex_web/live/step_live/form_component.html.heex:30
#, elixir-autogen, elixir-format
msgid "save"
msgstr ""

View File

@ -108,11 +108,11 @@ msgstr ""
msgid "register"
msgstr ""
#: lib/memex_web/live/context_live/form_component.html.heex:43
#: lib/memex_web/live/invite_live/form_component.html.heex:32
#: lib/memex_web/live/note_live/form_component.html.heex:43
#: lib/memex_web/live/pipeline_live/form_component.html.heex:43
#: lib/memex_web/live/step_live/form_component.html.heex:29
#: lib/memex_web/live/context_live/form_component.html.heex:46
#: lib/memex_web/live/invite_live/form_component.html.heex:46
#: lib/memex_web/live/note_live/form_component.html.heex:46
#: lib/memex_web/live/pipeline_live/form_component.html.heex:46
#: lib/memex_web/live/step_live/form_component.html.heex:30
#, elixir-autogen, elixir-format
msgid "save"
msgstr ""

View File

@ -243,20 +243,20 @@ msgstr ""
msgid "report bugs or request features"
msgstr ""
#: lib/memex_web/live/context_live/form_component.html.heex:44
#: lib/memex_web/live/note_live/form_component.html.heex:44
#: lib/memex_web/live/pipeline_live/form_component.html.heex:44
#: lib/memex_web/live/step_live/form_component.html.heex:30
#: lib/memex_web/live/context_live/form_component.html.heex:47
#: lib/memex_web/live/note_live/form_component.html.heex:47
#: lib/memex_web/live/pipeline_live/form_component.html.heex:47
#: lib/memex_web/live/step_live/form_component.html.heex:31
#, elixir-autogen, elixir-format
msgid "saving..."
msgstr ""
#: lib/memex_web/live/context_live/form_component.html.heex:39
#: lib/memex_web/live/context_live/form_component.html.heex:40
#: lib/memex_web/live/note_live/form_component.html.heex:39
#: lib/memex_web/live/note_live/form_component.html.heex:40
#: lib/memex_web/live/pipeline_live/form_component.html.heex:39
#: lib/memex_web/live/pipeline_live/form_component.html.heex:40
#: lib/memex_web/live/context_live/form_component.html.heex:41
#: lib/memex_web/live/context_live/form_component.html.heex:42
#: lib/memex_web/live/note_live/form_component.html.heex:41
#: lib/memex_web/live/note_live/form_component.html.heex:42
#: lib/memex_web/live/pipeline_live/form_component.html.heex:41
#: lib/memex_web/live/pipeline_live/form_component.html.heex:42
#, elixir-autogen, elixir-format
msgid "select privacy"
msgstr ""
@ -272,12 +272,12 @@ msgstr ""
msgid "settings"
msgstr ""
#: lib/memex_web/live/context_live/form_component.html.heex:31
#: lib/memex_web/live/context_live/form_component.html.heex:32
#: lib/memex_web/live/note_live/form_component.html.heex:31
#: lib/memex_web/live/context_live/form_component.html.heex:33
#: lib/memex_web/live/note_live/form_component.html.heex:32
#: lib/memex_web/live/pipeline_live/form_component.html.heex:31
#: lib/memex_web/live/note_live/form_component.html.heex:33
#: lib/memex_web/live/pipeline_live/form_component.html.heex:32
#: lib/memex_web/live/pipeline_live/form_component.html.heex:33
#, elixir-autogen, elixir-format
msgid "tag1,tag2"
msgstr ""
@ -387,12 +387,12 @@ msgstr ""
#: lib/memex_web/components/contexts_table_component.ex:47
#: lib/memex_web/components/notes_table_component.ex:47
#: lib/memex_web/components/pipelines_table_component.ex:47
#: lib/memex_web/live/context_live/form_component.html.heex:13
#: lib/memex_web/live/context_live/form_component.html.heex:14
#: lib/memex_web/live/context_live/form_component.html.heex:15
#: lib/memex_web/live/note_live/form_component.html.heex:13
#: lib/memex_web/live/note_live/form_component.html.heex:14
#: lib/memex_web/live/note_live/form_component.html.heex:15
#: lib/memex_web/live/pipeline_live/form_component.html.heex:13
#: lib/memex_web/live/pipeline_live/form_component.html.heex:14
#: lib/memex_web/live/pipeline_live/form_component.html.heex:15
#, elixir-autogen, elixir-format
msgid "slug"
msgstr ""
@ -471,8 +471,8 @@ msgstr ""
msgid "steps:"
msgstr ""
#: lib/memex_web/live/step_live/form_component.html.heex:13
#: lib/memex_web/live/step_live/form_component.html.heex:14
#: lib/memex_web/live/step_live/form_component.html.heex:15
#, elixir-autogen, elixir-format
msgid "title"
msgstr ""
@ -669,12 +669,12 @@ msgstr ""
msgid "password"
msgstr ""
#: lib/memex_web/live/invite_live/form_component.html.heex:25
#: lib/memex_web/live/invite_live/form_component.html.heex:31
#, elixir-autogen, elixir-format, fuzzy
msgid "uses left"
msgstr ""
#: lib/memex_web/live/invite_live/form_component.html.heex:29
#: lib/memex_web/live/invite_live/form_component.html.heex:43
#, elixir-autogen, elixir-format, fuzzy
msgid "leave \"uses left\" blank to make invite unlimited"
msgstr ""

View File

@ -137,7 +137,7 @@ msgstr ""
msgid "are you sure you want to delete %{email}? this action is permanent!"
msgstr ""
#: lib/memex_web/live/invite_live/form_component.html.heex:34
#: lib/memex_web/live/invite_live/form_component.html.heex:48
#, elixir-autogen, elixir-format, fuzzy
msgid "saving..."
msgstr ""

View File

@ -241,20 +241,20 @@ msgstr ""
msgid "report bugs or request features"
msgstr ""
#: lib/memex_web/live/context_live/form_component.html.heex:44
#: lib/memex_web/live/note_live/form_component.html.heex:44
#: lib/memex_web/live/pipeline_live/form_component.html.heex:44
#: lib/memex_web/live/step_live/form_component.html.heex:30
#: lib/memex_web/live/context_live/form_component.html.heex:47
#: lib/memex_web/live/note_live/form_component.html.heex:47
#: lib/memex_web/live/pipeline_live/form_component.html.heex:47
#: lib/memex_web/live/step_live/form_component.html.heex:31
#, elixir-autogen, elixir-format
msgid "saving..."
msgstr ""
#: lib/memex_web/live/context_live/form_component.html.heex:39
#: lib/memex_web/live/context_live/form_component.html.heex:40
#: lib/memex_web/live/note_live/form_component.html.heex:39
#: lib/memex_web/live/note_live/form_component.html.heex:40
#: lib/memex_web/live/pipeline_live/form_component.html.heex:39
#: lib/memex_web/live/pipeline_live/form_component.html.heex:40
#: lib/memex_web/live/context_live/form_component.html.heex:41
#: lib/memex_web/live/context_live/form_component.html.heex:42
#: lib/memex_web/live/note_live/form_component.html.heex:41
#: lib/memex_web/live/note_live/form_component.html.heex:42
#: lib/memex_web/live/pipeline_live/form_component.html.heex:41
#: lib/memex_web/live/pipeline_live/form_component.html.heex:42
#, elixir-autogen, elixir-format
msgid "select privacy"
msgstr ""
@ -270,12 +270,12 @@ msgstr ""
msgid "settings"
msgstr ""
#: lib/memex_web/live/context_live/form_component.html.heex:31
#: lib/memex_web/live/context_live/form_component.html.heex:32
#: lib/memex_web/live/note_live/form_component.html.heex:31
#: lib/memex_web/live/context_live/form_component.html.heex:33
#: lib/memex_web/live/note_live/form_component.html.heex:32
#: lib/memex_web/live/pipeline_live/form_component.html.heex:31
#: lib/memex_web/live/note_live/form_component.html.heex:33
#: lib/memex_web/live/pipeline_live/form_component.html.heex:32
#: lib/memex_web/live/pipeline_live/form_component.html.heex:33
#, elixir-autogen, elixir-format
msgid "tag1,tag2"
msgstr ""
@ -385,12 +385,12 @@ msgstr ""
#: lib/memex_web/components/contexts_table_component.ex:47
#: lib/memex_web/components/notes_table_component.ex:47
#: lib/memex_web/components/pipelines_table_component.ex:47
#: lib/memex_web/live/context_live/form_component.html.heex:13
#: lib/memex_web/live/context_live/form_component.html.heex:14
#: lib/memex_web/live/context_live/form_component.html.heex:15
#: lib/memex_web/live/note_live/form_component.html.heex:13
#: lib/memex_web/live/note_live/form_component.html.heex:14
#: lib/memex_web/live/note_live/form_component.html.heex:15
#: lib/memex_web/live/pipeline_live/form_component.html.heex:13
#: lib/memex_web/live/pipeline_live/form_component.html.heex:14
#: lib/memex_web/live/pipeline_live/form_component.html.heex:15
#, elixir-autogen, elixir-format
msgid "slug"
msgstr ""
@ -469,8 +469,8 @@ msgstr ""
msgid "steps:"
msgstr ""
#: lib/memex_web/live/step_live/form_component.html.heex:13
#: lib/memex_web/live/step_live/form_component.html.heex:14
#: lib/memex_web/live/step_live/form_component.html.heex:15
#, elixir-autogen, elixir-format
msgid "title"
msgstr ""
@ -667,12 +667,12 @@ msgstr ""
msgid "password"
msgstr ""
#: lib/memex_web/live/invite_live/form_component.html.heex:25
#: lib/memex_web/live/invite_live/form_component.html.heex:31
#, elixir-autogen, elixir-format
msgid "uses left"
msgstr ""
#: lib/memex_web/live/invite_live/form_component.html.heex:29
#: lib/memex_web/live/invite_live/form_component.html.heex:43
#, elixir-autogen, elixir-format
msgid "leave \"uses left\" blank to make invite unlimited"
msgstr ""

View File

@ -109,11 +109,11 @@ msgstr ""
msgid "register"
msgstr ""
#: lib/memex_web/live/context_live/form_component.html.heex:43
#: lib/memex_web/live/invite_live/form_component.html.heex:32
#: lib/memex_web/live/note_live/form_component.html.heex:43
#: lib/memex_web/live/pipeline_live/form_component.html.heex:43
#: lib/memex_web/live/step_live/form_component.html.heex:29
#: lib/memex_web/live/context_live/form_component.html.heex:46
#: lib/memex_web/live/invite_live/form_component.html.heex:46
#: lib/memex_web/live/note_live/form_component.html.heex:46
#: lib/memex_web/live/pipeline_live/form_component.html.heex:46
#: lib/memex_web/live/step_live/form_component.html.heex:30
#, elixir-autogen, elixir-format
msgid "save"
msgstr ""

View File

@ -242,20 +242,20 @@ msgstr ""
msgid "report bugs or request features"
msgstr ""
#: lib/memex_web/live/context_live/form_component.html.heex:44
#: lib/memex_web/live/note_live/form_component.html.heex:44
#: lib/memex_web/live/pipeline_live/form_component.html.heex:44
#: lib/memex_web/live/step_live/form_component.html.heex:30
#: lib/memex_web/live/context_live/form_component.html.heex:47
#: lib/memex_web/live/note_live/form_component.html.heex:47
#: lib/memex_web/live/pipeline_live/form_component.html.heex:47
#: lib/memex_web/live/step_live/form_component.html.heex:31
#, elixir-autogen, elixir-format
msgid "saving..."
msgstr ""
#: lib/memex_web/live/context_live/form_component.html.heex:39
#: lib/memex_web/live/context_live/form_component.html.heex:40
#: lib/memex_web/live/note_live/form_component.html.heex:39
#: lib/memex_web/live/note_live/form_component.html.heex:40
#: lib/memex_web/live/pipeline_live/form_component.html.heex:39
#: lib/memex_web/live/pipeline_live/form_component.html.heex:40
#: lib/memex_web/live/context_live/form_component.html.heex:41
#: lib/memex_web/live/context_live/form_component.html.heex:42
#: lib/memex_web/live/note_live/form_component.html.heex:41
#: lib/memex_web/live/note_live/form_component.html.heex:42
#: lib/memex_web/live/pipeline_live/form_component.html.heex:41
#: lib/memex_web/live/pipeline_live/form_component.html.heex:42
#, elixir-autogen, elixir-format
msgid "select privacy"
msgstr ""
@ -271,12 +271,12 @@ msgstr ""
msgid "settings"
msgstr ""
#: lib/memex_web/live/context_live/form_component.html.heex:31
#: lib/memex_web/live/context_live/form_component.html.heex:32
#: lib/memex_web/live/note_live/form_component.html.heex:31
#: lib/memex_web/live/context_live/form_component.html.heex:33
#: lib/memex_web/live/note_live/form_component.html.heex:32
#: lib/memex_web/live/pipeline_live/form_component.html.heex:31
#: lib/memex_web/live/note_live/form_component.html.heex:33
#: lib/memex_web/live/pipeline_live/form_component.html.heex:32
#: lib/memex_web/live/pipeline_live/form_component.html.heex:33
#, elixir-autogen, elixir-format
msgid "tag1,tag2"
msgstr ""
@ -386,12 +386,12 @@ msgstr ""
#: lib/memex_web/components/contexts_table_component.ex:47
#: lib/memex_web/components/notes_table_component.ex:47
#: lib/memex_web/components/pipelines_table_component.ex:47
#: lib/memex_web/live/context_live/form_component.html.heex:13
#: lib/memex_web/live/context_live/form_component.html.heex:14
#: lib/memex_web/live/context_live/form_component.html.heex:15
#: lib/memex_web/live/note_live/form_component.html.heex:13
#: lib/memex_web/live/note_live/form_component.html.heex:14
#: lib/memex_web/live/note_live/form_component.html.heex:15
#: lib/memex_web/live/pipeline_live/form_component.html.heex:13
#: lib/memex_web/live/pipeline_live/form_component.html.heex:14
#: lib/memex_web/live/pipeline_live/form_component.html.heex:15
#, elixir-autogen, elixir-format
msgid "slug"
msgstr ""
@ -470,8 +470,8 @@ msgstr ""
msgid "steps:"
msgstr ""
#: lib/memex_web/live/step_live/form_component.html.heex:13
#: lib/memex_web/live/step_live/form_component.html.heex:14
#: lib/memex_web/live/step_live/form_component.html.heex:15
#, elixir-autogen, elixir-format
msgid "title"
msgstr ""
@ -668,12 +668,12 @@ msgstr ""
msgid "password"
msgstr ""
#: lib/memex_web/live/invite_live/form_component.html.heex:25
#: lib/memex_web/live/invite_live/form_component.html.heex:31
#, elixir-autogen, elixir-format
msgid "uses left"
msgstr ""
#: lib/memex_web/live/invite_live/form_component.html.heex:29
#: lib/memex_web/live/invite_live/form_component.html.heex:43
#, elixir-autogen, elixir-format, fuzzy
msgid "leave \"uses left\" blank to make invite unlimited"
msgstr ""

View File

@ -138,7 +138,7 @@ msgstr ""
msgid "are you sure you want to delete %{email}? this action is permanent!"
msgstr ""
#: lib/memex_web/live/invite_live/form_component.html.heex:34
#: lib/memex_web/live/invite_live/form_component.html.heex:48
#, elixir-autogen, elixir-format, fuzzy
msgid "saving..."
msgstr ""

View File

@ -137,7 +137,7 @@ msgstr ""
msgid "are you sure you want to delete %{email}? this action is permanent!"
msgstr ""
#: lib/memex_web/live/invite_live/form_component.html.heex:34
#: lib/memex_web/live/invite_live/form_component.html.heex:48
#, elixir-autogen, elixir-format
msgid "saving..."
msgstr ""