Skip to content

feat: add new UI components including Navbar, Hero, BentoGrid, and Ka…#64

Open
Ardelyo wants to merge 7 commits intomainfrom
massif-kontributor-dan-branding
Open

feat: add new UI components including Navbar, Hero, BentoGrid, and Ka…#64
Ardelyo wants to merge 7 commits intomainfrom
massif-kontributor-dan-branding

Conversation

@Ardelyo
Copy link
Copy Markdown
Collaborator

@Ardelyo Ardelyo commented Dec 27, 2025

…ryaCard, and integrate them into the application structure.

📋 Deskripsi

Jelaskan perubahan yang kamu buat secara singkat.

🔗 Issue Terkait

Fixes #(nomor issue)

🔄 Tipe Perubahan

  • 🐛 Bug fix (perubahan yang memperbaiki issue)
  • ✨ Fitur baru (perubahan yang menambah fungsionalitas)
  • 📝 Dokumentasi (perubahan pada dokumentasi)
  • 🎨 Style (formatting, tidak ada perubahan kode)
  • ♻️ Refactor (perubahan kode tanpa menambah fitur/fix)
  • 🔧 Chore (maintenance, dependencies)

📸 Screenshot (jika UI berubah)

Sebelum Sesudah
(screenshot) (screenshot)

✅ Checklist

  • Kode saya mengikuti standar proyek
  • Saya sudah melakukan self-review
  • Saya sudah menambahkan komentar di bagian yang kompleks
  • Saya sudah update dokumentasi yang terkait
  • Perubahan saya tidak menghasilkan warning baru
  • Saya sudah test perubahan saya secara lokal

📝 Catatan untuk Reviewer

Tambahkan catatan atau pertanyaan untuk reviewer di sini.


Open with Devin

…ryaCard, and integrate them into the application structure.
@vercel
Copy link
Copy Markdown

vercel bot commented Dec 27, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
ourcreativity Ready Ready Preview, Comment Dec 27, 2025 1:30pm

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @Ardelyo, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

Pull request ini berfokus pada peningkatan performa dan pengalaman pengguna aplikasi dengan mengoptimalkan pemuatan sumber daya dan rendering komponen UI. Perubahan utama meliputi implementasi lazy loading untuk halaman otentikasi, optimasi gambar untuk mencegah CLS, peningkatan Largest Contentful Paint (LCP) pada elemen hero, serta penambahan properti will-change-transform untuk animasi yang lebih lancar. Selain itu, struktur dasar HTML juga diperbaiki untuk kepatuhan standar web.

Highlights

  • Optimasi Pemuatan Halaman: Mengimplementasikan lazy loading untuk halaman Login dan Register untuk mempercepat waktu muat awal aplikasi.
  • Peningkatan Performa Gambar: Menambahkan atribut width, height, dan aspectRatio pada gambar di komponen BentoGrid untuk mencegah Cumulative Layout Shift (CLS) dan meningkatkan performa rendering.
  • Optimasi LCP (Largest Contentful Paint): Menambahkan fetchpriority="high" dan min-h pada elemen judul utama di komponen Hero untuk memastikan elemen penting dimuat lebih cepat dan stabil.
  • Peningkatan Responsivitas UI: Menggunakan properti CSS will-change-transform pada komponen KaryaCard dan Navbar untuk memberikan petunjuk kepada browser agar mengoptimalkan animasi dan transisi, menghasilkan pengalaman pengguna yang lebih mulus.
  • Perbaikan Struktur HTML: Memindahkan semua tag meta dan link ke dalam elemen <head> di index.html untuk memastikan validitas HTML dan praktik terbaik SEO.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

Pull request ini memperkenalkan beberapa komponen UI baru dan melakukan serangkaian optimasi performa yang signifikan. Perubahan seperti penerapan lazy loading untuk halaman otentikasi, penambahan atribut untuk optimasi LCP, serta perbaikan struktur HTML yang tidak valid adalah langkah-langkah yang sangat baik untuk meningkatkan kualitas dan kecepatan aplikasi.

Secara keseluruhan, kode yang diajukan berkualitas tinggi. Saya hanya memberikan beberapa saran untuk penyempurnaan lebih lanjut terkait praktik terbaik untuk menjaga type safety di TypeScript dan penggunaan properti CSS will-change yang lebih optimal untuk performa.

Comment thread components/Hero.tsx Outdated
Comment on lines +31 to +32
// @ts-ignore - fetchpriority is valid in Chromium
fetchpriority="high"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Penggunaan @ts-ignore sebaiknya dihindari untuk menjaga keamanan tipe (type safety). Sebagai alternatif yang lebih baik dan dapat digunakan kembali di seluruh proyek, Anda dapat mendeklarasikan properti fetchpriority dalam sebuah file deklarasi TypeScript (misalnya, react.d.ts).

Contoh isi file react.d.ts:

declare module 'react' {
  interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> {
    fetchpriority?: 'high' | 'low' | 'auto';
  }
}

Ini akan memberikan IntelliSense dan pemeriksaan tipe yang benar tanpa harus menonaktifkan pemeriksaan TypeScript.

Comment thread components/KaryaCard.tsx
<div className="relative w-full aspect-[4/5] md:aspect-[3/4]">
<div className="w-full h-full overflow-hidden">
<div className="relative w-full aspect-[4/5] md:aspect-[3/4] overflow-hidden bg-neutral-900">
<div className="w-full h-full overflow-hidden will-change-transform">
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Penggunaan will-change-transform di sini mungkin tidak memberikan manfaat performa yang diharapkan dan berpotensi menyebabkan penggunaan memori yang tidak perlu. Properti will-change sebaiknya diterapkan langsung pada elemen yang akan dianimasikan.

Dalam kasus ini, animasi transform (seperti scale pada gambar atau y pada kartu) terjadi pada elemen lain (elemen motion.div induk atau img di dalamnya). Sebaiknya hapus will-change-transform dari div ini. Jika optimasi spesifik diperlukan, terapkan langsung pada elemen gambar yang memiliki transisi scale.

Suggested change
<div className="w-full h-full overflow-hidden will-change-transform">
<div className="w-full h-full overflow-hidden">

Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

View issue and 5 additional flags in Devin Review.

Open in Devin Review

Comment thread components/Navbar.tsx
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Missing clearTimeout on component unmount causes potential memory leak

The scroll handler in Navbar.tsx doesn't clear the pending timeout when the component unmounts, which can cause a memory leak and React state update warnings.

Click to expand

Issue

In the scroll effect at components/Navbar.tsx:37-48, a timeoutId is set but never cleared on cleanup:

useEffect(() => {
    let timeoutId: NodeJS.Timeout;
    const handleScroll = () => {
        if (timeoutId) return;
        timeoutId = setTimeout(() => {
            setIsScrolled(window.scrollY > 50);
            timeoutId = undefined!;
        }, 100);
    };
    window.addEventListener('scroll', handleScroll);
    return () => window.removeEventListener('scroll', handleScroll);
}, []);

Actual vs Expected

  • Actual: If user scrolls then navigates away before the 100ms timeout fires, setIsScrolled will be called on an unmounted component, causing a React warning and potential memory leak.
  • Expected: The cleanup function should also call clearTimeout(timeoutId) to cancel any pending timeout.

Impact

This can cause "Can't perform a React state update on an unmounted component" warnings and minor memory leaks during rapid navigation.

(Refers to lines 37-48)

Recommendation: Add if (timeoutId) clearTimeout(timeoutId); to the cleanup function: return () => { if (timeoutId) clearTimeout(timeoutId); window.removeEventListener('scroll', handleScroll); };

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 new potential issues.

View issues and 10 additional flags in Devin Review.

Open in Devin Review

Comment on lines +91 to +93
style={{
background: `radial-gradient(circle 350px at ${springX}px ${springY}px, rgba(255,255,240,0.4) 0%, rgba(0,0,0,0.95) 100%)`
}}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 MotionValue objects used in template literal produce invalid CSS

The HangingLamp component's spotlight effect is broken because springX and springY (which are MotionValue objects from framer-motion) are interpolated directly into template literal strings for the CSS background property.

Click to expand

How it happens

At pages/divisions/Graphics.tsx:91-93 and pages/divisions/Graphics.tsx:98-100, the code does:

style={{
    background: `radial-gradient(circle 350px at ${springX}px ${springY}px, ...)`
}}

MotionValues are objects, not primitives. When used in a template literal, JavaScript calls .toString() on them, which returns "[object Object]" instead of the numeric value.

Actual vs Expected

  • Actual: The CSS becomes radial-gradient(circle 350px at [object Object]px [object Object]px, ...) which is invalid CSS, causing the flashlight/spotlight effect to not work at all.
  • Expected: The gradient should follow the mouse cursor position dynamically.

Impact

The entire interactive "hanging lamp" flashlight effect on the Graphics division page is completely non-functional.

Recommendation: Use framer-motion's useTransform to create derived values, or use the useMotionTemplate utility from framer-motion, e.g.:

const background = useMotionTemplate`radial-gradient(circle 350px at ${springX}px ${springY}px, rgba(255,255,240,0.4) 0%, rgba(0,0,0,0.95) 100%)`;

Then use style={{ background }} in the motion.div.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

<div className="flex-shrink-0 relative group">
<div className="w-48 h-48 md:w-64 md:h-64 relative transform rotate-3">
<div className="absolute inset-0 bg-white shadow-2xl transform transition-transform group-hover:rotate-0" />
<img src="/logo-oc-desain.jpg" alt="OC Design Logo" className="relative z-10 w-full h-full object-cover p-2 gray-scale group-hover:grayscale-0 transition-all duration-500" />
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Invalid Tailwind CSS class 'gray-scale' should be 'grayscale'

The CSS class gray-scale is not a valid Tailwind CSS utility class. The correct class name is grayscale (without the hyphen).

Click to expand

Location

pages/divisions/Graphics.tsx:210:

<img ... className="... gray-scale group-hover:grayscale-0 ..." />

Actual vs Expected

  • Actual: The gray-scale class does nothing because it's not recognized by Tailwind. The image won't have a grayscale filter applied initially.
  • Expected: The image should be grayscale by default and become colored on hover.

Impact

The visual design intent (grayscale-to-color hover effect on the logo) doesn't work correctly - the image will always be in color.

Recommendation: Change gray-scale to grayscale:

className="relative z-10 w-full h-full object-cover p-2 grayscale group-hover:grayscale-0 transition-all duration-500"
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant