-
-
Notifications
You must be signed in to change notification settings - Fork 183
feat/improve masonary #578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
EvanNotFound
commented
Jan 24, 2026
- feat: add lazy masonry loading and improved image viewer
- fix(web): tweak masonry config and image viewer interactions
- style(web): align bookmarks and masonry page layout wrappers
- style: restyle post expiration callout
- chore: rebuild tailwind css bundle
- style(web): normalize avatar padding utility
- Load masonry items from generated JSON with lazy batches and spinner - Add masonry data generator and config for batch sizes - Enhance image viewer with navigation controls and accessibility texts - Add masonry and viewer translations for all supported languages
- Read masonry batch sizes from nested config with warnings if missing - Switch masonry page to raw layout and adjust styling and lazyload images - Improve global scrollbars and image viewer dragging performance and behavior
- Update expiration callout layout and spacing in article view - Replace callout icon and border styling for expiration notice
- Replace `p-[1px]` with `p-px` on post author avatar - Regenerate Tailwind build to include `p-px` utility
🤖 Augment PR SummarySummary: This PR improves the masonry/gallery experience and enhances the image viewer UX. Changes:
Technical Notes: Masonry now schedules MiniMasonry layouts via rAF throttling and uses IntersectionObserver for both image loading and “load more” triggering; the viewer adds keyboard navigation and viewport-fit scaling on load/resize. 🤖 Was this summary useful? React with 👍 or 👎 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <div class="callout__body flex items-center gap-2"> | ||
| <i class="expire-icon callout__icon fa-solid fa-timer text-[color:var(--callout-primary-color)] text-base shrink-0"></i> | ||
| <span class="expire-label text-[color:var(--callout-primary-color)]" id="expiration-date"><%= __('expired', "some") %></span> | ||
| <div class="article-expire mt-4 mx-2 sm:mx-6 md:mx-8 callout callout--simple red mb-4 rounded-small shadow-redefine-flat bg-(--callout-bg-color) p-3 pl-1 relative flex flex-row gap-2 items-center" id="expiration-container" data-expires="<%= page?.expires %>" data-updated="<%= page?.updated %>"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| return; | ||
| } | ||
|
|
||
| rafId = window.requestAnimationFrame(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The requestAnimationFrame throttling in dragHandle captures nextX/nextY but also mutates viewerState.lastMouseX/lastMouseY while a frame is pending, so deltaX/deltaY can become incorrect (including flipping direction) under frequent mousemove events. This could make panning feel jumpy/inverted when zoomed.
Other Locations
source/js/build/tools/imageViewer.js:1
🤖 Was this useful? React with 👍 or 👎
| event.stopPropagation(); | ||
| } | ||
| viewerState.isMouseDown = false; | ||
| viewerState.dragged = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
viewerState.dragged is reset to false in dragEndHandle, which makes the “don’t close on mask click when dragging” guard ineffective if the mouse is released over the mask after a drag. That can lead to the viewer closing unexpectedly during/after panning.
Other Locations
source/js/build/tools/imageViewer.js:1
🤖 Was this useful? React with 👍 or 👎