Skip to content

Homepage cleanup#121

Merged
sergeychernyshev merged 21 commits intomainfrom
homepage-cleanup
Feb 9, 2026
Merged

Homepage cleanup#121
sergeychernyshev merged 21 commits intomainfrom
homepage-cleanup

Conversation

@sergeychernyshev
Copy link
Member

@sergeychernyshev sergeychernyshev commented Feb 7, 2026

Replaced some JavaScript with CSS, fixed some excessive CPU consumption.

Disabled all the page wiggles when user prefers reduced motion.

This PR were created with 🔵 AI-assistance from Gemini and Copilot.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Astro homepage to reduce CPU-heavy effects by removing some JS-driven animations/behaviors and shifting to CSS/markup-based equivalents, plus replaces an inlined base64 hero image with a static WebP asset.

Changes:

  • Replace inlined base64 hero background with public/hero.webp.
  • Remove JS-driven smooth scrolling, shooting stars, and scroll listeners; use CSS scroll-behavior and anchor links instead.
  • Refactor starfield/sparkle creation to use DOM templates and add a new sticky “back to top” wrapper/link.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 5 comments.

File Description
telescopetest-io/src/pages/index.astro Refactors homepage styling/animations, back-to-top behavior, and star/sparkle generation logic.
telescopetest-io/public/hero.webp Adds a static hero background image asset referenced by the homepage CSS.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings February 7, 2026 23:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 2 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings February 8, 2026 00:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

telescopetest-io/src/pages/index.astro:1741

  • With prefers-reduced-motion, createStars() is never called, so the .stars container stays empty and users who request reduced motion lose the starfield entirely (even though the CSS already neutralizes animations in reduced-motion mode). Consider still generating the stars and just disabling their animation/twinkle when reduced motion is enabled.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings February 8, 2026 00:40
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings February 8, 2026 00:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 2 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

telescopetest-io/src/pages/index.astro:1654

  • In reduced-motion mode, the script still creates IntersectionObserver instances (including the top-level observer) and registers the mousemove listener (even though it returns immediately). If the intent is to minimize work for reduced-motion users, consider short-circuiting initialization earlier (skip creating observers/listeners, and optionally skip createStars() as well) when prefersReducedMotion is true.
      const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;

      // Generate starfield
      function createStars() {
        const starTemplate = document.getElementById('star-template');
        starTemplate.removeAttribute('id');

        const starsContainer = document.getElementById('stars');
        const starCount = 100;

        for (let i = 0; i < starCount; i++) {
          const star = starTemplate.cloneNode();
          star.style.display = 'block';
          star.style.left = Math.random() * 100 + '%';
          star.style.top = Math.random() * 100 + '%';
          star.style.animationDelay = Math.random() * 3 + 's';
          starsContainer.appendChild(star);
        }
      }

      // Intersection Observer for scroll animations
      const observerOptions = {
        threshold: 0.1,
        rootMargin: '0px 0px -100px 0px',
      };

      const observer = new IntersectionObserver(entries => {
        entries.forEach((entry, index) => {

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sergeychernyshev sergeychernyshev merged commit 9e99003 into main Feb 9, 2026
10 checks passed
@sergeychernyshev sergeychernyshev deleted the homepage-cleanup branch February 9, 2026 16:54
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.

2 participants