-
Notifications
You must be signed in to change notification settings - Fork 3k
fix(blog): add back unoptimized tag, fix styling #2461
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR adds the Key Changes:
Style Guide Violations:
Confidence Score: 3/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Browser
participant StudioPage as Studio Page (SSR)
participant PostGrid as PostGrid Component
participant NextImage as Next.js Image
User->>Browser: Navigate to /studio
Browser->>StudioPage: Request blog page
StudioPage->>StudioPage: getAllPostMeta() - server side
StudioPage->>PostGrid: Render with posts data
PostGrid->>PostGrid: Map posts array
loop Each post (index-based)
PostGrid->>NextImage: Render image with unoptimized=true
alt index < 6
NextImage->>Browser: Load with priority (eager)
else index >= 6
NextImage->>Browser: Load with lazy loading
end
end
Browser->>User: Display blog grid
User->>Browser: Navigate to /studio/[slug]
Browser->>StudioPage: Request blog post
StudioPage->>StudioPage: getPostBySlug() - server side
StudioPage->>NextImage: Render hero image (unoptimized=true, priority)
StudioPage->>StudioPage: Render MDX content
Note over StudioPage: MDX components render with unoptimized images
Browser->>User: Display blog post with enhanced styling
|
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.
Additional Comments (7)
-
apps/sim/lib/blog/mdx.tsx, line 22-24 (link)style: inline
styleprop violates Tailwind-only styling rule - use Tailwind classes insteadNote: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Context Used: Context from
dashboard- Tailwind CSS and styling conventions (source) -
apps/sim/lib/blog/mdx.tsx, line 28-30 (link)style: inline
styleprop violates Tailwind-only styling ruleNote: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Context Used: Context from
dashboard- Tailwind CSS and styling conventions (source) -
apps/sim/lib/blog/mdx.tsx, line 35-37 (link)style: inline
styleprop violates Tailwind-only styling ruleNote: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Context Used: Context from
dashboard- Tailwind CSS and styling conventions (source) -
apps/sim/lib/blog/mdx.tsx, line 42-44 (link)style: inline
styleprop violates Tailwind-only styling ruleNote: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Context Used: Context from
dashboard- Tailwind CSS and styling conventions (source) -
apps/sim/lib/blog/mdx.tsx, line 49-51 (link)style: inline
styleprop violates Tailwind-only styling ruleNote: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Context Used: Context from
dashboard- Tailwind CSS and styling conventions (source) -
apps/sim/lib/blog/mdx.tsx, line 56-61 (link)style: inline
styleprop violates Tailwind-only styling ruleNote: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Context Used: Context from
dashboard- Tailwind CSS and styling conventions (source) -
apps/sim/lib/blog/mdx.tsx, line 87-89 (link)style: inline
styleprop violates Tailwind-only styling ruleNote: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Context Used: Context from
dashboard- Tailwind CSS and styling conventions (source)
12 files reviewed, 10 comments
| priority={index < 6} | ||
| loading={index < 6 ? undefined : 'lazy'} | ||
| fill | ||
| style={{ objectFit: 'cover' }} |
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: inline style prop violates Tailwind-only styling rule
| style={{ objectFit: 'cover' }} | |
| className="object-cover" |
Context Used: Context from dashboard - Tailwind CSS and styling conventions (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/app/(landing)/studio/post-grid.tsx
Line: 41:41
Comment:
**style:** inline `style` prop violates Tailwind-only styling rule
```suggestion
className="object-cover"
```
**Context Used:** Context from `dashboard` - Tailwind CSS and styling conventions ([source](https://app.greptile.com/review/custom-context?memory=e1e9ca56-9819-463f-be67-0d2ba849ec4f))
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise.| className={clsx( | ||
| 'rounded bg-gray-100 px-1.5 py-0.5 font-mono text-[0.9em] text-red-600', | ||
| 'rounded bg-gray-100 px-1.5 py-0.5 font-mono font-normal text-[0.9em] text-red-600', | ||
| props.className | ||
| )} | ||
| style={{ fontWeight: 400 }} | ||
| /> |
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: inline style prop violates Tailwind-only styling rule - remove the style attribute and keep only Tailwind classes
| className={clsx( | |
| 'rounded bg-gray-100 px-1.5 py-0.5 font-mono text-[0.9em] text-red-600', | |
| 'rounded bg-gray-100 px-1.5 py-0.5 font-mono font-normal text-[0.9em] text-red-600', | |
| props.className | |
| )} | |
| style={{ fontWeight: 400 }} | |
| /> | |
| className={clsx( | |
| 'rounded bg-gray-100 px-1.5 py-0.5 font-mono font-normal text-[0.9em] text-red-600', | |
| props.className | |
| )} |
Context Used: Context from dashboard - Tailwind CSS and styling conventions (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/lib/blog/mdx.tsx
Line: 131:136
Comment:
**style:** inline `style` prop violates Tailwind-only styling rule - remove the `style` attribute and keep only Tailwind classes
```suggestion
className={clsx(
'rounded bg-gray-100 px-1.5 py-0.5 font-mono font-normal text-[0.9em] text-red-600',
props.className
)}
```
**Context Used:** Context from `dashboard` - Tailwind CSS and styling conventions ([source](https://app.greptile.com/review/custom-context?memory=e1e9ca56-9819-463f-be67-0d2ba849ec4f))
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise.|
|
||
| /** | ||
| * Remove backticks from inline code in prose (Tailwind Typography default) | ||
| */ | ||
| .prose code::before, | ||
| .prose code::after { | ||
| content: none !important; | ||
| } | ||
|
|
||
| /** | ||
| * Remove underlines from heading anchor links in prose | ||
| */ | ||
| .prose h1 a, | ||
| .prose h2 a, | ||
| .prose h3 a, | ||
| .prose h4 a, | ||
| .prose h5 a, | ||
| .prose h6 a { | ||
| text-decoration: none !important; | ||
| color: inherit !important; | ||
| } |
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: violates custom rule to avoid editing globals.css - these styles should be moved to local component files or use Tailwind's prose plugin configuration
The prose customizations should be handled via Tailwind config's typography plugin, not in globals.css:
// In tailwind.config.ts
typography: {
DEFAULT: {
css: {
'code::before': { content: 'none' },
'code::after': { content: 'none' },
'h1 a, h2 a, h3 a, h4 a, h5 a, h6 a': {
textDecoration: 'none',
color: 'inherit'
}
}
}
}
Context Used: Context from dashboard - Avoid editing the globals.css file unless absolutely necessary. Move style changes to local componen... (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/app/_styles/globals.css
Line: 762:782
Comment:
**style:** violates custom rule to avoid editing `globals.css` - these styles should be moved to local component files or use Tailwind's prose plugin configuration
The prose customizations should be handled via Tailwind config's typography plugin, not in globals.css:
```
// In tailwind.config.ts
typography: {
DEFAULT: {
css: {
'code::before': { content: 'none' },
'code::after': { content: 'none' },
'h1 a, h2 a, h3 a, h4 a, h5 a, h6 a': {
textDecoration: 'none',
color: 'inherit'
}
}
}
}
```
**Context Used:** Context from `dashboard` - Avoid editing the globals.css file unless absolutely necessary. Move style changes to local componen... ([source](https://app.greptile.com/review/custom-context?memory=c3b5e4b0-6580-4307-83aa-ba28f105b3c4))
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise.
Summary
Type of Change
Testing
Tested manually
Checklist