mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-11-03 03:32:25 +01:00
fix(gallery): drop the second scrollbar on the photo detail view (#6597)
* fix(gallery): drop the second scrollbar on the photo detail view With a photo open on desktop, the modal body, the images container and the detail view are each height: 100%, so the container fills the body exactly. The container's inline 2px top margin (grid-view spacing) then overflows the body by 2px, and the body shows its own scrollbar next to the inspector's. Zero that margin while the detail view is open. Bumps the shared stylesheet/app cache token and the service worker cache name, since a stylesheet changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(static): leave admin.js's cache tag unchanged Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cache): keep upstream's service worker cache name format dev's editor tests require CACHE_NAME to match odysseus-v<N>-pr40-editor-precache, so keep the version bump and use that suffix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Alexandre Teixeira <general@alexandreteixeira.dev>
This commit is contained in:
co-authored by
Claude Opus 5.5
Alexandre Teixeira
parent
f7f6abf82b
commit
4126bea113
@@ -162,6 +162,20 @@ def test_gallery_body_uses_available_window_height_without_grid_crop():
|
||||
assert "max-height: 60vh;" not in grid_rule
|
||||
|
||||
|
||||
def test_gallery_detail_container_drops_grid_margin_so_body_does_not_scroll():
|
||||
# With a photo open on desktop, the modal body, the images container and
|
||||
# the detail view are each `height: 100%`. The container's inline 2px top
|
||||
# margin (grid-view spacing) would then overflow the body by 2px, which
|
||||
# shows a second, outer scrollbar next to the inspector's own.
|
||||
js = _read("static/js/gallery.js")
|
||||
css = app_css()
|
||||
|
||||
assert 'id="gallery-images-container" style="margin-top:2px"' in js
|
||||
rule = '.gallery-images-container:has(> #gallery-detail[style*="flex"]) {'
|
||||
idx = css.index(rule)
|
||||
assert "margin-top: 0 !important;" in css[idx:idx + 120]
|
||||
|
||||
|
||||
def test_gallery_photo_search_is_not_vertically_offset():
|
||||
css = app_css()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user