forked from Qortal/q-blog
2.9 KiB
2.9 KiB
Q‑Blog v0.3.0 — Enhancements and UX updates
Summary
- Image Lightbox: Click images inside posts to view them in a full‑window overlay. Close the overlay by clicking anywhere or pressing Escape.
- Scroll‑To‑Top Button: A floating button appears when scrolled down; smoothly returns to the top.
- Bookmarks: Favorites is becoming Bookmarks. Your existing Favorites are automatically migrated to Bookmarks on first launch and cleared from legacy storage. Bookmarks support folders, sorting, and a dedicated management page at /bookmarks.
- Header/menu: The header now organizes features as: Q‑Blog logo, search, notifications, a unified Main Menu (Create Blog/Post, My Blogs, view toggle, Subscriptions, Bookmarks, Blocked Names, Q‑Mail), and the Name selector (for switching names only). The Authenticate button is positioned next to the Menu for stable layout.
Developer Details
- New Components
- ImageLightbox overlay: src/components/common/ImageLightbox.tsx
- ScrollToTop FAB: src/components/common/ScrollToTop.tsx
- Bookmarks
- Redux slice: src/state/features/bookmarksSlice.ts (load, add, remove, set folder)
- Bookmarks page: src/pages/Bookmarks/Bookmarks.tsx with table, sorting, actions, and confirmation dialog
- Migration: src/utils/migrateFavoritesToBookmarks.ts (runs at startup in GlobalWrapper to import Favorites → Bookmarks)
- Wiring: store registration in src/state/store.ts, route added in src/App.tsx, Navbar menu entry
- Toggles: Post list cards, post page, and blog page share a canonical href key so bookmark state is consistent across views
- UI and A11Y
- Navbar: Single “Menu” entry consolidates actions; Name menu focuses on switching only
- Authenticate button placed to the right of Menu to avoid layout jumps when authenticating
- ResponsiveImage passes alt to the underlying image for a11y
- Tests Added/Updated
- tests/features/ImageOverlay.test.tsx: Lightbox opens on image click
- tests/components/ScrollToTop.test.tsx: Button appears after scrolling
- tests/pages/Bookmarks.test.tsx: Bookmark save and list presence
- tests/components/Navbar.multiblog.test.tsx: Updated to open the Main Menu and assert menu items
- Total tests: 33 test files exercising routes, components, features (feed, wiki canonicalization, subscriptions, posting flows), a11y basics, and the new features above
Upgrade Notes
- Favorites is becoming Bookmarks: On first launch, the app migrates Favorites to Bookmarks automatically and removes the old entries from LocalForage. No manual steps required.
- No breaking changes to APIs.
QA Checklist
- Lightbox renders and closes cleanly on click
- Scroll to top button shows after scrolling and hides at top
- Bookmark icons are in sync across list, post page, and blog page views
- Bookmarks table loads metadata (Updated) per item and shows a spinner until available
- My Blogs section expands/collapses on click in the Main Menu