Skip to content

Fix milestones card error#770

Merged
bvhpatel merged 2 commits into
dmp-bridge-projectfrom
main
Jul 8, 2026
Merged

Fix milestones card error#770
bvhpatel merged 2 commits into
dmp-bridge-projectfrom
main

Conversation

@bvhpatel

@bvhpatel bvhpatel commented Jul 8, 2026

Copy link
Copy Markdown
Member

Summary by Sourcery

Extract the horizontal timeline slide into a dedicated component to fix a hooks usage issue and prepare a patch release.

Bug Fixes:

  • Resolve React hooks rule violation in the horizontal event timeline carousel by moving slide logic into a separate TimelineSlide component.

Enhancements:

  • Refactor the horizontal timeline carousel to use a reusable TimelineSlide component for each item, simplifying the main component.

Build:

  • Bump application version to 2.93.1 and update changelog for the new patch release.

slugb0t and others added 2 commits July 8, 2026 11:16
## [2.93.1](v2.93.0...v2.93.1) (2026-07-08)

### Bug Fixes

* 🐛 Extract timeline slide component to resolve hooks violation ([2e610af](2e610af))
@bvhpatel
bvhpatel requested a review from megasanjay as a code owner July 8, 2026 22:00
@fairdataihub-bot

Copy link
Copy Markdown

Thank you for submitting this pull request! We appreciate your contribution to the project. Before we can merge it, we need to review the changes you've made to ensure they align with our code standards and meet the requirements of the project. We'll get back to you as soon as we can with feedback. Thanks again!

@sourcery-ai

sourcery-ai Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Refactors the horizontal event timeline carousel by extracting the slide rendering (including motion/gesture logic) into a dedicated TimelineSlide component to fix a hooks-in-loops violation, and bumps the package version with a corresponding changelog entry.

File-Level Changes

Change Details Files
Extract slide rendering and interaction logic into a reusable TimelineSlide component to resolve React hooks rule violations in the horizontal timeline carousel.
  • Replaces the inline items.map slide JSX in HorizontalTimeline with a TimelineSlide component for each item.
  • Moves useTransform, active state checks, and z-index calculation into the TimelineSlide component instead of computing them inside the map callback.
  • Encapsulates all motion/gesture handlers (onPanStart, onPan, onPanEnd, onClick) and accessibility attributes within TimelineSlide while preserving behavior and props passed from HorizontalTimeline.
src/components/horizontal-event-timeline-carousel.tsx
Update versioning metadata to reflect the bugfix release.
  • Add a 2.93.1 bugfix entry to the changelog describing the timeline slide extraction and hooks fix.
  • Bump package.json version from 2.93.0 to 2.93.1.
CHANGELOG.md
package.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
fairdataihub-website Ready Ready Preview, Comment Jul 8, 2026 10:00pm

Request Review

@bvhpatel
bvhpatel merged commit 4a46a9e into dmp-bridge-project Jul 8, 2026
2 of 3 checks passed
@fairdataihub-bot

Copy link
Copy Markdown

Thank you for getting this pull request merged. We appreciate your contribution and look forward to your next one!

@fairdataihub-bot

Copy link
Copy Markdown

Thanks for making updates to your pull request. Our team will take a look and provide feedback as soon as possible. Please wait for any GitHub Actions to complete before editing your pull request. If you have any additional questions or concerns, feel free to let us know. Thank you for your contributions!

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • In TimelineSlide, the onPan handler still uses e: any/info: any; consider typing these with the appropriate Framer Motion event/types (or at least _e if unused) to avoid leaking any into the component surface.
  • The z-index logic for slides (isActive ? 60 : 30 - Math.abs(index - active)) is now inlined inside TimelineSlide; extracting this back into a small helper (e.g. zFor(index, active)) would make the intent clearer and avoid magic numbers in the JSX.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `TimelineSlide`, the `onPan` handler still uses `e: any`/`info: any`; consider typing these with the appropriate Framer Motion event/types (or at least `_e` if unused) to avoid leaking `any` into the component surface.
- The z-index logic for slides (`isActive ? 60 : 30 - Math.abs(index - active)`) is now inlined inside `TimelineSlide`; extracting this back into a small helper (e.g. `zFor(index, active)`) would make the intent clearer and avoid magic numbers in the JSX.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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