Skip to content

Speakr is a personal, self-hosted web application designed for transcribing audio recordings

Python

Mobile processing queue: fixed compact bar above the player/nav (no metadata overlap)

Murtaza Nasir53ac0acec13c
diff --git a/static/css/primitives.css b/static/css/primitives.css
index 47b90b35..59d5d9c6 100644
--- a/static/css/primitives.css
+++ b/static/css/primitives.css
@@ -1914,25 +1914,29 @@ details.disclosure-card[open] {
}
@media (max-width: 640px) {
- /* On phones the queue is a compact notification parked at the top
- right, just below the header's metadata row — never the old
- bottom-sheet, which overlapped the (now taller, video-capable)
- audio player + bottom nav. Top offset clears the title row +
- metadata row + safe-area. */
+ /* On phones the queue is a compact status bar pinned just ABOVE the
+ bottom audio player + nav, full width. The height of that bottom
+ cluster is measured into --mobile-bottom-inset (set in app.modular.js)
+ so the bar never overlaps it whether the player is shown, hidden, or
+ taller for video — and being anchored to the bottom it stays well
+ clear of the header / metadata row. The nav's offsetHeight already
+ includes its safe-area padding, so the inset accounts for that.
+ Collapsed it's a thin counter strip; tapping expands the list, which
+ grows upward from the bottom edge. */
.progress-popup {
- top: calc(env(safe-area-inset-top, 0px) + 104px) !important;
+ bottom: calc(var(--mobile-bottom-inset, 116px) + 8px) !important;
+ left: 0.5rem !important;
right: 0.5rem !important;
- left: auto !important;
- bottom: auto !important;
+ top: auto !important;
width: auto !important;
- max-width: min(20rem, calc(100vw - 1rem));
+ max-width: none !important;
animation: progressPopIn 180ms ease;
}
- /* Expanded: a top-right dropdown card, height-capped + scrollable so a
- long queue can't run off-screen. */
+ /* Expanded: height-capped + scrollable so a long queue can't run off
+ the top of the screen. */
.progress-popup__card {
border-radius: 0.6rem;
- max-height: 60vh;
+ max-height: 50vh;
display: flex;
flex-direction: column;
}
@@ -1940,18 +1944,16 @@ details.disclosure-card[open] {
overflow-y: auto;
}
- /* Minimized = super-compact pill: tasks icon + count + expand chevron
- only. The desktop "slide down to show header" transform is dropped
- (the pill IS the header), and the title text / summary line /
- clear+close are hidden so it stays tiny and out of the way. Tap the
- pill to expand. */
+ /* Collapsed = compact counter strip: icon + count + expand chevron +
+ close. Drop the desktop slide transform (the strip IS the header)
+ and hide the long title text, the summary line, and the clear
+ button so it stays slim. Keep the close so it can be dismissed. */
.progress-popup.minimized {
transform: none !important;
}
.progress-popup.minimized .progress-popup__title-text,
.progress-popup.minimized .progress-popup__summary,
- .progress-popup.minimized .progress-popup__clear,
- .progress-popup.minimized .progress-popup__close {
+ .progress-popup.minimized .progress-popup__clear {
display: none;
}
.progress-popup.minimized .progress-popup__card {
@@ -1963,7 +1965,7 @@ details.disclosure-card[open] {
}
@keyframes progressPopIn {
- from { opacity: 0; transform: translateY(-6px); }
+ from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}
diff --git a/static/js/app.modular.js b/static/js/app.modular.js
index 72525932..2b0da067 100644
--- a/static/js/app.modular.js
+++ b/static/js/app.modular.js
@@ -3276,6 +3276,42 @@ document.addEventListener('DOMContentLoaded', async () => {
}
});
+ // Measure the mobile bottom UI (persistent audio player + bottom
+ // nav) and publish it as the --mobile-bottom-inset CSS variable,
+ // so the processing-queue bar can anchor just above it regardless
+ // of whether the player is shown or how tall it is (audio vs
+ // video). This replaces the old magic 60+56px offset that
+ // overlapped the player once it grew taller.
+ let _mobileInsetObserver = null;
+ const updateMobileBottomInset = () => {
+ const player = document.querySelector('[data-mobile-player]');
+ const nav = document.querySelector('[data-mobile-bottom-nav]');
+ const h = (player ? player.offsetHeight : 0) + (nav ? nav.offsetHeight : 0);
+ document.documentElement.style.setProperty('--mobile-bottom-inset', h + 'px');
+ // Re-observe the current elements so live height changes
+ // (e.g. toggling video in the player) keep the inset in sync.
+ if (typeof ResizeObserver !== 'undefined') {
+ if (!_mobileInsetObserver) {
+ _mobileInsetObserver = new ResizeObserver(() => {
+ const p = document.querySelector('[data-mobile-player]');
+ const n = document.querySelector('[data-mobile-bottom-nav]');
+ const hh = (p ? p.offsetHeight : 0) + (n ? n.offsetHeight : 0);
+ document.documentElement.style.setProperty('--mobile-bottom-inset', hh + 'px');
+ });
+ }
+ _mobileInsetObserver.disconnect();
+ if (player) _mobileInsetObserver.observe(player);
+ if (nav) _mobileInsetObserver.observe(nav);
+ }
+ };
+ // Re-measure whenever the bottom layout can change (view switch,
+ // recording change, player position, video toggle, or the bar
+ // first appearing) — this also catches the player mounting /
+ // unmounting, which the ResizeObserver alone can't.
+ watch([currentView, () => selectedRecording.value?.id, mobileTab,
+ videoCollapsed, audioPlayerPosition, showProcessingPopup],
+ () => nextTick(updateMobileBottomInset));
+
// =========================================================================
// LIFECYCLE
// =========================================================================
@@ -3529,7 +3565,10 @@ document.addEventListener('DOMContentLoaded', async () => {
// Window resize handler
window.addEventListener('resize', () => {
windowWidth.value = window.innerWidth;
+ updateMobileBottomInset();
});
+ // Initial measurement once the layout has painted.
+ nextTick(updateMobileBottomInset);
// Visibility change handler for wake lock
document.addEventListener('visibilitychange', audioComposable.handleVisibilityChange);
diff --git a/templates/components/detail/audio-player.html b/templates/components/detail/audio-player.html
index 9dc9566a..a3e01fd6 100644
--- a/templates/components/detail/audio-player.html
+++ b/templates/components/detail/audio-player.html
@@ -2,7 +2,7 @@
persistent mini-player. Top border separates it from the content
above; padding tightened so it doesn't shove the bottom-nav too
far up. -->
-<div class="bg-[var(--bg-secondary)] px-3 py-2 border-t border-[var(--border-primary)] flex-shrink-0">
+<div data-mobile-player class="bg-[var(--bg-secondary)] px-3 py-2 border-t border-[var(--border-primary)] flex-shrink-0">
<!-- Show message if audio has been deleted -->
<div v-if="selectedRecording.audio_deleted_at"
class="text-[var(--text-muted)] text-sm flex items-center gap-2">
diff --git a/templates/components/detail/tab-navigation.html b/templates/components/detail/tab-navigation.html
index 6b178f79..ee89bd17 100644
--- a/templates/components/detail/tab-navigation.html
+++ b/templates/components/detail/tab-navigation.html
@@ -5,7 +5,7 @@
items there's no overflow menu so the user can reach every tab in
one tap (queue #9). 56px tall to accommodate icon + label + 44×44
touch target per HIG. -->
-<div class="flex-shrink-0 border-t border-[var(--border-primary)] bg-[var(--bg-secondary)] flex items-stretch" style="min-height: 56px; padding-bottom: env(safe-area-inset-bottom);">
+<div data-mobile-bottom-nav class="flex-shrink-0 border-t border-[var(--border-primary)] bg-[var(--bg-secondary)] flex items-stretch" style="min-height: 56px; padding-bottom: env(safe-area-inset-bottom);">
<button @click="mobileTab = 'summary'"
class="flex-1 flex flex-col items-center justify-center gap-0.5 px-2 transition-colors"
:class="mobileTab === 'summary' ? 'text-[var(--text-accent)]' : 'text-[var(--text-muted)]'">