This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git


The following commit(s) were added to refs/heads/master by this push:
     new c6e73c3d2b3 [refactor](next) reveal user logos above the fold on first 
paint (#3668)
c6e73c3d2b3 is described below

commit c6e73c3d2b362d489c9fb32228a16b820e5f5e80
Author: Mingyu Chen (Rayner) <[email protected]>
AuthorDate: Mon May 18 08:06:42 2026 -0700

    [refactor](next) reveal user logos above the fold on first paint (#3668)
    
    Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
---
 src/components/why-doris-next/UsersNext.tsx | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/components/why-doris-next/UsersNext.tsx 
b/src/components/why-doris-next/UsersNext.tsx
index 872a309b0aa..691c9e5b917 100644
--- a/src/components/why-doris-next/UsersNext.tsx
+++ b/src/components/why-doris-next/UsersNext.tsx
@@ -25,10 +25,18 @@ function useRevealObserver(): void {
                     }
                 });
             },
-            { threshold: 0.12, rootMargin: '0px 0px -8% 0px' }
+            { threshold: 0, rootMargin: '0px 0px -8% 0px' }
         );
 
-        items.forEach((item) => observer.observe(item));
+        const viewportHeight = window.innerHeight || 
document.documentElement.clientHeight;
+        items.forEach((item) => {
+            const rect = item.getBoundingClientRect();
+            if (rect.top < viewportHeight) {
+                item.classList.add('is-visible');
+            } else {
+                observer.observe(item);
+            }
+        });
         return () => observer.disconnect();
     }, []);
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to