Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added animated testimonial section #351

Merged

Conversation

Sawan-Kushwah
Copy link
Contributor

@Sawan-Kushwah Sawan-Kushwah commented Oct 19, 2024

issue #342

Untitled.video.-.Made.with.Clipchamp.11.mp4

Screenshot 2024-10-19 111705

here is the testimonial if changes required then comment i will do it !!

Summary by CodeRabbit

  • New Features

    • Introduced an enhanced ReviewCarousel component with a more interactive and visually appealing layout.
    • Added automatic slide transitions every 2.5 seconds for a dynamic viewing experience.
    • Improved display of review details, including images, star ratings, and user information.
    • Added navigation buttons for easier browsing of reviews with hover effects on images.
  • Bug Fixes

    • Resolved issues with previous navigation methods for a smoother user experience.

Copy link

vercel bot commented Oct 19, 2024

@Sawan-Kushwah is attempting to deploy a commit to the bunty's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

coderabbitai bot commented Oct 19, 2024

Walkthrough

The ReviewCarousel component has been significantly restructured. Key changes include the introduction of a single state variable to manage the currently displayed item, a new items array for detailed review information, and a complete overhaul of the rendering logic. The navigation methods have been simplified with the addition of two buttons to modify the active state, and the layout has been redesigned to improve user interaction and visual appeal.

Changes

File Change Summary
frontend/src/components/ui/ReviewCarousel.jsx Updated import statements, modified internal state management to a single active variable, replaced reviews array with items, restructured rendering logic with absolute positioning, introduced loadShow function for display management, removed old navigation methods, and redesigned layout with hover effects.

Possibly related PRs

  • Fixed the About and review carousel section #47: This PR includes updates to the ReviewCarousel component, which is directly related to the changes made in the main PR, as both involve modifications to the same component's structure and functionality.

Suggested labels

level2, gssoc-ext, checked

Poem

🐰 In a carousel of reviews we spin,
With details bright, let the fun begin!
A single state to guide our way,
New buttons to click, come join the play!
Hover and slide, oh what a sight,
Our reviews now dance in pure delight! 🌟


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. In the meantime, please ensure that your changes align with our CONTRIBUTING.md. If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Outside diff range and nitpick comments (1)
frontend/src/components/ui/ReviewCarousel.jsx (1)

68-82: Use descriptive variable names for better readability

The variable stt is not descriptive, which can make the code harder to understand and maintain. Using meaningful variable names enhances code clarity.

Suggested Action:

Rename stt to a more descriptive name like offsetIndex or step:

-let stt = 0;
+let offsetIndex = 0;

-for (let i = active + 1; i < itemsElement.length; i++) {
-  stt++;
-  itemsElement[i].style.transform = `translateX(${120 * stt}px) scale(${1 - 0.2 * stt}) perspective(16px) rotateY(-1deg)`;
-  // ...
-}
+for (let i = active + 1; i < itemsElement.length; i++) {
+  offsetIndex++;
+  itemsElement[i].style.transform = `translateX(${120 * offsetIndex}px) scale(${1 - 0.2 * offsetIndex}) perspective(16px) rotateY(-1deg)`;
+  // ...
+}

// Similarly for the previous items
-offsetIndex = 0;
+offsetIndex = 0;
for (let i = active - 1; i >= 0; i--) {
  offsetIndex++;
  itemsElement[i].style.transform = `translateX(${-120 * offsetIndex}px) scale(${1 - 0.2 * offsetIndex}) perspective(16px) rotateY(1deg)`;
  // ...
}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between bd83a25 and 93b7c8b.

📒 Files selected for processing (1)
  • frontend/src/components/ui/ReviewCarousel.jsx (1 hunks)
🧰 Additional context used
🔇 Additional comments (1)
frontend/src/components/ui/ReviewCarousel.jsx (1)

7-12: Duplicate 'img' URLs in the items array

The img URLs for the first and last items appear to be the same. This might be unintentional and could lead to duplicate images in the carousel.

Action Needed:

Please verify if the duplicate image URLs are correct or if they need to be updated to reflect different images.

If different images are intended, consider changing the img URL for one of the items:

// Item at lines 47-52
{
  img: "https://i.pravatar.cc/250?u=unique-user-id",
  // ...
}

Also applies to: 47-52

frontend/src/components/ui/ReviewCarousel.jsx Show resolved Hide resolved
frontend/src/components/ui/ReviewCarousel.jsx Show resolved Hide resolved
frontend/src/components/ui/ReviewCarousel.jsx Outdated Show resolved Hide resolved
Copy link

vercel bot commented Oct 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
play-cafe ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 20, 2024 8:09am

@RamakrushnaBiswal
Copy link
Owner

@Sawan-Kushwah make it responsive and auto scroll

@Sawan-Kushwah
Copy link
Contributor Author

@RamakrushnaBiswal

Untitled.video.-.Made.with.Clipchamp.14.mp4

check it out i have make it responsive and also autoscrolable
Can i get level 3 for it !! if more changes required i can do it !

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (2)
frontend/src/components/ui/ReviewCarousel.jsx (2)

56-62: Simplify the dependency array in the useEffect hook

Since the items array is static and its length doesn't change, you can use an empty dependency array [] in the useEffect hook. This ensures the interval is set up once when the component mounts.

Apply this diff to update the dependency array:

  useEffect(() => {
    const interval = setInterval(() => {
      setActive(prev => (prev + 1) % items.length);
    }, 2500);

    return () => clearInterval(interval);
-  }, [items.length]);
+  }, []);

119-121: Enhance accessibility with descriptive 'alt' text for images

The alt attribute should be descriptive to improve accessibility for users relying on screen readers. Including the reviewer's name provides more context.

Apply this change to make the alt text more descriptive:

  <img
    src={item.img}
-   alt="User Avatar"
+   alt={`Avatar of ${item.name.substring(2).trim()}`}
    className='w-[150px] h-[150px] rounded-lg object-cover mb-[20px] cursor-pointer max-sm:h-[120px] mb-0'
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 93b7c8b and 1569f14.

📒 Files selected for processing (1)
  • frontend/src/components/ui/ReviewCarousel.jsx (1 hunks)
🧰 Additional context used

frontend/src/components/ui/ReviewCarousel.jsx Show resolved Hide resolved
@RamakrushnaBiswal RamakrushnaBiswal merged commit 1ad5f4d into RamakrushnaBiswal:main Oct 20, 2024
5 checks passed
@RamakrushnaBiswal RamakrushnaBiswal added enhancement New feature or request level2 for 25 points gssoc-ext gssoc-extd program hacktoberfest accepted hacktoberfest-accepted repo labels Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request gssoc-ext gssoc-extd program hacktoberfest accepted hacktoberfest-accepted repo level2 for 25 points
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants