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

Update menu with link to advent calendar #257

Merged
merged 4 commits into from
Dec 1, 2024
Merged

Conversation

Saamiyah
Copy link
Contributor

@Saamiyah Saamiyah commented Dec 1, 2024

Desktop

Screenshot 2024-12-01 at 15 25 10
Screenshot 2024-12-01 at 13 47 46

On mobile

Screenshot 2024-12-01 at 15 30 25
Screenshot 2024-12-01 at 15 30 17

Summary by CodeRabbit

  • New Features

    • Introduced a new menu item, "Advent Calendar," linking to an external site.
    • Added optional link attributes for enhanced functionality.
    • Conditional display of the current date in the menu for December.
  • Bug Fixes

    • Improved readability and structure of the menu component templates.
  • Style

    • Updated spacing between navigation items for better visual alignment.

Copy link
Contributor

coderabbitai bot commented Dec 1, 2024

Walkthrough

The changes involve updates to the Menu.vue and MenuItem.vue components in the frontend application. In Menu.vue, a new optional target and rel properties are added to the TMenuItem interface, and a new menu item titled "Advent Calendar" is introduced. Existing items, "meetups" and "sponsors," are commented out. In MenuItem.vue, a new computed property today is added, which returns the current date if it is December, and is used to conditionally render a link for the "Advent Calendar."

Changes

File Path Change Summary
packages/frontendmu-nuxt/components/site/Menu.vue - Updated TMenuItem interface to include optional target and rel properties.
- Added new menu item advent with relevant properties.
- Commented out meetups and sponsors menu items.
- Updated <ul> class to include gap-2.
packages/frontendmu-nuxt/components/site/MenuItem.vue - Added computed property today to return the current date in December.
- Introduced conditional rendering for a new NuxtLink for the "Advent Calendar".
- Adjusted template for improved readability.

Poem

🐇 In the menu, a change we see,
An advent link, so bright and free.
December's here, with joy it brings,
A calendar of fun and things!
So hop along, let’s celebrate,
New links to share, oh, isn’t it great? 🌟


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

cloudflare-workers-and-pages bot commented Dec 1, 2024

Deploying frontend-mu-nuxt with  Cloudflare Pages  Cloudflare Pages

Latest commit: 86baad1
Status: ✅  Deploy successful!
Preview URL: https://43e558b2.frontend-mu-staging.pages.dev
Branch Preview URL: https://add-advent-calendar-link.frontend-mu-staging.pages.dev

View logs

@Saamiyah Saamiyah requested a review from MrSunshyne December 1, 2024 11:24
@Saamiyah Saamiyah marked this pull request as ready for review December 1, 2024 11:31
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: 4

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 045986d and fe19bb1.

📒 Files selected for processing (3)
  • packages/frontendmu-nuxt/components/icon/calendar.vue (1 hunks)
  • packages/frontendmu-nuxt/components/site/Menu.vue (2 hunks)
  • packages/frontendmu-nuxt/components/site/MenuItem.vue (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/frontendmu-nuxt/components/icon/calendar.vue
🔇 Additional comments (3)
packages/frontendmu-nuxt/components/site/Menu.vue (2)

198-198: LGTM! Consistent spacing implementation.

The addition of gap-2 with responsive md:gap-4 follows Tailwind's mobile-first approach and maintains consistent spacing between navigation items across different viewport sizes.


101-101: Verify advent calendar URL configuration.

Ensure that the advent calendar subdomain is properly configured and accessible.

✅ Verification successful

URL configuration is properly set up and redirecting as expected

The advent calendar URL (https://advent.frontend.mu) is properly configured and accessible. It returns a 302 redirect to https://advent-2024-a2o.pages.dev/, which appears to be the intended hosting location using Cloudflare Pages. The HTTP headers indicate proper security configurations and Cloudflare CDN integration.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if the advent calendar URL is accessible and properly configured

# Check if the domain resolves
host advent.frontend.mu

# Check HTTP response
curl -I https://advent.frontend.mu

Length of output: 1462

packages/frontendmu-nuxt/components/site/MenuItem.vue (1)

Line range hint 88-117: LGTM: Styles are properly scoped

The existing dropdown styles work well with the new advent calendar implementation, maintaining proper isolation through scoped styles.

packages/frontendmu-nuxt/components/site/Menu.vue Outdated Show resolved Hide resolved
packages/frontendmu-nuxt/components/site/MenuItem.vue Outdated Show resolved Hide resolved
packages/frontendmu-nuxt/components/site/MenuItem.vue Outdated Show resolved Hide resolved
packages/frontendmu-nuxt/components/site/MenuItem.vue Outdated Show resolved Hide resolved
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 (1)
packages/frontendmu-nuxt/components/site/Menu.vue (1)

210-212: Review absolute positioning implementation.

The absolute positioned element with fixed values (right-10 top-10) might cause issues:

  1. Potential overlap with other elements
  2. Inflexible positioning on different screen sizes
  3. Magic numbers in positioning

Consider using:

  1. CSS Grid or Flexbox for more predictable layout
  2. Relative units or CSS variables for positioning
  3. Media queries for responsive adjustments
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between fe19bb1 and 86baad1.

📒 Files selected for processing (2)
  • packages/frontendmu-nuxt/components/site/Menu.vue (5 hunks)
  • packages/frontendmu-nuxt/components/site/MenuItem.vue (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/frontendmu-nuxt/components/site/MenuItem.vue
🔇 Additional comments (3)
packages/frontendmu-nuxt/components/site/Menu.vue (3)

12-13: LGTM! Well-structured interface extension.

The addition of optional target and rel properties to the TMenuItem interface provides proper type safety for external link handling.


101-106: LGTM! Properly implemented external link.

The advent calendar menu item correctly implements the suggested security attributes and follows best practices for external links.


186-191: LGTM! Enhanced accessibility.

Good addition of the title attribute to improve accessibility for the logo link.

@MrSunshyne
Copy link
Member

@Saamiyah I've removed the Meetup and Sponsors item from the menu temporarily because we will not have any meetups until the advent ends. Please create an issue to restore them on the 26th December 2024 and remove the advent calendar link. 🙏

merging now

@MrSunshyne MrSunshyne merged commit 260719d into main Dec 1, 2024
3 checks passed
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.

2 participants