Skip to content

feat:Add fluid text Component#30

Open
jojo58fr wants to merge 3 commits intoyoanbernabeu:mainfrom
jojo58fr:add-fluid-text
Open

feat:Add fluid text Component#30
jojo58fr wants to merge 3 commits intoyoanbernabeu:mainfrom
jojo58fr:add-fluid-text

Conversation

@jojo58fr
Copy link

@jojo58fr jojo58fr commented Mar 5, 2026

Description

This PR introduces a new interactive component inspired by the layout used on Blento (Fluid Text Component).

The component allows grouping multiple links inside a single block and reveals them through an animated interaction using Framer Motion. This enables users to organize related links while keeping the bento layout clean and compact.

While implementing the component, an issue with the preview animation was discovered. The builder was rendering both the desktop and mobile grids simultaneously and hiding one using CSS. Because both layouts contained elements sharing the same layoutId, Framer Motion's layout projection system conflicted between the two instances, causing animations to break (elements stuck with opacity: 0 and scale(0)).

To resolve this, the preview now renders only one layout at a time using matchMedia, ensuring that only the active grid (desktop or mobile) exists in the DOM. This prevents duplicate layoutId conflicts and restores proper Framer Motion animations.

Summary of changes:

  • Add new interactive link group component
  • Implement Framer Motion animations for opening/closing links
  • Fix preview animation bug caused by duplicated layout instances
  • Render only one layout at a time using matchMedia to avoid layoutId conflicts

Related Issue

N/A

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🎨 Style/UI improvement
  • ♻️ Code refactoring (no functional changes)
  • ⚡ Performance improvement
  • 🔧 Configuration/build changes

Checklist

  • My code follows the project's code style
  • I have run npm run lint and fixed any issues
  • I have run npm run format to format my code
  • I have run npm run type-check with no errors
  • I have tested my changes locally with npm run dev
  • I have added/updated documentation if needed
  • My changes generate no new warnings

Screenshots (if applicable)

image _Example of implementation on Blento_

Additional Notes

The component was inspired and reproduce by a similar interaction pattern seen in Blento. The implementation was built from scratch to integrate with OpenBento’s existing block system and animation architecture.

During development, the preview animation bug was discovered and fixed as part of this PR. The fix may also benefit future components relying on Framer Motion layout animations.

TakuDev (Joachim Miens) added 3 commits March 5, 2026 07:50
Prevent duplicate layout renders in preview by gating desktop/mobile branches with matchMedia. This avoids Framer Motion layout projection conflicts that left blocks invisible when FLUID_TEXT was present.
@jojo58fr jojo58fr changed the title Add fluid text Component feat:Add fluid text Component Mar 5, 2026
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