133 implement redesigned gym booking tornaterem igénylés page#173
Hidden character warning
133 implement redesigned gym booking tornaterem igénylés page#173DankaMarci wants to merge 2 commits into
Conversation
…for improved subtitle handling
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThe PR updates two sport support pages to display parsed descriptions in ChangesSport support page redesign
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related issues
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/app/(app)/[lang]/sport/sportpalya-tamogatas/components/GymSupportContent.tsx (1)
68-103: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winExtract
SectionCard/Paragraph/TextListinto a shared module.These three helpers are duplicated nearly verbatim in
src/app/(app)/[lang]/sport/sportterem-igenyles/components/SportteremContent.tsx(lines 95-130), differing only inSectionCard'sCardbackground (bg-transparenthere vsbg-whitethere). This duplication has already caused drift — see theNoticeBox/WarningBoxcolor inconsistency noted below. Extracting to a shared file (e.g.src/components/common/ContentBlocks.tsx) would prevent future divergence.♻️ Suggested extraction
// src/components/common/ContentBlocks.tsx import { ReactNode } from 'react'; import { Card, CardContent } from '`@/components/ui/card`'; import { parseFormattedText } from '`@/utils/parseFormattedText`'; export function SectionCard({ title, children, className = 'bg-transparent' }: { title: string; children: ReactNode; className?: string }) { return ( <Card className={`rounded-2xl border-[`#e9e2d6`] py-0 shadow-none ${className}`}> <CardContent className="flex flex-col gap-4 p-4"> <h2 className="font-playfair text-base font-semibold leading-[1.4] text-black">{title}</h2> <div className="h-px w-full bg-[`#e9e2d6`]" /> <div className="flex flex-col gap-4 font-open-sans text-sm leading-[1.6] text-black">{children}</div> </CardContent> </Card> ); } export function Paragraph({ children }: { children: ReactNode }) { return <p className="richtext max-w-none">{children}</p>; } export function TextList({ items, ordered = false }: { items: string[]; ordered?: boolean }) { const ListTag = ordered ? 'ol' : 'ul'; return ( <ListTag className={`${ordered ? 'list-decimal' : 'list-disc'} space-y-2 pl-5 marker:text-[`#862633`]`}> {items.map((item, index) => ( <li key={`${item}-${index}`} className="pl-1">{parseFormattedText(item)}</li> ))} </ListTag> ); }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/app/`(app)/[lang]/sport/sportpalya-tamogatas/components/GymSupportContent.tsx around lines 68 - 103, Extract SectionCard, Paragraph, and TextList into a shared ContentBlocks module, importing the required UI and parsing dependencies, then update GymSupportContent and SportteremContent to use those shared exports. Preserve each page’s SectionCard background by supporting a configurable className with bg-transparent as the default and bg-white where required, while removing the duplicated local helper definitions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@src/app/`(app)/[lang]/sport/sportpalya-tamogatas/components/GymSupportContent.tsx:
- Around line 104-110: Update the NoticeBox component’s text color to a neutral,
non-warning color appropriate for its cream background, replacing the dark
maroon text class while preserving its existing layout, border, and typography
classes.
---
Nitpick comments:
In
`@src/app/`(app)/[lang]/sport/sportpalya-tamogatas/components/GymSupportContent.tsx:
- Around line 68-103: Extract SectionCard, Paragraph, and TextList into a shared
ContentBlocks module, importing the required UI and parsing dependencies, then
update GymSupportContent and SportteremContent to use those shared exports.
Preserve each page’s SectionCard background by supporting a configurable
className with bg-transparent as the default and bg-white where required, while
removing the duplicated local helper definitions.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 34c90370-2de7-43a2-982c-01c8e1865e94
📒 Files selected for processing (5)
src/app/(app)/[lang]/sport/sportpalya-tamogatas/components/GymSupportContent.tsxsrc/app/(app)/[lang]/sport/sportpalya-tamogatas/page.tsxsrc/app/(app)/[lang]/sport/sportterem-igenyles/components/SportteremContent.tsxsrc/app/(app)/[lang]/sport/sportterem-igenyles/page.tsxsrc/components/common/PageHeader.tsx
| function NoticeBox({ children }: { children: ReactNode }) { | ||
| return ( | ||
| <div className="richtext rounded-2xl border border-[#e9e2d6] bg-[#f9f4f0] px-4 py-2 font-open-sans text-sm leading-[1.6] text-[#6b0f1a]"> | ||
| {children} | ||
| </div> | ||
| ); | ||
| } No newline at end of file | ||
| } |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
NoticeBox text color looks copy-pasted from a warning style.
NoticeBox uses text-[#6b0f1a] (dark red/maroon) on a neutral cream background/border — the same alarming text color used by SportteremContent.tsx's WarningBox (which pairs it with a red-tinted bg/border). On this neutral notice box, the red text likely misleads users into reading routine info as a warning.
🎨 Proposed fix
function NoticeBox({ children }: { children: ReactNode }) {
return (
- <div className="richtext rounded-2xl border border-[`#e9e2d6`] bg-[`#f9f4f0`] px-4 py-2 font-open-sans text-sm leading-[1.6] text-[`#6b0f1a`]">
+ <div className="richtext rounded-2xl border border-[`#e9e2d6`] bg-[`#f9f4f0`] px-4 py-2 font-open-sans text-sm leading-[1.6] text-black">
{children}
</div>
);
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| function NoticeBox({ children }: { children: ReactNode }) { | |
| return ( | |
| <div className="richtext rounded-2xl border border-[#e9e2d6] bg-[#f9f4f0] px-4 py-2 font-open-sans text-sm leading-[1.6] text-[#6b0f1a]"> | |
| {children} | |
| </div> | |
| ); | |
| } | |
| \ No newline at end of file | |
| } | |
| function NoticeBox({ children }: { children: ReactNode }) { | |
| return ( | |
| <div className="richtext rounded-2xl border border-[`#e9e2d6`] bg-[`#f9f4f0`] px-4 py-2 font-open-sans text-sm leading-[1.6] text-black"> | |
| {children} | |
| </div> | |
| ); | |
| } |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In
`@src/app/`(app)/[lang]/sport/sportpalya-tamogatas/components/GymSupportContent.tsx
around lines 104 - 110, Update the NoticeBox component’s text color to a
neutral, non-warning color appropriate for its cream background, replacing the
dark maroon text class while preserving its existing layout, border, and
typography classes.
Summary by CodeRabbit
New Features
Bug Fixes