Skip to content

textcursors upgrade#52

Merged
cosminbrn merged 1 commit into
mainfrom
46-textcursors-page-upgrade
May 26, 2026
Merged

textcursors upgrade#52
cosminbrn merged 1 commit into
mainfrom
46-textcursors-page-upgrade

Conversation

@Utzu02

@Utzu02 Utzu02 commented May 25, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

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 upgrades the Text and Cursors sections to use the shared HorizontalGallery + AnimationsLibrary pipeline (matching other categories like Buttons/Forms), and updates several cursor animations to render their fixed-position cursor effects via portals so they aren’t clipped by gallery/card overflow.

Changes:

  • Refactors Text and Cursors pages to build gallery items from getAnimationsByCategory(...) and render via HorizontalGallery.
  • Moves multiple cursor “overlay” DOM nodes (fixed cursor dots/squares) to document.body using createPortal, and adjusts container targeting away from .animation-container queries.
  • Adds additional Text animations to AnimationsLibrary and GalleryAnimation so they can be opened in the live editor route.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
frontend/src/components/Text/Text.jsx Replaces slider/code-view UI with HorizontalGallery items sourced from AnimationsLibrary (Text category).
frontend/src/components/Text/Text.scss Removes legacy slider/code styles; keeps base subpage layout + full-viewport container behavior.
frontend/src/components/Cursors/Cursors.jsx Replaces slider/code-view UI with HorizontalGallery items sourced from AnimationsLibrary (Cursors category).
frontend/src/components/Cursors/Cursors.scss Removes legacy slider/code styles; keeps base subpage layout + full-viewport container behavior.
frontend/src/components/Cursors/CursorAnimations/TrailingDots/TrailingDots.jsx Uses a ref container + portals cursor wrapper into document.body; adds scroll handling.
frontend/src/components/Cursors/CursorAnimations/TrailingDots/TrailingDots.scss Moves fixed cursor wrapper styling to top-level to match portal rendering.
frontend/src/components/Cursors/CursorAnimations/RainingSquares/RainingSquares.jsx Uses a ref container + portals squares wrapper into document.body; adjusts parent container resolution.
frontend/src/components/Cursors/CursorAnimations/RainbowAura/RainbowAura.jsx Portals cursor element into document.body and hides cursor on scroll.
frontend/src/components/Cursors/CursorAnimations/RainbowAura/RainbowAura.scss Moves .ra-cursor to top-level so styles apply when rendered via portal.
frontend/src/components/Cursors/CursorAnimations/DotTrail/DotTrail.jsx Portals cursor dot into document.body and adds scroll handling for inside-state reset.
frontend/src/components/Cursors/CursorAnimations/DotTrail/DotTrail.scss Moves .dt-cursor-dot to top-level so styles apply when rendered via portal.
frontend/src/components/Cursors/CursorAnimations/ColorCircles/ColorCircles.jsx Switches container targeting to a local ref instead of querying .animation-container.
frontend/src/components/Cursors/CursorAnimations/ColorCircles/ColorCircles.scss Removes pointer-events: none from the container so enter/leave tracking works.
frontend/src/components/Animation/GalleryAnimation.jsx Adds live-editor metadata (id + raw JSX/SCSS) for additional Text animations.
frontend/src/AnimationsLibrary.jsx Registers additional Text animations and their raw source for gallery/live-editor use.

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

@@ -132,23 +140,26 @@ const TrailingDots = () => {
}, [isMouseInsideContainer]);
Comment on lines 45 to 52
useEffect(() => {
parentAnimationContainerRef.current = document.querySelector('.cursors-container .animation-container');
parentAnimationContainerRef.current = containerRef.current;
const currentParentContainer = parentAnimationContainerRef.current;

if (!currentParentContainer) {
console.warn("RainingSquares: Parent '.animation-container' not found.");
return;
}
if (!currentParentContainer) return;

parentContainerBoundsRef.current = currentParentContainer.getBoundingClientRect();

Comment on lines 49 to 58
currentContainer.addEventListener('mouseenter', handleMouseEnter);
currentContainer.addEventListener('mouseleave', handleMouseLeave);

const handleWindowScroll = () => {
isMouseInsideRef.current = false;
};
window.addEventListener('scroll', handleWindowScroll, true);
window.addEventListener('mousedown', handleGlobalMouseDown);
window.addEventListener('mouseup', handleGlobalMouseUp);

@cosminbrn cosminbrn merged commit 2acc62e into main May 26, 2026
1 check passed
@cosminbrn cosminbrn deleted the 46-textcursors-page-upgrade branch May 26, 2026 15:42
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.

3 participants