Skip to content

Add slides link #267

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

Merged
merged 2 commits into from
Mar 12, 2025
Merged

Add slides link #267

merged 2 commits into from
Mar 12, 2025

Conversation

n-d-r-d-g
Copy link
Member

@n-d-r-d-g n-d-r-d-g commented Mar 12, 2025

This PR adds a link to access a session's slides whenever it's available.

Affected pages:

  • meetup/[id]
  • speaker/[id]

P.s. I noticed there was an open issue that seems to have been stale for a while.

meetup/[id]:

image

speaker/[id]:

image

Closes #44.

Summary by CodeRabbit

  • New Features

    • Introduced a clickable link to access session slides when available.
  • Style

    • Enhanced layouts and responsive design for session and event listings.
    • Optimized text and image sizing for improved viewing across devices.
  • Bug Fixes

    • Improved event date handling to ensure a consistent status display and prevent potential errors.
  • Chores

    • Added an optional property for session details to include a presentation deck.

isDateFuture is already being called to conditionally render the block of code. It seems unnecessary to have another isDateFuture check inside the block as it will always resolve to true as long as the block is rendered.
Copy link
Contributor

coderabbitai bot commented Mar 12, 2025

Walkthrough

This update refines the frontend components in the Nuxt project to improve responsiveness and layout. In the session and events list components, styling adjustments include updated flex layouts, responsive image and text sizes, and the addition of a conditionally rendered NuxtLink for viewing session slides when a deck is present. The single event component now uses a more robust date handling mechanism by creating a valid Date object as a fallback and applies a simplified static class binding for status display. Additionally, the session detail type is extended by an optional deck property.

Changes

File(s) Change Summary
packages/frontendmu-nuxt/components/meetup/SessionList.vue
packages/frontendmu-nuxt/components/speaker/EventsList.vue
Updated component layouts and styling: adjusted flex arrangements, responsive image and text sizes; added conditionally rendered NuxtLink for session slides based on the presence of a deck; modified clickable areas (using an absolute overlay in EventsList) and updated link margins.
packages/frontendmu-nuxt/components/meetup/Single.vue Revised date handling by instantiating a Date object as a fallback for event comparisons and simplified the class binding for event status display to a static set of classes.
packages/frontendmu-nuxt/utils/types.ts Extended the SessionDetail interface by adding an optional deck?: string property to support associated presentation decks.

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant C as Session/Events Component
    participant L as NuxtLink (Deck Link)
    participant P as Slides Page

    U->>C: Load session list
    C->>C: Check if session has deck
    alt Deck exists
      C->>L: Render deck link
      U->>L: Click deck link
      L->>P: Navigate to slides
    else No deck
      C->>U: Display session without slide link
    end
Loading

Poem

I'm a nimble rabbit, hopping in code's light,
Sessions now shine with links emerging bright.
Images shrink and texts adjust on the fly,
Dates get a solid new object—no more shy!
In our garden of code, every change makes my heart light! 🐰


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8631f35 and a5acd22.

📒 Files selected for processing (3)
  • packages/frontendmu-nuxt/components/meetup/SessionList.vue (2 hunks)
  • packages/frontendmu-nuxt/components/speaker/EventsList.vue (1 hunks)
  • packages/frontendmu-nuxt/utils/types.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • packages/frontendmu-nuxt/components/speaker/EventsList.vue
  • packages/frontendmu-nuxt/utils/types.ts
  • packages/frontendmu-nuxt/components/meetup/SessionList.vue
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: test

🪧 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 generate docstrings to generate docstrings for this 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

@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: 0

🧹 Nitpick comments (1)
packages/frontendmu-nuxt/components/meetup/SessionList.vue (1)

52-54: Consider explaining the use of !m-0

The addition of !m-0 to the link's class is using the important flag to override margins. While this works, it might be better to identify and address the source of the margin conflict for a more maintainable solution.

Consider identifying the source of the margin issue and addressing it directly rather than using the !important flag (!m-0).

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0831c0e and 8631f35.

📒 Files selected for processing (4)
  • packages/frontendmu-nuxt/components/meetup/SessionList.vue (1 hunks)
  • packages/frontendmu-nuxt/components/meetup/Single.vue (1 hunks)
  • packages/frontendmu-nuxt/components/speaker/EventsList.vue (1 hunks)
  • packages/frontendmu-nuxt/utils/types.ts (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: test
  • GitHub Check: Cloudflare Pages: frontend-mu-nuxt
🔇 Additional comments (9)
packages/frontendmu-nuxt/utils/types.ts (1)

258-258: Good addition of the optional deck property

Adding the optional deck property to the SessionDetail interface is a clean way to support linking to presentation slides. The change is minimal and non-breaking for existing code.

packages/frontendmu-nuxt/components/speaker/EventsList.vue (3)

15-17: LGTM! Improved layout structure

The addition of class="relative" to the list item establishes a positioning context for absolute elements within it, which is necessary for the overlay link implementation.


28-37: Well-implemented slides link

The conditional rendering of the slides link is implemented well. The link opens in a new tab with appropriate security attributes (rel="noopener noreferrer nofollow"). The styling creates a visually distinct clickable element with appropriate accessibility considerations.


40-40: Good UX improvement with overlay link

Using an absolute overlay link is a good UX pattern - it makes the entire list item clickable while still allowing for distinct interactive elements inside (like the slides link).

packages/frontendmu-nuxt/components/meetup/Single.vue (2)

44-44: Improved date handling

The change from getCurrentEvent.Date || '' to new Date(getCurrentEvent.Date || new Date) is a good improvement. It ensures that a valid Date object is always passed to isDateInFuture() rather than potentially an empty string.


48-48: Static class binding simplification

You've simplified the class binding by using static classes rather than conditional ones. While this simplifies the code, ensure this doesn't remove any needed conditional styling based on the event's date status.

Could you confirm if there was an intentional design decision to move away from conditional styling based on the event date?

packages/frontendmu-nuxt/components/meetup/SessionList.vue (3)

25-31: Good responsive layout improvements

The modifications to the layout structure and image sizes improve the responsiveness across different viewport sizes. Using responsive class utilities (sm:, md:, lg: prefixes) provides a better mobile-first approach.


34-39: Improved typography for better responsiveness

The typography changes with responsive text sizes enhance readability across different devices, which is a good improvement.


40-49: Well-implemented slides link

The conditional rendering for the slides link matches the implementation in EventsList.vue, maintaining consistency across components. Good use of accessibility attributes and styling.

@n-d-r-d-g n-d-r-d-g force-pushed the feat/add-slides-link branch from 8631f35 to a5acd22 Compare March 12, 2025 08:22
Copy link

Deploying frontend-mu-nuxt with  Cloudflare Pages  Cloudflare Pages

Latest commit: a5acd22
Status: ✅  Deploy successful!
Preview URL: https://16ea44ee.frontend-mu-staging.pages.dev
Branch Preview URL: https://feat-add-slides-link.frontend-mu-staging.pages.dev

View logs

@MrSunshyne
Copy link
Member

Thanks @n-d-r-d-g ! i tested and it seems to work perfectly when slides are present !

I will merge this but i do have one small suggestions: let's use an icon instead of the hand emoji. You can pick something from icones.js.org and use it easily as we already have nuxt-icons setup in the repo. Would be really cool if you can send another PR to change that.

@MrSunshyne MrSunshyne merged commit e799d34 into main Mar 12, 2025
2 of 3 checks passed
@n-d-r-d-g n-d-r-d-g deleted the feat/add-slides-link branch March 12, 2025 17:47
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.

Request for Speaker Slides Post-Conference
2 participants