summaryrefslogtreecommitdiff
path: root/apps/web/lib/hooks
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-02-07 05:45:41 -0800
committerFuwn <[email protected]>2026-02-07 05:45:41 -0800
commit6368c74432ced80e0ac6ad2c5fe9c2495d1bc6ae (patch)
treec8b583a21bd489170b8f664e8c028fbbd9d95d49 /apps/web/lib/hooks
parentfix: resolve 6 pre-ship audit bugs (diff)
downloadasa.news-6368c74432ced80e0ac6ad2c5fe9c2495d1bc6ae.tar.xz
asa.news-6368c74432ced80e0ac6ad2c5fe9c2495d1bc6ae.zip
feat: resolve 7 pre-ship QoL items
- Space/Shift+Space: page down/up in detail panel (80% scroll) - Content font: sans-serif/serif/monospace selector in appearance settings, applied to article content in detail panel - Accessibility: entry-list-item uses button instead of div, folder toggles have aria-expanded, shortcut keys have aria-labels - Share notes: replaced window.prompt with proper modal dialog matching existing UI patterns - Worker .env.example: template with all 10 environment variables - Worker poisoned messages: archive unprocessable queue messages instead of leaving them stuck forever - Worker pool Submit: check return value, reschedule dropped feeds 30s into the future, log warnings for rejected submissions
Diffstat (limited to 'apps/web/lib/hooks')
-rw-r--r--apps/web/lib/hooks/use-keyboard-navigation.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/web/lib/hooks/use-keyboard-navigation.ts b/apps/web/lib/hooks/use-keyboard-navigation.ts
index 24a4761..8685396 100644
--- a/apps/web/lib/hooks/use-keyboard-navigation.ts
+++ b/apps/web/lib/hooks/use-keyboard-navigation.ts
@@ -368,6 +368,7 @@ export function useKeyboardNavigation() {
function handleDetailPanelKeyDown(event: KeyboardEvent) {
const SCROLL_AMOUNT = 100
+ const PAGE_SCROLL_FRACTION = 0.8
const detailArticle = document.querySelector<HTMLElement>(
"[data-detail-article]"
)
@@ -385,6 +386,19 @@ export function useKeyboardNavigation() {
if (detailArticle) detailArticle.scrollTop -= SCROLL_AMOUNT
break
}
+ case " ": {
+ event.preventDefault()
+ if (detailArticle) {
+ const pageScrollAmount =
+ detailArticle.clientHeight * PAGE_SCROLL_FRACTION
+ if (event.shiftKey) {
+ detailArticle.scrollTop -= pageScrollAmount
+ } else {
+ detailArticle.scrollTop += pageScrollAmount
+ }
+ }
+ break
+ }
case "?": {
event.preventDefault()
toggleShortcutsDialog()