Skip to content

Comments

Improve code for scalability + Footer#86

Open
FraVelz wants to merge 5 commits intomidudev:mainfrom
FraVelz:refactorizacion
Open

Improve code for scalability + Footer#86
FraVelz wants to merge 5 commits intomidudev:mainfrom
FraVelz:refactorizacion

Conversation

@FraVelz
Copy link
Contributor

@FraVelz FraVelz commented Jan 24, 2026

What does this PR do?
Improve the code for future scalability and maintenance, and make a visual change to the footer.

Why are we doing this?
This is done to make the work easier for future developers/contributors and to facilitate the resolution and addition of new elements, as well as to visually improve the footer.


Test Case(s):
Tested locally, each section and element is functioning correctly.

Test Result(s):

Before After
footer-antes footer-despues

Checklist

  • Tested locally
  • Added new dependencies
  • Updated the docs
  • Added a test

Para que una mejor construcion semantica, y arregla un detalle visual.

Cambios a ser confirmados:
	modificados:     web/src/pages/index.astro
Se creo la carpeta, sections, y se agrego la 1ra seccion, del
main, factorizada.

Cambios a ser confirmados:
	nuevos archivos: src/components/sections/Preview.astro
	modificados:     src/pages/index.astro
The scroll animation section was moved to an .astro
component to improve its future maintainability.

Cambios a ser confirmados:
	nuevos archivos: src/components/sections/ScrollAnimation.astro
	modificados:     src/pages/index.astro
Extra: Update of comments from Spanish to English,
and description for components.

Cambios a ser confirmados:
	modificados:     src/components/sections/Preview.astro
	modificados:     src/components/sections/ScrollAnimation.astro
	nuevos archivos: src/components/sections/ScrollViewTimelines.astro
	modificados:     src/pages/index.astro
Cambios a ser confirmados:
	nuevos archivos: src/components/sections/AnimationCollection.astro
	modificados:     src/pages/index.astro
@vercel
Copy link

vercel bot commented Jan 24, 2026

@FraVelz is attempting to deploy a commit to the midudev's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

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 refactors the home page into modular Astro section components to improve maintainability and scalability, and adjusts the footer placement/usage while preserving existing functionality such as animation previews and scroll demos.

Changes:

  • Extracts the hero preview/installation area into Preview.astro and wires it into index.astro.
  • Extracts the animation grid controls and cards into AnimationCollection.astro, and the scroll-related demos into ScrollAnimation.astro and ScrollViewTimelines.astro.
  • Moves <Footer /> out of the main content section to be rendered once at the page level while keeping all existing client-side interaction logic in index.astro.

Reviewed changes

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

Show a summary per file
File Description
web/src/pages/index.astro Uses the new section components instead of inline markup, keeps the existing client-side behavior script, and relocates the footer to the layout body level.
web/src/components/sections/Preview.astro New hero preview section encapsulating the version badge, install commands, and interactive demo box used by the existing script.
web/src/components/sections/AnimationCollection.astro New component containing the animation controls (duration/delay/steps) and animation cards grid, including the “view all animations” behavior.
web/src/components/sections/ScrollAnimation.astro New component with the scroll-based animation examples using timeline-view and various animate-range presets.
web/src/components/sections/ScrollViewTimelines.astro New component with scroll/view timeline demos, including vertical/horizontal progress, entry/exit ranges, staggered reveal, rotation, and utility reference blocks.
Comments suppressed due to low confidence (1)

web/src/pages/index.astro:40

  • The destructuring of theme into animation, animationDuration, animationSteps, and animationDelay, along with the POPULAR_ANIMATIONS and sortedAnimations constants, is now unused in this file after moving the animation grid into AnimationCollection.astro, where the same logic is redefined. This leaves dead code here and duplicates logic across files, so it would be better to remove the unused import and constants from index.astro and keep the animation configuration centralized in the AnimationCollection component.
const { animation, animationDuration, animationSteps, animationDelay } = theme

const POPULAR_ANIMATIONS = [
  'fade-in',
  'blurred-fade-in',
  'zoom-in',
  'slide-in-top',
  'bouncing',
  'pulsing',
  'shake',
  'tada',
  'jelly',
  'flip-horizontal',
  'swing',
  'wobble',
  'rotate-360',
  'fade-in-up',
  'slide-in-left',
  'zoom-out',
  'fade-in-down',
  'slide-in-bottom',
  'slide-in-right'
]

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

*/

import { Code } from 'astro:components'
import CopyIcon from '@components/icons/copy.astro'
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

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

CopyIcon is still imported at the top of this file but no longer used anywhere after extracting the preview and animation collection markup into separate components. This unused import should be removed to keep the page lean and avoid linting errors for unused symbols.

Copilot uses AI. Check for mistakes.
Comment on lines +3 to +9
import pkg from '../../../package.json'

import CopyIcon from '@components/icons/copy.astro'
import Logo from '@components/ui/Logo.astro'

const { version } = pkg

Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

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

Importing pkg from '../../../package.json' in this component now resolves to web/package.json (version 0.0.1), whereas previously the version badge read from the root package.json (version 1.0.1). This causes the displayed version badge to change semantics; if the intent is to show the plugin/library version, the import path should be updated so Preview.astro still reads from the root package instead of the web app's package.

Copilot uses AI. Check for mistakes.
Copy link
Owner

Choose a reason for hiding this comment

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

@copilot open a new pull request to apply changes based on this 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.

2 participants