From a178bc1cc039fd24c83599f763b6cd4678b626f2 Mon Sep 17 00:00:00 2001 From: Robert Perce Date: Wed, 8 Apr 2026 11:38:05 -0500 Subject: [PATCH] feat: sidebar scrolling works on mobile --- CHANGELOG.md | 27 +++++++++++++++++++++++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- Taskfile | 2 +- src/web/auth.rs | 4 ++-- src/web/contact/mod.rs | 2 +- static/index.css | 3 ++- 7 files changed, 35 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60b3141..d1ceba7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,30 @@ +## [0.2.0] - 2026-04-08 + +### Features + +- Scroll to current contact in sidebar by default +- Clicking off sidebar on small windows closes it +- Sort contacts sidebar ignoring case +- Report version information + +### Refactor + +- Cloak input elements while alpine.js loads + +### Performance + +- *(test)* Test performance improvements +- Large cache time on immutable hashed statics + +### Testing + +- Deflake by waiting for Save response +- Open sidebar on mobile + +### ⚙️ Miscellaneous Tasks + +- Prepare for tagged releases + ## [0.1.0] - 2026-04-05 # Features diff --git a/Cargo.lock b/Cargo.lock index 8d6aae0..79b598d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1560,7 +1560,7 @@ dependencies = [ [[package]] name = "mascarpone" -version = "0.1.0" +version = "0.2.0" dependencies = [ "anyhow", "axum", diff --git a/Cargo.toml b/Cargo.toml index 3d73af5..b348f60 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mascarpone" -version = "0.1.0" +version = "0.2.0" edition = "2024" [profile.release] diff --git a/Taskfile b/Taskfile index a9bc978..9ca36c9 100755 --- a/Taskfile +++ b/Taskfile @@ -48,7 +48,7 @@ release() { set -euo pipefail bash e2e/Taskfile playwright:ci _cargo test - new_tag=$(git-cliff --bumped-version) + new_tag=$(git-cliff --unreleased --bumped-version) git tag -m "$new_tag" "$new_tag" cargo set-version "${new_tag#v}" mv CHANGELOG.md CHANGELOG.old diff --git a/src/web/auth.rs b/src/web/auth.rs index 0ce501d..1416511 100644 --- a/src/web/auth.rs +++ b/src/web/auth.rs @@ -96,13 +96,13 @@ mod get { } body hx-ext="response-targets" { h1 { "Mascarpone" } - form hx-post=(post_url) hx-target-error="#error" x-data="{ user: '', pass: '' }" { + form hx-post=(post_url) hx-target-error="#error" x-data="{ user: '', pass: '', htmx: false }" "x-on:htmx:load.document"="htmx = true" { label for="username" { "Username" } input name="username" #username autofocus x-model="user" x-cloak; label for="password" { "Password" } input name="password" #password type="password" x-model="pass" x-cloak; - input type="submit" value="login" x-bind:disabled="!(user.length && pass.length)"; + input type="submit" value="login" x-bind:disabled="!(user.length && pass.length && htmx)" hx-disabled-elt; #error {} } } diff --git a/src/web/contact/mod.rs b/src/web/contact/mod.rs index d9a291a..d3a3cca 100644 --- a/src/web/contact/mod.rs +++ b/src/web/contact/mod.rs @@ -70,7 +70,7 @@ mod get { ?.top;\ top&&document\ .getElementById('contacts-sidebar')\ - .scrollTo({{top:top+window.innerHeight/2,left:0,behavior:'instant'}});", + .scrollTo({{top:top-window.innerHeight/2,left:0,behavior:'instant'}});", id ) } diff --git a/static/index.css b/static/index.css index e2941b3..d6b1520 100644 --- a/static/index.css +++ b/static/index.css @@ -57,7 +57,8 @@ section#content { height: 100%; &.hide { - display: none; + left: -200%; + visibility: hidden; } }