Skip to content
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

Blog & UI #97

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Blog & UI #97

wants to merge 13 commits into from

Conversation

nirnejak
Copy link
Collaborator

@nirnejak nirnejak commented Feb 27, 2025

Summary by CodeRabbit

  • Style

    • Enhanced the visual presentation of headings with bolder typography and tighter letter spacing for improved readability.
  • Documentation

    • Refined content formatting by adjusting header presentation, correcting typographic errors, and updating embedded content dimensions for a better viewing experience.
  • Chores

    • Updated various dependencies to their latest versions for improved performance and potential bug fixes.
  • New Features

    • Added cover images to the metadata of multiple pages, enhancing visual representation for social sharing and previews.
  • New Features

    • Introduced a sitemap function to aggregate and return URLs for blog posts, tools, and static routes.

@nirnejak nirnejak added the WIP Work in Progress label Feb 27, 2025
@nirnejak nirnejak self-assigned this Feb 27, 2025
Copy link

vercel bot commented Feb 27, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
devtoolsacademy ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 18, 2025 8:35am

Copy link
Contributor

coderabbitai bot commented Feb 27, 2025

Walkthrough

This pull request updates the visual styling and formatting across several files. In particular, several components have modified CSS class names to adjust heading font weights and tracking, shifting from semi-bold or bold to bolder variants. The MDX blog page has revised section header formatting, corrected textual contractions, and updated an iframe’s height and source URL. Additionally, several dependencies in the package.json file have been updated to newer versions. There are no modifications to exported or public entities.

Changes

File(s) Change Summary
mdx-components.tsx, src/components/blog/CommentSection.tsx, src/components/blog/TableOfContents.tsx Updated CSS classes for headings: adjusted font weights (semi-bold → bold, bold → extra-bold) and added/updated letter-spacing classes.
src/app/blog/enhancing-web-experiences-with-the-view-transitions-api/page.mdx Removed bold formatting from section headers, corrected contractions, increased iframe height from 300 to 500, and changed the iframe's default tab to "result".
package.json Updated several dependencies and devDependencies to newer versions.
src/components/Hero.tsx, src/components/blog/BlogChatInterface.tsx Removed size-full class from div elements, affecting their styling.
src/app/blog/page.tsx, src/app/contribute/page.tsx, src/app/sponsor/page.tsx, src/app/tools/page.tsx Added CoverImage import and image property to metadata in respective files.
src/app/sitemap.ts Introduced a new file that exports an asynchronous function to construct and return a sitemap.
src/lib/metadata.ts Updated baseUrl constant by removing the trailing slash.

Suggested reviewers

  • tyaga001

Suggested labels

enhancement, frontend, UX, ui, accessibility

Warning

There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

npm warn config production Use --omit=dev instead.
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: @typescript-eslint/[email protected]
npm warn Found: [email protected]
npm warn node_modules/typescript
npm warn dev typescript@"^5.8.2" from the root project
npm warn 2 more (eslint-config-next, ts-api-utils)
npm warn
npm warn Could not resolve dependency:
npm warn peer typescript@">=4.8.4 <5.8.0" from @typescript-eslint/[email protected]
npm warn node_modules/@typescript-eslint/eslint-plugin
npm warn @typescript-eslint/eslint-plugin@"^5.4.2 || ^6.0.0 || ^7.0.0 || ^8.0.0" from [email protected]
npm warn node_modules/eslint-config-next
npm warn
npm warn Conflicting peer dependency: [email protected]
npm warn node_modules/typescript
npm warn peer typescript@">=4.8.4 <5.8.0" from @typescript-eslint/[email protected]
npm warn node_modules/@typescript-eslint/eslint-plugin
npm warn @typescript-eslint/eslint-plugin@"^5.4.2 || ^6.0.0 || ^7.0.0 || ^8.0.0" from [email protected]
npm warn node_modules/eslint-config-next
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: @typescript-eslint/[email protected]
npm warn Found: [email protected]
npm warn node_modules/typescript
npm warn dev typescript@"^5.8.2" from the root project
npm warn 2 more (eslint-config-next, ts-api-utils)
npm warn
npm warn Could not resolve dependency:
npm warn peer typescript@">=4.8.4 <5.8.0" from @typescript-eslint/[email protected]
npm warn node_modules/@typescript-eslint/parser
npm warn peer @typescript-eslint/parser@"^8.0.0 || ^8.0.0-alpha.0" from @typescript-eslint/[email protected]
npm warn node_modules/@typescript-eslint/eslint-plugin
npm warn 1 more (eslint-config-next)
npm warn
npm warn Conflicting peer dependency: [email protected]
npm warn node_modules/typescript
npm warn peer typescript@">=4.8.4 <5.8.0" from @typescript-eslint/[email protected]
npm warn node_modules/@typescript-eslint/parser
npm warn peer @typescript-eslint/parser@"^8.0.0 || ^8.0.0-alpha.0" from @typescript-eslint/[email protected]
npm warn node_modules/@typescript-eslint/eslint-plugin
npm warn 1 more (eslint-config-next)
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: @typescript-eslint/[email protected]
npm warn Found: [email protected]
npm warn node_modules/typescript
npm warn dev typescript@"^5.8.2" from the root project
npm warn 2 more (eslint-config-next, ts-api-utils)
npm warn
npm warn Could not resolve dependency:
npm warn peer typescript@">=4.8.4 <5.8.0" from @typescript-eslint/[email protected]
npm warn node_modules/@typescript-eslint/type-utils
npm warn @typescript-eslint/type-utils@"8.19.1" from @typescript-eslint/[email protected]
npm warn node_modules/@typescript-eslint/eslint-plugin
npm warn
npm warn Conflicting peer dependency: [email protected]
npm warn node_modules/typescript
npm warn peer typescript@">=4.8.4 <5.8.0" from @typescript-eslint/[email protected]
npm warn node_modules/@typescript-eslint/type-utils
npm warn @typescript-eslint/type-utils@"8.19.1" from @typescript-eslint/[email protected]
npm warn node_modules/@typescript-eslint/eslint-plugin
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: @typescript-eslint/[email protected]
npm warn Found: [email protected]
npm warn node_modules/typescript
npm warn dev typescript@"^5.8.2" from the root project
npm warn 2 more (eslint-config-next, ts-api-utils)
npm warn
npm warn Could not resolve dependency:
npm warn peer typescript@">=4.8.4 <5.8.0" from @typescript-eslint/[email protected]
npm warn node_modules/@typescript-eslint/typescript-estree
npm warn @typescript-eslint/typescript-estree@"8.19.1" from @typescript-eslint/[email protected]
npm warn node_modules/@typescript-eslint/parser
npm warn 2 more (@typescript-eslint/type-utils, @typescript-eslint/utils)
npm warn
npm warn Conflicting peer dependency: [email protected]
npm warn node_modules/typescript
npm warn peer typescript@">=4.8.4 <5.8.0" from @typescript-eslint/[email protected]
npm warn node_modules/@typescript-eslint/typescript-estree
npm warn @typescript-eslint/typescript-estree@"8.19.1" from @typescript-eslint/[email protected]
npm warn node_modules/@typescript-eslint/parser
npm warn 2 more (@typescript-eslint/type-utils, @typescript-eslint/utils)
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: @typescript-eslint/[email protected]
npm warn Found: [email protected]
npm warn node_modules/typescript
npm warn dev typescript@"^5.8.2" from the root project
npm warn 2 more (eslint-config-next, ts-api-utils)
npm warn
npm warn Could not resolve dependency:
npm warn peer typescript@">=4.8.4 <5.8.0" from @typescript-eslint/[email protected]
npm warn node_modules/@typescript-eslint/utils
npm warn @typescript-eslint/utils@"8.19.1" from @typescript-eslint/[email protected]
npm warn node_modules/@typescript-eslint/eslint-plugin
npm warn 1 more (@typescript-eslint/type-utils)
npm warn
npm warn Conflicting peer dependency: [email protected]
npm warn node_modules/typescript
npm warn peer typescript@">=4.8.4 <5.8.0" from @typescript-eslint/[email protected]
npm warn node_modules/@typescript-eslint/utils
npm warn @typescript-eslint/utils@"8.19.1" from @typescript-eslint/[email protected]
npm warn node_modules/@typescript-eslint/eslint-plugin
npm warn 1 more (@typescript-eslint/type-utils)
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/react
npm error dev react@"^19.0.0" from the root project
npm error peer react@"^18.0.0 || ^19.0.0 || ^19.0.0-0" from @clerk/[email protected]
npm error node_modules/@clerk/clerk-react
npm error @clerk/clerk-react@"^5.24.0" from @clerk/[email protected]
npm error node_modules/@clerk/nextjs
npm error dev @clerk/nextjs@"^6.12.1" from the root project
npm error 47 more (@clerk/nextjs, @clerk/shared, @floating-ui/react-dom, ...)
npm error
npm error Could not resolve dependency:
npm error peer react@"^18.2.0" from [email protected]
npm error node_modules/next-view-transitions
npm error dev next-view-transitions@"^0.3.4" from the root project
npm error
npm error Conflicting peer dependency: [email protected]
npm error node_modules/react
npm error peer react@"^18.2.0" from [email protected]
npm error node_modules/next-view-transitions
npm error dev next-view-transitions@"^0.3.4" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /.npm/_logs/2025-03-16T19_29_15_753Z-eresolve-report.txt
npm error A complete log of this run can be found in: /.npm/_logs/2025-03-16T19_29_15_753Z-debug-0.log

Tip

⚡🧪 Multi-step agentic review comment chat (experimental)
  • We're introducing multi-step agentic chat in review comments. This experimental feature enhances review discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments.
    - To enable this feature, set early_access to true under in the settings.
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cd9a08a and c81ff33.

📒 Files selected for processing (4)
  • mdx-components.tsx (1 hunks)
  • src/app/blog/enhancing-web-experiences-with-the-view-transitions-api/page.mdx (10 hunks)
  • src/components/blog/CommentSection.tsx (1 hunks)
  • src/components/blog/TableOfContents.tsx (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • src/components/blog/TableOfContents.tsx
  • src/components/blog/CommentSection.tsx
🧰 Additional context used
🪛 LanguageTool
src/app/blog/enhancing-web-experiences-with-the-view-transitions-api/page.mdx

[typographical] ~168-~168: Consider adding a comma after ‘Fortunately’ for more clarity.
Context: ... ## View Transitions API with Next.js Fortunately there's a npm package that integrates w...

(RB_LY_COMMA)


[uncategorized] ~169-~169: You might be missing the article “the” here.
Context: ...s with Next.js directly and makes using View Transitions API very easy. Here's the s...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[style] ~169-~169: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...ly and makes using View Transitions API very easy. Here's the steps to getting it integra...

(EN_WEAK_ADJECTIVE)


[grammar] ~169-~169: Did you mean “Here are the steps”?
Context: ...s using View Transitions API very easy. Here's the steps to getting it integrated into your exis...

(THERE_S_MANY)


[uncategorized] ~205-~205: You might be missing the article “a” here.
Context: ...een the pages you should be able to see smooth transition. You can take look at there ...

(AI_EN_LECTOR_MISSING_DETERMINER_A)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build (20.x)
🔇 Additional comments (2)
mdx-components.tsx (1)

36-37: LGTM: Enhanced heading typography.

The updated font weights for headings create better visual hierarchy - changing from semi-bold to bold for general headings and from bold to extra-bold for h1. This enhancement improves readability and visual differentiation between heading levels.

src/app/blog/enhancing-web-experiences-with-the-view-transitions-api/page.mdx (1)

153-157: LGTM: Improved iframe presentation.

The increased iframe height (300→500) provides better visibility for the embedded content. Setting the default tab to "result" improves UX by showing the output immediately rather than requiring users to switch tabs.

@@ -202,13 +202,13 @@ const MyComponent = () => {
}
```

And thats it, now as you navigate between the pages you should be able to see smooth transition. You can take look at there example [here](https://nirnejak.com/)
And that's it, now as you navigate between the pages you should be able to see smooth transition. You can take look at there example [here](https://nirnejak.com/)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Correct grammar mistake.

There's a missing article and a pronoun mistake in this sentence.

-And that's it, now as you navigate between the pages you should be able to see smooth transition. You can take look at there example [here](https://nirnejak.com/)
+And that's it, now as you navigate between the pages you should be able to see smooth transition. You can take a look at their example [here](https://nirnejak.com/)
📝 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.

Suggested change
And that's it, now as you navigate between the pages you should be able to see smooth transition. You can take look at there example [here](https://nirnejak.com/)
And that's it, now as you navigate between the pages you should be able to see smooth transition. You can take a look at their example [here](https://nirnejak.com/)
🧰 Tools
🪛 LanguageTool

[uncategorized] ~205-~205: You might be missing the article “a” here.
Context: ...een the pages you should be able to see smooth transition. You can take look at there ...

(AI_EN_LECTOR_MISSING_DETERMINER_A)


Fortunately theres a npm package that integrates with Next.js directly and makes using View Transitions API very easy. Heres the steps to getting it integrated into your existing Next.js App.
Fortunately there's a npm package that integrates with Next.js directly and makes using View Transitions API very easy. Here's the steps to getting it integrated into your existing Next.js App.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Fix grammar issues in the introduction paragraph.

There are several grammatical issues in this sentence that should be corrected.

-Fortunately there's a npm package that integrates with Next.js directly and makes using View Transitions API very easy. Here's the steps to getting it integrated into your existing Next.js App.
+Fortunately, there's an npm package that integrates with Next.js directly and makes using the View Transitions API easy. Here are the steps to getting it integrated into your existing Next.js App.
📝 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.

Suggested change
Fortunately there's a npm package that integrates with Next.js directly and makes using View Transitions API very easy. Here's the steps to getting it integrated into your existing Next.js App.
Fortunately, there's an npm package that integrates with Next.js directly and makes using the View Transitions API easy. Here are the steps to getting it integrated into your existing Next.js App.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~169-~169: You might be missing the article “the” here.
Context: ...s with Next.js directly and makes using View Transitions API very easy. Here's the s...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[style] ~169-~169: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...ly and makes using View Transitions API very easy. Here's the steps to getting it integra...

(EN_WEAK_ADJECTIVE)


[grammar] ~169-~169: Did you mean “Here are the steps”?
Context: ...s using View Transitions API very easy. Here's the steps to getting it integrated into your exis...

(THERE_S_MANY)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/components/Hero.tsx (1)

12-12: CSS optimization: Redundant size-full class removed.

The removal of the size-full class is appropriate since the absolute positioning combined with inset-0 already achieves the same effect - stretching the element to fill its container. This change helps reduce redundancy in the styling.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 77fa246 and 0fa4c4c.

📒 Files selected for processing (2)
  • src/components/Hero.tsx (1 hunks)
  • src/components/blog/BlogChatInterface.tsx (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • src/components/blog/BlogChatInterface.tsx

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
src/app/sitemap.ts (2)

15-22: Consider adding error handling for database operations.

The database query looks well-implemented with good fallback handling for the lastModified field, but there's no error handling if the database query fails.

-  // Fetch all tools directly from the database
-  const tools = await prisma.tool.findMany()
-  const toolPages = tools.map((tool) => ({
+  // Fetch all tools directly from the database
+  let toolPages = []
+  try {
+    const tools = await prisma.tool.findMany()
+    toolPages = tools.map((tool) => ({
+      url: `${baseUrl}/tools/${tool.name}/`,
+      lastModified: tool.updatedAt || tool.lastUpdated || new Date(),
+      changeFrequency: "weekly" as const,
+      priority: 0.8,
+    }))
+  } catch (error) {
+    console.error("Failed to fetch tools for sitemap:", error)
+  }

24-55: Consider reusing the date for static routes.

Creating new Date() for each static route means the lastModified date will be different each time the sitemap is generated. Consider using a single date instance for static routes if they're typically updated together.

+  const currentDate = new Date()
   const staticRoutes = [
     {
       url: baseUrl,
-      lastModified: new Date(),
+      lastModified: currentDate,
       changeFrequency: "daily" as const,
       priority: 1,
     },
     {
       url: `${baseUrl}/tools/`,
-      lastModified: new Date(),
+      lastModified: currentDate,
       changeFrequency: "weekly" as const,
       priority: 0.8,
     },
     // ... remaining routes with the same change
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c26f01a and fe55aa1.

📒 Files selected for processing (2)
  • src/app/sitemap.ts (1 hunks)
  • src/lib/metadata.ts (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • src/lib/metadata.ts
🔇 Additional comments (4)
src/app/sitemap.ts (4)

1-6: Import structure looks good.

The imports are well-organized, importing the necessary dependencies from Next.js, the blog data, base URL, and Prisma client for database access.


7-13: Blog sitemap entries implementation is solid.

The function correctly maps blog posts to sitemap entries with appropriate URL formatting, lastModified dates from publish dates, and reasonable priority values. The use of as const for change frequency is a good TypeScript practice to ensure type safety.


57-58: Efficient return statement combining all routes.

The spread operator efficiently combines all route arrays into a single sitemap array. This is a clean and concise approach.


19-19:

✅ Verification successful

Verify the fallback logic for lastModified.

The fallback chain is a good approach, but ensure that both updatedAt and lastUpdated fields exist in your database schema. If one is deprecated, consider simplifying.


🏁 Script executed:

#!/bin/bash
# Check for the definition of the Tool model in the Prisma schema
cat prisma/schema.prisma | grep -A 20 "model Tool"

Length of output: 517


Verified: The fallback logic for lastModified is valid.

After checking the Prisma schema for the Tool model, both updatedAt and lastUpdated are present and correctly defined. The fallback chain (tool.updatedAt || tool.lastUpdated || new Date()) is therefore appropriate, and no changes are required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WIP Work in Progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant