-
Notifications
You must be signed in to change notification settings - Fork 6
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
Settings #56
Settings #56
Conversation
Deploying redot-website with Cloudflare Pages
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
Added a comprehensive settings system with customizable blog layouts, featuring a new settings page with appearance customization options and persistent user preferences.
- Added
/actions/settings.ts
for managing blog layout preferences via cookies withsaveSettingsBlogLayout
andgetSettingsBlogLayout
functions - Implemented
AppearanceForm
component with visual layout previews and radio group selection between "new" and "old" blog styles - Split
ArticleSplash
intoArticleSplashNew
andArticleSplashOld
components with distinct layout styles - Added settings navigation with
SettingsSidebar
component and configurable sidebar items - Integrated Radix UI components (Label, RadioGroup) for enhanced form controls and accessibility
12 file(s) reviewed, 16 comment(s)
Edit PR Review Bot Settings | Greptile
}; | ||
|
||
export default function Layout({ | ||
children, | ||
}: Readonly<{ | ||
children: React.ReactNode; | ||
}>) { | ||
return <>{children}</>; | ||
return ( | ||
<div className="hidden space-y-6 p-10 pb-16 md:block"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Hidden on mobile screens with no alternative mobile navigation provided
return ( | ||
<div className="hidden space-y-6 p-10 pb-16 md:block"> | ||
<div className="space-y-0.5"> | ||
<h2 className="text-2xl font-bold tracking-tight">Settings</h2> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Consider adding aria-label to improve accessibility since this is the main settings heading
<p className="text-sm text-muted-foreground"> | ||
Customize the look and feel of your experience by adjusting themes, | ||
colors, and display preferences. | ||
</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: description text implies theme customization but AppearanceForm only shows blog layout options - either update text or expand functionality
</div> | ||
<Separator className="my-6" /> | ||
<div className="flex flex-col space-y-8 lg:flex-row lg:space-x-12 lg:space-y-0"> | ||
<aside className="-mx-4 lg:w-1/5"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Negative margin (-mx-4) could cause horizontal scrolling issues on some viewports
<div | ||
className="[&:has([data-state=checked])>div]:border-primary" | ||
onClick={() => handleLayoutChange("new")} | ||
> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: redundant onClick handler since RadioGroup already handles value changes through onValueChange
> | ||
<RadioGroupItem value="new" className="sr-only" /> | ||
<div className="items-center rounded-md border-2 border-muted p-1 hover:border-accent"> | ||
<div className="space-y-2 rounded-sm bg-white p-2 shadow-sm"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: consider adding dark mode support for bg-white and shadow styling
Quality Gate passedIssues Measures |
PR Content:
AppearanceForm
component for appearance settings.ArticleSplash
component for better maintainability.