Plugin Directory

Changeset 3496620


Ignore:
Timestamp:
04/01/2026 01:19:07 PM (14 hours ago)
Author:
rstake
Message:

Update to version 4.12.0

Location:
sdaweb-social-galleri-feed/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • sdaweb-social-galleri-feed/trunk/assets/css/gallery-styles.css

    r3496509 r3496620  
    377377    border-radius: 4px;
    378378    transition: transform 0.2s ease;
     379    will-change: transform;
    379380}
    380381
    381382.sdawsoga-item:hover {
    382     transform: scale(1.02);
     383    transform: scale(1.03);
    383384}
    384385
     
    388389    object-fit: cover;
    389390    display: block;
    390     transition: transform 0.3s ease;
     391    transition: transform 0.3s ease, opacity 0.3s ease;
     392    opacity: 0;
     393}
     394
     395.sdawsoga-item img.sdawsoga-loaded {
     396    opacity: 1;
    391397}
    392398
     
    410416    );
    411417    opacity: 0;
    412     transition: opacity 0.3s ease;
     418    transform: translateY(4px);
     419    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    413420    display: flex;
    414421    flex-direction: column;
     
    421428.sdawsoga-item:hover .sdawsoga-hover-overlay {
    422429    opacity: 1;
     430    transform: translateY(0);
    423431}
    424432
     
    523531    position: fixed;
    524532    inset: 0;
    525     background: rgba(0, 0, 0, 0.92);
     533    background: #000;
    526534    z-index: 999999;
    527535    justify-content: center;
     
    10471055.sdawsoga-close-btn:hover {
    10481056    background: rgba(0, 0, 0, 0.8);
    1049     transform: rotate(90deg);
     1057    transform: scale(1.1);
    10501058}
    10511059
     
    14791487.sdawsoga-swipe-hint {
    14801488    position: fixed;
    1481     bottom: 40px;
     1489    bottom: 120px;
    14821490    left: 50%;
    14831491    transform: translateX(-50%);
     
    15081516
    15091517/* ===== ACCESSIBILITY ===== */
    1510 .sdawsoga-item:focus,
    1511 .sdawsoga-red-btn:focus,
    1512 .sdawsoga-follow-btn:focus,
    1513 .sdawsoga-close-btn:focus,
    1514 .sdawsoga-nav-btn:focus {
    1515     outline: 2px solid #b12839;
    1516     outline-offset: 2px;
     1518.sdawsoga-item:focus-visible,
     1519.sdawsoga-red-btn:focus-visible,
     1520.sdawsoga-follow-btn:focus-visible,
     1521.sdawsoga-close-btn:focus-visible,
     1522.sdawsoga-nav-btn:focus-visible {
     1523    outline: 3px solid #0095f6;
     1524    outline-offset: 3px;
    15171525}
    15181526
  • sdaweb-social-galleri-feed/trunk/assets/js/gallery-script.js

    r3483261 r3496620  
    107107            const closeBtn = el('close-btn');
    108108            if (closeBtn) {
    109                 closeBtn.addEventListener('click', closeModal);
     109                closeBtn.addEventListener('click', closeModalWithAnimation);
    110110            }
    111111           
     
    114114            if (modal) {
    115115                modal.addEventListener('click', function(e) {
    116                     if (e.target === modal) closeModal();
     116                    if (e.target === modal) closeModalWithAnimation();
    117117                });
    118118            }
     
    484484            }
    485485
    486             // Image
     486            // Image with fade-in on load
    487487            var img = document.createElement('img');
    488             img.src = thumbnail;
    489488            img.alt = altText;
    490489            img.loading = 'lazy';
    491490            img.decoding = 'async';
     491            img.onload = function() { this.classList.add('sdawsoga-loaded'); };
     492            img.src = thumbnail;
    492493            div.appendChild(img);
    493494
     
    631632                    showSwipeHint();
    632633                }
     634
     635                preloadAdjacentMedia();
    633636            }
    634637        }
     
    967970           
    968971            renderModalContent();
    969         }
    970        
     972            preloadAdjacentMedia();
     973        }
     974
    971975        /**
    972976         * Navigate between posts (mobile — always changes posts, not slides)
     
    981985            state.currentSlideIndex = 0;
    982986            renderModalContent();
    983         }
    984        
     987            preloadAdjacentMedia();
     988        }
     989
     990        /**
     991         * Preload adjacent images so next/prev swipe is instant
     992         */
     993        function preloadAdjacentMedia() {
     994            var maxPost = Math.min(state.visibleCount, state.feed.length);
     995            if (maxPost < 2) return;
     996            var indices = [
     997                (state.currentPostIndex + 1) % maxPost,
     998                (state.currentPostIndex - 1 + maxPost) % maxPost
     999            ];
     1000            for (var i = 0; i < indices.length; i++) {
     1001                var post = state.feed[indices[i]];
     1002                if (!post) continue;
     1003                var url = post.media_url || (post.children && post.children.data && post.children.data[0] ? post.children.data[0].media_url : null);
     1004                if (url && post.media_type !== 'VIDEO') {
     1005                    var preload = new Image();
     1006                    preload.src = url;
     1007                }
     1008            }
     1009        }
     1010
    9851011        /**
    9861012         * Load more posts
     
    9971023            state.touchStartX = e.touches[0].clientX;
    9981024            state.touchStartY = e.touches[0].clientY;
     1025            state.touchStartTime = e.timeStamp;
    9991026        }
    10001027       
     
    10171044           
    10181045            // Horizontal swipe → navigate between slides/posts
    1019             if (Math.abs(diffX) > 50 && Math.abs(diffX) > Math.abs(diffY)) {
     1046            var elapsed = Math.max(1, e.timeStamp - (state.touchStartTime || 0));
     1047            var velocityX = Math.abs(diffX) / elapsed; // px per ms
     1048            var isHorizontal = Math.abs(diffX) > Math.abs(diffY);
     1049            if (isHorizontal && (Math.abs(diffX) > 35 || velocityX > 0.4)) {
    10201050                navigate(diffX > 0 ? 'next' : 'prev');
    10211051                hideSwipeHint();
    10221052                return;
    10231053            }
    1024            
     1054
    10251055            // Vertical swipe UP → close modal (on touch devices)
    1026             if (diffY > 80 && Math.abs(diffY) > Math.abs(diffX) * 1.5) {
     1056            var velocityY = Math.abs(diffY) / elapsed;
     1057            if ((diffY > 60 || velocityY > 0.5) && Math.abs(diffY) > Math.abs(diffX) * 1.5) {
    10271058                closeModalWithAnimation();
    10281059                return;
     
    10401071                case 'ArrowRight': navigate('next'); break;
    10411072                case 'ArrowLeft': navigate('prev'); break;
    1042                 case 'Escape': closeModal(); break;
     1073                case 'Escape': closeModalWithAnimation(); break;
    10431074            }
    10441075        }
     
    10521083            hint.classList.add('show');
    10531084            clearTimeout(state.swipeHintTimeout);
    1054             state.swipeHintTimeout = setTimeout(function() { hideSwipeHint(); }, 3000);
     1085            state.swipeHintTimeout = setTimeout(function() { hideSwipeHint(); }, 1500);
    10551086        }
    10561087       
  • sdaweb-social-galleri-feed/trunk/blocks/gallery/block.json

    r3496586 r3496620  
    33    "apiVersion": 3,
    44    "name": "sdawsoga/gallery",
    5     "version": "4.11.0",
     5    "version": "4.12.0",
    66    "title": "Social Galleri Feed",
    77    "category": "embed",
  • sdaweb-social-galleri-feed/trunk/readme.txt

    r3496586 r3496620  
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 4.11.0
     7Stable tag: 4.12.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    125125
    126126== Changelog ==
     127
     128= 4.12.0 =
     129* Improved: Lightbox backdrop changed to solid black for full immersion.
     130* Improved: Grid item hover effect upgraded — snappier scale (1.03), GPU-accelerated with will-change.
     131* Improved: Hover overlay now slides up with cubic-bezier easing for a premium feel.
     132* Improved: Grid images fade in smoothly on load instead of popping in.
     133* Improved: Close button hover uses scale instead of rotate for a modern look.
     134* Improved: All modal close paths (button, backdrop click, Escape, swipe) now animate consistently.
     135* Improved: Swipe detection uses velocity + lower threshold (35px) for more responsive touch navigation.
     136* Improved: Swipe-up-to-close also uses velocity detection for natural feel.
     137* Improved: Swipe hint shows for 1.5s (was 3s) and repositioned above mobile nav buttons.
     138* Improved: Focus rings use :focus-visible with Instagram blue (#0095f6) for better keyboard accessibility.
     139* Improved: Next/previous post images preloaded in lightbox for instant navigation.
    127140
    128141= 4.11.0 =
  • sdaweb-social-galleri-feed/trunk/sdaweb-social-galleri-feed.php

    r3496586 r3496620  
    33 * Plugin Name: SDAweb Social Galleri Feed
    44 * Description: Display your Instagram feed as a responsive gallery with lightbox, instant loading, and full admin control.
    5  * Version: 4.11.0
     5 * Version: 4.12.0
    66 * Requires at least: 5.8
    77 * Requires PHP: 7.4
     
    2121
    2222// Define plugin constants (guarded against conflicts)
    23 if (!defined('SDAWSOGA_VERSION'))              define('SDAWSOGA_VERSION', '4.11.0');
     23if (!defined('SDAWSOGA_VERSION'))              define('SDAWSOGA_VERSION', '4.12.0');
    2424if (!defined('SDAWSOGA_PLUGIN_FILE'))          define('SDAWSOGA_PLUGIN_FILE', __FILE__);
    2525if (!defined('SDAWSOGA_PLUGIN_DIR'))           define('SDAWSOGA_PLUGIN_DIR', plugin_dir_path(__FILE__));
Note: See TracChangeset for help on using the changeset viewer.