-
-
Notifications
You must be signed in to change notification settings - Fork 720
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
feat: add paris ticket banner #3363
Conversation
WalkthroughThe changes involve updates to the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
🔇 Additional comments (2).eslintrc (2)
Adding the Jest environment is a good practice as it enables proper linting for test files and prevents false positives for Jest-specific globals.
The override to disable max-len for logo components is well-placed and makes sense, as SVG/logo files often contain necessarily long lines. 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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
✅ Deploy Preview for asyncapi-website ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-3363--asyncapi-website.netlify.app/ |
@akshatnema 😁😁 |
@coderabbitai full review |
✅ Actions performedFull review triggered. |
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.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (2)
components/campaigns/banners.ts (2)
Line range hint
7-7
: Fix typo in commentThere's a spacing issue in the comment: "G et" should be "Get".
- const currentDate = new Date(); // G et the current date + const currentDate = new Date(); // Get the current date
Line range hint
7-15
: Consider simplifying the functionThe function could be more concise by using a single return statement.
export function shouldShowBanner(cfpDeadline: string) { const currentDate = new Date(); const deadline = new Date(cfpDeadline); - if (currentDate > deadline) { - return false; - } - return true; + return currentDate <= deadline; }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
components/campaigns/banners.ts
(1 hunks)
🔇 Additional comments (2)
components/campaigns/banners.ts (2)
26-26
: Verify the conference URL accessibility
Please ensure the conference URL is active and redirects correctly to the tickets section.
20-26
: Verify the tight deadline window
The CFP deadline (December 1st) is only 4 days before the event (December 5th). This might not give enough time for last-minute registrations and event preparations.
Consider extending the visibility of the banner even after the deadline to allow last-minute registrations.
components/campaigns/banners.ts
Outdated
title: "AsyncAPI Conference", | ||
city: 'Paris Edition', | ||
dateLocation: '5th of December, 2024 | France, Paris', | ||
cfaText: 'Get Your Tickets', | ||
eventName: 'the AsyncAPI Conf in Paris', | ||
cfpDeadline: '2024-12-01T06:00:00Z', | ||
link: 'https://conference.asyncapi.com/#tickets' |
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.
🛠️ Refactor suggestion
Consider lazy loading the banner for better performance
Given the low Lighthouse performance score (46), consider implementing lazy loading for the banner component to improve initial page load time.
Example implementation:
// In a separate file: components/campaigns/AsyncBanner.tsx
import dynamic from 'next/dynamic'
export const AsyncBanner = dynamic(() => import('./Banner'), {
loading: () => null,
ssr: false
})
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.
We will handle this in a separate issue
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.
@akshatnema, understood. Would you like me to create a new GitHub issue to track this optimization for future implementation?
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.
I think there is an existing issue for this
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.
@akshatnema, understood. Thank you for letting me know that there is an existing issue for this.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3363 +/- ##
=======================================
Coverage 67.77% 67.77%
=======================================
Files 21 21
Lines 664 664
=======================================
Hits 450 450
Misses 214 214 ☔ View full report in Codecov by Sentry. |
/rtm |
Ticket banner for paris
Summary by CodeRabbit