fix: standardize spacing units from pixel values to Tailwind spacing …#108
fix: standardize spacing units from pixel values to Tailwind spacing …#108
Conversation
…scale Convert hardcoded pixel values to Tailwind's spacing scale for better consistency and maintainability. Updated max-width, height, and min-width values across components including cards, search results, sidebar, and table of contents. Also updated dependencies to latest patch versions.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Reviewer's guide (collapsed on small PRs)Reviewer's GuideStandardizes several hardcoded pixel-based layout dimensions to Tailwind spacing scale utilities across UI components and updates Next.js, related tooling, type definitions, Node engine, pnpm, and lockfile to the latest patch versions. Class diagram for components updated to Tailwind spacing scaleclassDiagram
class Search {
+string layoutMaxHeight
+string cardMaxWidth
+string cardMaxWidthSm
}
class NotFoundPage {
+string textMaxWidth
}
class HomePage {
+string textMaxWidth
}
class Card {
+number imageWidth
+number imageHeight
+string imageHeightClass
}
class Sidebar {
+string minWidth
}
class TableOfContents {
+string minWidth
}
class Settings {
+boolean rightbar
+boolean toc
}
Search --> Card : renders
HomePage --> Sidebar : uses
HomePage --> TableOfContents : uses
NotFoundPage --> Sidebar : uses
TableOfContents --> Settings : reads
Sidebar --> Settings : reads
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The new Tailwind spacing classes like
max-h-87.5,max-w-77.5,max-w-120,h-45, andmin-w-57.5are not part of the default spacing scale; ensure corresponding custom spacing keys exist in your Tailwind config or consider keeping these as arbitrary values (e.g.max-h-[21.875rem]) for reliability. - With the Node engine updated to
^24.xandpnpmbumped, double-check that your CI and deployment environments are explicitly configured to use these versions to avoid unexpected runtime or tooling mismatches.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The new Tailwind spacing classes like `max-h-87.5`, `max-w-77.5`, `max-w-120`, `h-45`, and `min-w-57.5` are not part of the default spacing scale; ensure corresponding custom spacing keys exist in your Tailwind config or consider keeping these as arbitrary values (e.g. `max-h-[21.875rem]`) for reliability.
- With the Node engine updated to `^24.x` and `pnpm` bumped, double-check that your CI and deployment environments are explicitly configured to use these versions to avoid unexpected runtime or tooling mismatches.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Pull request overview
This pull request standardizes spacing units across the codebase by converting hardcoded pixel values to Tailwind's spacing scale. The changes include updating component dimensions for cards, search results, sidebar, and table of contents components, along with dependency updates to latest patch versions.
Changes:
- Converted pixel-based spacing values to Tailwind spacing scale (e.g.,
[230px]to57.5,[600px]to150) - Updated Next.js and related dependencies from 16.1.1 to 16.1.2
- Updated development dependencies including TypeScript ESLint, Prettier, and type definitions
- Changed Node.js engine requirement from ^22.x to ^24.x
- Updated package manager from pnpm@10.25.0 to pnpm@10.28.0
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Updated dependency versions with patch updates for Next.js, Babel, TypeScript, ESLint, and other tooling packages |
| package.json | Updated dependency versions and changed Node.js engine requirement to ^24.x |
| components/toc/index.tsx | Changed min-w-[230px] to min-w-57.5 for table of contents sidebar width |
| components/sidebar/index.tsx | Changed min-w-[230px] to min-w-57.5 for sidebar width |
| components/navigation/search.tsx | Converted search dialog max-height and max-width from pixel values to spacing scale units |
| components/markdown/card.tsx | Changed image height from h-[180px] to h-45 |
| app/page.tsx | Changed max-width from [600px] to 150 for homepage description text |
| app/not-found.tsx | Changed max-width from [600px] to 150 for 404 page text |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…scale
Convert hardcoded pixel values to Tailwind's spacing scale for better consistency and maintainability. Updated max-width, height, and min-width values across components including cards, search results, sidebar, and table of contents. Also updated dependencies to latest patch versions.
Summary by Sourcery
Standardize layout spacing values using Tailwind’s spacing scale and refresh tooling and runtime dependencies.
Enhancements:
Build:
Chores: