-
Notifications
You must be signed in to change notification settings - Fork 4
Carousel for speakers #81
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
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for rubycon ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
🤖 Hi @Fedois, I've received your request, and I'm working on it now! You can track my progress in the logs for more details. |
Summary of ChangesHello @Fedois, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the user interface of the speakers section by introducing an interactive and visually appealing infinite carousel. By integrating the GSAP animation library, users can now smoothly browse speaker profiles with both automatic scrolling and manual drag functionality, improving engagement and content discoverability. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📋 Review Summary
This Pull Request introduces a new carousel feature for the speakers section using GSAP. The implementation involves changes to speaker data, HTML structure, CSS styling, and JavaScript for carousel functionality. The overall approach is clear, and the use of GSAP provides a dynamic user experience.
🔍 General Feedback
- The integration of GSAP for the carousel is well-executed.
- Consideration for responsive design with media queries in CSS is a good practice.
- Minor improvements around data consistency, placeholder assets, and script organization would enhance the quality of the codebase.
rubycon.it/_data/speakers.yml
Outdated
| - avatar: '/assets/images/logo/0_0.jpeg' | ||
| full_name: Julius Caesar | ||
| role: Senior Ruby developer @Gallia 3P | ||
| #description: The crossing of the river Rubicon from the north by Julius Caesar was in early January 49 BC. The exact date is unknown. Scholars usually place it on the night of 10 and 11 January because of the speeds at which messengers could travel at that time. It is often asserted that Caesar's crossing of the river precipitated Caesar's civil war, but Caesar's forces had already crossed into Italy and occupied Ariminum (Rimini) the previous day. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟢 There is a typo here: "cooming" should be "coming".
| #description: The crossing of the river Rubicon from the north by Julius Caesar was in early January 49 BC. The exact date is unknown. Scholars usually place it on the night of 10 and 11 January because of the speeds at which messengers could travel at that time. It is often asserted that Caesar's crossing of the river precipitated Caesar's civil war, but Caesar's forces had already crossed into Italy and occupied Ariminum (Rimini) the previous day. | |
| description: coming soon. |
| full_name: Julius Caesar | ||
| role: Senior Ruby developer @Gallia 3P | ||
| #description: The crossing of the river Rubicon from the north by Julius Caesar was in early January 49 BC. The exact date is unknown. Scholars usually place it on the night of 10 and 11 January because of the speeds at which messengers could travel at that time. It is often asserted that Caesar's crossing of the river precipitated Caesar's civil war, but Caesar's forces had already crossed into Italy and occupied Ariminum (Rimini) the previous day. | ||
| description: cooming soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 The field keys is inconsistent with other speakers who use labels. It's recommended to maintain consistency across data entries.
| description: cooming soon. | |
| labels: [ruby, ruby on rails] |
| requestAnimationFrame(animate); | ||
| } | ||
|
|
||
| animate(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Duplicating HTML elements via innerHTML += track.innerHTML; can lead to accessibility and SEO concerns due to redundant content. Consider more robust methods for infinite carousels that dynamically manage clones or use libraries that handle this gracefully, if this becomes a problem in the future.
| if (x <= -contentWidth) x += contentWidth; | ||
| if (x >= 0) x -= contentWidth; | ||
|
|
||
| gsap.set(track, { x }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 It is generally good practice to separate JavaScript into external .js files for better organization, caching, and maintainability. Consider moving this script into a dedicated file.
| @@ -1,33 +1,89 @@ | |||
| {% capture speakers_content %} | |||
| <div class="grid sm:grid-cols-2 lg:grid-cols-3 gap-8"> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟢 The data-aos attributes for animations have been removed. If this was intentional due to the carousel implementation, it's fine. Otherwise, ensure this change aligns with the desired animation behavior for speakers.
| @@ -31,6 +31,8 @@ | |||
|
|
|||
| {% include footer.html %} | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟢 While using CDNs for GSAP and Draggable.js is acceptable for static sites, for larger or more performance-critical applications, consider self-hosting these libraries or managing them via a package manager for better control over versioning and reliability, and for potential performance benefits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces an infinite carousel for the speakers section using the GSAP library. The implementation is a good start, but there are a few critical and high-severity issues that need to be addressed. I've found a critical issue with mismatched versions of the GSAP library and its Draggable plugin, which could cause instability. There are also a couple of issues in the speaker data file: a typo and an incorrect key that will prevent labels from rendering for one of the speakers. Additionally, I've provided suggestions to improve the JavaScript implementation for better performance and maintainability, and a minor cleanup for the CSS. Please review the detailed comments.
rubycon.it/_includes/speakers.html
Outdated
| gsap.registerPlugin(Draggable); | ||
|
|
||
| const track = document.querySelector('.speakers-track'); | ||
| track.innerHTML += track.innerHTML; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using innerHTML += innerHTML to duplicate content can be inefficient and has potential side effects, such as detaching event listeners from the original elements. A more performant and safer approach is to clone the existing nodes and append them.
[...track.children].forEach(child => track.appendChild(child.cloneNode(true)));
added GSAP library to create an infinite carousel for the speakers section