feat: improved info section with links and button redirect#127
Conversation
WalkthroughTwo Blade components updated: the event info view dropped its Changes
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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
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 arrayHard-coding the
$socialsarray 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
$eventto 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
📒 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 goodThe added
rounded-lg object-coverclasses 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:
- No usages of the
asattribute exist in any blade component calls throughout the codebase- Only one usage with
hrefexists (inapp-modules/events/resources/views/components/themes/3pontos/components/sections/info.blade.php), and it does NOT specify anasattribute- The
asprop 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
asandhrefattributes.The
asprop is defined in the component but never explicitly used in any component calls throughout the codebase. The single usage withhrefrelies on the defaultasvalue. Therefore, the new logic that forces<a>whenhrefis 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.phpwas created (not modified) in commit259d1caas part of the feature "improved info section with links and button redirect." The file did not exist before this commit.Key findings:
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.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
:iconattributes (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 viacurrentColorNo backward compatibility risk: Since this is a new component, there are no existing consumers to break.
Likely an incorrect or invalid review comment.
There was a problem hiding this comment.
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 reusedThe
$socialsarray plus the@foreachrendering withx-he4rt::iconis 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 mapalttext
alt="map"is technically valid, but quite generic. Consider something likealt="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 likep-0!in your CSS pipelineClasses such as
p-0!rely on non-standard Tailwind-style syntax (many setups expect!p-0instead). 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 reusedHard-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
📒 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 consistentThe 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 oftarget="_blank"withrel="noopener noreferrer"is also correct for the external maps redirect.Also applies to: 70-76
Summary by CodeRabbit
New Features
Updates
event) removed (impacting integrations)✏️ Tip: You can customize this high-level summary in your review settings.