Skip to content

feat: improved info section with links and button redirect#127

Merged
danielhe4rt merged 3 commits into
3.xfrom
feat/info-section-adjust
Nov 25, 2025
Merged

feat: improved info section with links and button redirect#127
danielhe4rt merged 3 commits into
3.xfrom
feat/info-section-adjust

Conversation

@DiogoKaster
Copy link
Copy Markdown
Contributor

@DiogoKaster DiogoKaster commented Nov 25, 2025

Summary by CodeRabbit

  • New Features

    • "Como chegar" button linking to Google Maps
    • Social media links rendered dynamically and clickable
    • Icons can be rendered as clickable links
  • Updates

    • Redesigned event info section with improved responsive layout and tighter styling
    • Map/image display improved for full, rounded presentation
    • Event address, schedule and description updated with concrete copy
    • Default icon updated and a component prop (event) removed (impacting integrations)

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Nov 25, 2025

Walkthrough

Two Blade components updated: the event info view dropped its event prop and uses hard-coded/social arrays and updated markup/styles; the icon component changed its default icon, how the size class is applied, and renders an <a> wrapper when href is provided.

Changes

Cohort / File(s) Summary
Info Section Component
app-modules/events/resources/views/components/themes/3pontos/components/sections/info.blade.php
Removed @props(['event']); introduced local $socials array; replaced dynamic address/schedule/description with hard-coded strings; updated map image classes to h-full w-full rounded-lg object-cover; replaced placeholder button with "Como chegar" linking to Google Maps; social icons rendered via foreach with target="_blank" and rel="noopener noreferrer".
Icon Component
app-modules/he4rt/resources/views/components/icon.blade.php
Changed default icon prop from heroicon-s-heart to fas-fire-flame-curved; changed size-class binding from {{ $attributes->class([$iconSizeCls]) }} to class="{{ $iconSizeCls }}"; added conditional wrapper to render an <a> when href is present, otherwise a <div>.

Sequence Diagram(s)

sequenceDiagram
    participant View as Blade view
    participant InfoCmp as Info component
    participant IconCmp as Icon component
    participant Browser as User browser

    Note over View,InfoCmp: Render info section (new static data)
    View->>InfoCmp: include info component
    InfoCmp->>InfoCmp: define $socials array\nuse hard-coded address/schedule/description
    InfoCmp->>Browser: render map image (h-full w-full rounded-lg object-cover)
    InfoCmp->>Browser: loop over $socials -> output external links (target="_blank", rel="noopener noreferrer")
    InfoCmp->>Browser: render "Como chegar" button -> Google Maps URL

    Note over IconCmp,Browser: Icon wrapper selection
    View->>IconCmp: include icon component (may include href)
    alt href provided
      IconCmp->>Browser: render <a href="..."> with <svg class="{{ $iconSizeCls }}">
    else no href
      IconCmp->>Browser: render <div> with <svg class="{{ $iconSizeCls }}">
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Pay special attention to:
    • app-modules/he4rt/resources/views/components/icon.blade.php — verify class merging behavior for additional classes passed via $attributes.
    • app-modules/events/.../sections/info.blade.php — confirm removal of the event prop won’t break callers and that hard-coded address/schedule are intentional.
    • External link attributes and the Google Maps URL used by the "Como chegar" button.

Possibly related PRs

  • feat: event page #108 — overlaps edits to the same Blade components (icon component and event info view), likely touching related rendering/class changes.

Suggested reviewers

  • danielhe4rt

Poem

🐰 A tiny flame in place of heart,
Links that hop and maps that start,
Buttons point where feet should go,
Icons wrap and gently show —
A rabbit cheers the code's small art.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'improved info section with links and button redirect' accurately describes the main changes: adding social media links, updating the info section layout, and adding a redirect button for directions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/info-section-adjust

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@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

🧹 Nitpick comments (2)
app-modules/events/resources/views/components/themes/3pontos/components/sections/info.blade.php (2)

1-16: Consider centralizing social links config instead of in-view array

Hard-coding the $socials array here works, but if these links are reused elsewhere it may be cleaner to move them to config or a dedicated view model/helper to avoid future drift and ease updates.


33-51: Verify intent of hard-coded event info and improve social icon accessibility

  • Address and schedule are now fully hard-coded. If this section is meant to stay generic for different events, consider still reading from $event to avoid stale content; if this theme is truly single-event-specific, this is fine but should be an explicit product decision.
  • Social links are rendered as icon-only anchors. For accessibility, please add an accessible name (e.g. aria-label="Instagram 3 Pontos Hub" etc.) so screen readers can distinguish each link.

Also applies to: 53-61

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5ffb1c7 and 259d1ca.

📒 Files selected for processing (2)
  • app-modules/events/resources/views/components/themes/3pontos/components/sections/info.blade.php (1 hunks)
  • app-modules/he4rt/resources/views/components/icon.blade.php (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Perform Pest Tests / Run
🔇 Additional comments (3)
app-modules/events/resources/views/components/themes/3pontos/components/sections/info.blade.php (1)

22-26: Map image changes look good

The added rounded-lg object-cover classes are consistent with the layout and shouldn’t introduce functional issues; no action needed here.

app-modules/he4rt/resources/views/components/icon.blade.php (2)

9-11: Based on my verification, I found that:

  1. No usages of the as attribute exist in any blade component calls throughout the codebase
  2. Only one usage with href exists (in app-modules/events/resources/views/components/themes/3pontos/components/sections/info.blade.php), and it does NOT specify an as attribute
  3. The as prop defaults to 'div' in the component definition, but this default is never explicitly overridden in any actual component usage

The behavioral change poses no breaking risk—no existing usages pass both as and href attributes.

The as prop is defined in the component but never explicitly used in any component calls throughout the codebase. The single usage with href relies on the default as value. Therefore, the new logic that forces <a> when href is present will not break any existing code, as there are no conflicting usages to worry about.

Likely an incorrect or invalid review comment.


2-2: Based on my verification, I have discovered a critical issue with the original review comment.

This is a newly created component, not a modification of existing code

The git history shows that app-modules/he4rt/resources/views/components/icon.blade.php was created (not modified) in commit 259d1ca as part of the feature "improved info section with links and button redirect." The file did not exist before this commit.

Key findings:

  1. Default icon concern is invalid: The review assumes the default changed from "the previous heart" to fas-fire-flame-curved, but this component is brand new with no prior version.

  2. Attribute handling concern is moot: The review warns that existing code relying on SVG-level attributes might break. However, all current usages in the codebase were created at the same time as this component and are already designed to work with this attribute handling pattern. Specifically:

    • All usages pass explicit :icon attributes (schedule-card.blade.php, hero.blade.php, info.blade.php)
    • No usages pass id, data-*, or other SVG-specific attributes
    • Color styling uses CSS classes (text-*, bg-*) which inherit to SVG via currentColor
  3. No backward compatibility risk: Since this is a new component, there are no existing consumers to break.

Likely an incorrect or invalid review comment.

Copy link
Copy Markdown

@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 (4)
app-modules/events/resources/views/components/themes/3pontos/components/sections/info.blade.php (4)

1-16: Social links extracted cleanly; consider centralizing in config if reused

The $socials array plus the @foreach rendering with x-he4rt::icon is a nice improvement in terms of structure and avoids duplication. If these social links are shared across other sections or pages, consider moving the definition into a config file, translation file, or a dedicated view composer so the URLs/icons stay in one place and are easier to maintain.

Also applies to: 53-62


22-26: Use a more descriptive map alt text

alt="map" is technically valid, but quite generic. Consider something like alt="Mapa do local do evento na Alameda Santos, 1165 – Jardim Paulista, São Paulo" to improve accessibility and make the image more meaningful for screen readers.


37-38: Verify custom class syntax like p-0! in your CSS pipeline

Classes such as p-0! rely on non-standard Tailwind-style syntax (many setups expect !p-0 instead). If your utility framework/processor supports this suffix pattern, then it’s fine; otherwise these utilities may be dropped/ignored at build time. Worth double‑checking against your existing styles or running a quick scan in the repo to ensure this pattern is already in use and compiled as expected.

Also applies to: 47-48


40-41: Static copy is event-specific; consider parameterizing if this section is reused

Hard-coding address, schedule, and description makes sense if this section is only ever used for this specific event/theme. If you expect to reuse this component for future events, it may be worth keeping the Blade props (e.g., event) or introducing new props so these values can be injected instead of edited in the template each time.

Also applies to: 50-51, 66-67

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3b2d907 and 1ebc8a4.

📒 Files selected for processing (1)
  • app-modules/events/resources/views/components/themes/3pontos/components/sections/info.blade.php (1 hunks)
🔇 Additional comments (1)
app-modules/events/resources/views/components/themes/3pontos/components/sections/info.blade.php (1)

33-51: Address and “Como chegar” URL are now consistent

The displayed address (Alameda Santos, 1165 – Jardim Paulista, São Paulo) matches the destination encoded in the Google Maps URL, fixing the earlier mismatch between text and link. The use of target="_blank" with rel="noopener noreferrer" is also correct for the external maps redirect.

Also applies to: 70-76

@danielhe4rt danielhe4rt merged commit 4dd8f24 into 3.x Nov 25, 2025
6 checks passed
@danielhe4rt danielhe4rt deleted the feat/info-section-adjust branch November 25, 2025 22:13
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