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

Core: update packages + fixes #1423

Merged
merged 18 commits into from
Jun 19, 2024
Merged

Core: update packages + fixes #1423

merged 18 commits into from
Jun 19, 2024

Conversation

SutuSebastian
Copy link
Collaborator

@SutuSebastian SutuSebastian commented Jun 18, 2024

Changes

  • up packages
  • fix turbo.json config files due to package version update
  • remove React.FC from apps/web
  • format and fix all classNames that had double space or duplicates

Summary by CodeRabbit

  • New Features

    • Converted various components from arrow functions to regular functions for better readability.
  • Bug Fixes

    • Updated multiple dependencies and dev dependencies across projects to the latest versions for improved security and performance.
  • Refactor

    • Renamed key from "pipeline" to "tasks" in configuration files to align with updated standards.
    • Refactored components to remove FC type declaration for cleaner code.
  • Tests

    • Marked Tooltip component test as TODO for future implementation.
  • Chores

    • Updated bun version in setup process from 1.1.0 to 1.1.14.
    • Upgraded various dependencies in package.json files for better compatibility and security.

- up packages
- fix `turbo.json` config files due to package version update
- remove `React.FC` from `apps/web`
- format and fix all classNames that had double space or class duplicates
Copy link

changeset-bot bot commented Jun 18, 2024

🦋 Changeset detected

Latest commit: 04e3ec8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
create-flowbite-react Patch
flowbite-react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Jun 18, 2024

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

Name Status Preview Comments Updated (UTC)
flowbite-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 19, 2024 11:41am
flowbite-react-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 19, 2024 11:41am

Copy link
Contributor

coderabbitai bot commented Jun 18, 2024

Walkthrough

This update to the project involves various improvements and updates across multiple files. Key changes include upgrading dependencies and development dependencies throughout the project, renaming configuration keys for consistency, and refactoring React components for better code practices. Additionally, several testing configurations were updated, and a test case was marked as a TODO.

Changes

Files/Grouped Changes Change Summaries
.../.github/actions/setup/action.yml Updated bun-version from 1.1.0 to 1.1.14.
apps/storybook/package.json Updated react, react-dom, and various @storybook, development, and other dependencies' versions.
apps/storybook/turbo.json, packages/cli/turbo.json Renamed the pipeline key to tasks in the turbo.json configuration files.
apps/web/components/.../banner.tsx, .../carbon-ads.tsx, ... Refactored components from functional to regular function components.
apps/web/components/mdx.tsx Changed import statement for getMDXComponent from next-contentlayer/hooks to next-contentlayer2/hooks.
apps/web/package.json, package.json, packages/cli/package.json, packages/ui/package.json Updated various dependencies and devDependencies for consistency and latest versions.
packages/ui/src/components/Tooltip/Tooltip.spec.tsx Marked a test as a TODO item with it.todo.

Poem

In code's bright garden, updates bloom 🌷
Dependencies rise in new-found room 🆙
Keys renamed and types refined ✨
Functions in their best design.
With every change, our software glows,
Hopping forward, like the rabbit shows 🐇


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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: 1

Outside diff range and nitpick comments (9)
apps/web/components/homepage/tailwind-section.tsx (1)

Line range hint 66-66: Add a title element or aria-label to SVG for better accessibility.

- <svg width="16" height="11" viewBox="0 0 16 11" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <svg width="16" height="11" viewBox="0 0 16 11" fill="none" xmlns="http://www.w3.org/2000/svg" aria-label="Arrow Right">
apps/web/components/homepage/dark-mode-section/dark-mode-switcher.tsx (1)

Line range hint 18-18: Add a title element or aria-label to all SVGs for better accessibility.

- <svg className="size-6" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
+ <svg className="size-6" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" aria-label="Light Mode Icon">

Also applies to: 28-28, 33-38, 49-54, 64-64, 74-74

apps/web/components/homepage/react-section.tsx (2)

Line range hint 42-42: Provide a valid value for the href attribute.

- <a href="" className="text-lg font-medium text-gray-900 underline hover:no-underline dark:text-white">
+ <a href="#" className="text-lg font-medium text-gray-900 underline hover:no-underline dark:text-white">

Line range hint 60-67: Add a title element or aria-label to SVG for better accessibility.

- <svg className="size-5 rounded-full bg-cyan-100 p-1 text-cyan-700 dark:bg-gray-700" width="14" height="10" viewBox="0 0 14 10" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <svg className="size-5 rounded-full bg-cyan-100 p-1 text-cyan-700 dark:bg-gray-700" width="14" height="10" viewBox="0 0 14 10" fill="none" xmlns="http://www.w3.org/2000/svg" aria-label="Check Icon">
apps/web/components/homepage/dark-mode-section/dark-mode-section.tsx (1)

Line range hint 58-65: Add a title element or aria-label to all SVGs for better accessibility.

- <svg className="size-5 rounded-full bg-cyan-100 p-1 text-cyan-700 dark:bg-gray-700" width="14" height="10" viewBox="0 0 14 10" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <svg className="size-5 rounded-full bg-cyan-100 p-1 text-cyan-700 dark:bg-gray-700" width="14" height="10" viewBox="0 0 14 10" fill="none" xmlns="http://www.w3.org/2000/svg" aria-label="Check Icon">

Also applies to: 81-81

apps/web/components/homepage/social-proof-section.tsx (1)

Line range hint 48-206: Enhance accessibility for SVG elements.

The SVG elements at lines 60, 124, and 141 lack alternative text, which is crucial for screen readers. Consider adding aria-label attributes to these elements.

60a61
>             aria-label="GitHub Icon"
124a125
>             aria-label="NPM Icon"
141a142
>             aria-label="Discord Icon"
apps/web/components/homepage/figma-section.tsx (1)

Line range hint 3-249: Ensure SVGs meet accessibility standards.

Several SVG elements throughout the file are missing alternative texts. Add aria-label attributes to improve accessibility for users relying on screen readers.

26a27
>             aria-label="Figma Icon"
57a58
>             aria-label="Arrow Icon"
71a72
>             aria-label="Figma Design Icon"
212a213
>             aria-label="Arrow Icon"
apps/web/components/homepage/featured-section.tsx (1)

Line range hint 11-11: Add alternative text to SVGs for accessibility.

- <svg width="105" height="36" viewBox="0 0 105 36" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <svg width="105" height="36" viewBox="0 0 105 36" fill="none" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Reddit logo">

- <svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="DevTo logo">

- <svg width="153" height="36" viewBox="0 0 153 36" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <svg width="153" height="36" viewBox="0 0 153 36" fill="none" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Product Hunt logo">

- <svg width="161" height="34" viewBox="0 0 161 34" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <svg width="161" height="34" viewBox="0 0 161 34" fill="none" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Hacker News logo">

- <svg width="113" height="24" viewBox="0 0 113 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <svg width="113" height="24" viewBox="0 0 113 24" fill="none" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="YouTube Channel logo">

Also applies to: 31-31, 39-39, 55-55, 104-104

apps/web/examples/megaMenu/megaMenu.icons.tsx (1)

Line range hint 328-328: All anchor tags with href="#" should be updated or handled programmatically.

It's important to ensure that all links either lead to valid URLs or are handled by JavaScript to prevent page reloads and improve accessibility. This is crucial for users who rely on assistive technologies.

Also applies to: 342-342, 356-356, 372-372, 387-387, 403-403, 418-418, 432-432, 446-446, 462-462, 476-476, 490-490

Tools
Biome

[error] 372-372: Provide a valid value for the attribute href. (lint/a11y/useValidAnchor)

The href attribute should be a valid a URL
Check this thorough explanation to better understand the context.

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 3f921d9 and f0e23a6.

Files ignored due to path filters (1)
  • bun.lockb is excluded by !**/bun.lockb
Files selected for processing (39)
  • .changeset/sour-spiders-melt.md (1 hunks)
  • .github/actions/setup/action.yml (1 hunks)
  • apps/storybook/package.json (1 hunks)
  • apps/storybook/turbo.json (1 hunks)
  • apps/web/components/banner.tsx (2 hunks)
  • apps/web/components/carbon-ads.tsx (3 hunks)
  • apps/web/components/homepage/components-section.tsx (4 hunks)
  • apps/web/components/homepage/contributors-section.tsx (3 hunks)
  • apps/web/components/homepage/dark-mode-section/dark-mode-section.tsx (3 hunks)
  • apps/web/components/homepage/dark-mode-section/dark-mode-switcher.tsx (2 hunks)
  • apps/web/components/homepage/featured-section.tsx (2 hunks)
  • apps/web/components/homepage/figma-section.tsx (2 hunks)
  • apps/web/components/homepage/hero-section/copy-package-input.tsx (2 hunks)
  • apps/web/components/homepage/hero-section/hero-section.tsx (2 hunks)
  • apps/web/components/homepage/home-navbar.tsx (2 hunks)
  • apps/web/components/homepage/main-footer.tsx (2 hunks)
  • apps/web/components/homepage/react-section.tsx (3 hunks)
  • apps/web/components/homepage/social-proof-section.tsx (3 hunks)
  • apps/web/components/homepage/tailwind-section.tsx (2 hunks)
  • apps/web/components/mdx.tsx (1 hunks)
  • apps/web/components/navbar.tsx (3 hunks)
  • apps/web/contentlayer.config.js (1 hunks)
  • apps/web/examples/megaMenu/megaMenu.icons.tsx (1 hunks)
  • apps/web/next.config.js (1 hunks)
  • apps/web/package.json (1 hunks)
  • apps/web/turbo.json (1 hunks)
  • package.json (1 hunks)
  • packages/cli/package.json (1 hunks)
  • packages/cli/turbo.json (1 hunks)
  • packages/ui/.eslintrc.cjs (1 hunks)
  • packages/ui/package.json (1 hunks)
  • packages/ui/src/components/Button/theme.ts (1 hunks)
  • packages/ui/src/components/Datepicker/theme.ts (2 hunks)
  • packages/ui/src/components/FloatingLabel/theme.ts (1 hunks)
  • packages/ui/src/components/Navbar/theme.ts (1 hunks)
  • packages/ui/src/components/Tabs/theme.ts (1 hunks)
  • packages/ui/tsconfig.json (1 hunks)
  • packages/ui/turbo.json (1 hunks)
  • turbo.json (1 hunks)
Files skipped from review due to trivial changes (18)
  • .changeset/sour-spiders-melt.md
  • .github/actions/setup/action.yml
  • apps/storybook/package.json
  • apps/storybook/turbo.json
  • apps/web/components/carbon-ads.tsx
  • apps/web/components/homepage/main-footer.tsx
  • apps/web/components/mdx.tsx
  • apps/web/components/navbar.tsx
  • apps/web/turbo.json
  • package.json
  • packages/cli/package.json
  • packages/cli/turbo.json
  • packages/ui/.eslintrc.cjs
  • packages/ui/src/components/Button/theme.ts
  • packages/ui/src/components/Datepicker/theme.ts
  • packages/ui/src/components/FloatingLabel/theme.ts
  • packages/ui/turbo.json
  • turbo.json
Additional context used
Biome
apps/web/components/homepage/tailwind-section.tsx

[error] 66-66: Alternative text title element cannot be empty (lint/a11y/noSvgWithoutTitle)

For accessibility purposes, SVGs should have an alternative text, provided via title element. If the svg element has role="img", you should add the aria-label or aria-labelledby attribute.

apps/web/components/homepage/dark-mode-section/dark-mode-switcher.tsx

[error] 18-18: Alternative text title element cannot be empty (lint/a11y/noSvgWithoutTitle)

For accessibility purposes, SVGs should have an alternative text, provided via title element. If the svg element has role="img", you should add the aria-label or aria-labelledby attribute.


[error] 28-28: Alternative text title element cannot be empty (lint/a11y/noSvgWithoutTitle)

For accessibility purposes, SVGs should have an alternative text, provided via title element. If the svg element has role="img", you should add the aria-label or aria-labelledby attribute.


[error] 33-38: Alternative text title element cannot be empty (lint/a11y/noSvgWithoutTitle)

For accessibility purposes, SVGs should have an alternative text, provided via title element. If the svg element has role="img", you should add the aria-label or aria-labelledby attribute.


[error] 49-54: Alternative text title element cannot be empty (lint/a11y/noSvgWithoutTitle)

For accessibility purposes, SVGs should have an alternative text, provided via title element. If the svg element has role="img", you should add the aria-label or aria-labelledby attribute.


[error] 64-64: Alternative text title element cannot be empty (lint/a11y/noSvgWithoutTitle)

For accessibility purposes, SVGs should have an alternative text, provided via title element. If the svg element has role="img", you should add the aria-label or aria-labelledby attribute.


[error] 74-74: Alternative text title element cannot be empty (lint/a11y/noSvgWithoutTitle)

For accessibility purposes, SVGs should have an alternative text, provided via title element. If the svg element has role="img", you should add the aria-label or aria-labelledby attribute.

apps/web/components/homepage/react-section.tsx

[error] 42-42: Provide a valid value for the attribute href. (lint/a11y/useValidAnchor)

The href attribute should be a valid a URL
Check this thorough explanation to better understand the context.


[error] 60-67: Alternative text title element cannot be empty (lint/a11y/noSvgWithoutTitle)

For accessibility purposes, SVGs should have an alternative text, provided via title element. If the svg element has role="img", you should add the aria-label or aria-labelledby attribute.

apps/web/components/homepage/dark-mode-section/dark-mode-section.tsx

[error] 58-65: Alternative text title element cannot be empty (lint/a11y/noSvgWithoutTitle)

For accessibility purposes, SVGs should have an alternative text, provided via title element. If the svg element has role="img", you should add the aria-label or aria-labelledby attribute.


[error] 81-81: Alternative text title element cannot be empty (lint/a11y/noSvgWithoutTitle)

For accessibility purposes, SVGs should have an alternative text, provided via title element. If the svg element has role="img", you should add the aria-label or aria-labelledby attribute.

apps/web/components/homepage/contributors-section.tsx

[error] 59-59: Alternative text title element cannot be empty (lint/a11y/noSvgWithoutTitle)

For accessibility purposes, SVGs should have an alternative text, provided via title element. If the svg element has role="img", you should add the aria-label or aria-labelledby attribute.


[error] 77-85: Alternative text title element cannot be empty (lint/a11y/noSvgWithoutTitle)

For accessibility purposes, SVGs should have an alternative text, provided via title element. If the svg element has role="img", you should add the aria-label or aria-labelledby attribute.

apps/web/components/homepage/social-proof-section.tsx

[error] 60-60: Alternative text title element cannot be empty (lint/a11y/noSvgWithoutTitle)

For accessibility purposes, SVGs should have an alternative text, provided via title element. If the svg element has role="img", you should add the aria-label or aria-labelledby attribute.


[error] 124-124: Alternative text title element cannot be empty (lint/a11y/noSvgWithoutTitle)

For accessibility purposes, SVGs should have an alternative text, provided via title element. If the svg element has role="img", you should add the aria-label or aria-labelledby attribute.


[error] 141-141: Alternative text title element cannot be empty (lint/a11y/noSvgWithoutTitle)

For accessibility purposes, SVGs should have an alternative text, provided via title element. If the svg element has role="img", you should add the aria-label or aria-labelledby attribute.

apps/web/components/homepage/figma-section.tsx

[error] 26-26: Alternative text title element cannot be empty (lint/a11y/noSvgWithoutTitle)

For accessibility purposes, SVGs should have an alternative text, provided via title element. If the svg element has role="img", you should add the aria-label or aria-labelledby attribute.


[error] 57-57: Alternative text title element cannot be empty (lint/a11y/noSvgWithoutTitle)

For accessibility purposes, SVGs should have an alternative text, provided via title element. If the svg element has role="img", you should add the aria-label or aria-labelledby attribute.


[error] 71-71: Alternative text title element cannot be empty (lint/a11y/noSvgWithoutTitle)

For accessibility purposes, SVGs should have an alternative text, provided via title element. If the svg element has role="img", you should add the aria-label or aria-labelledby attribute.


[error] 212-212: Alternative text title element cannot be empty (lint/a11y/noSvgWithoutTitle)

For accessibility purposes, SVGs should have an alternative text, provided via title element. If the svg element has role="img", you should add the aria-label or aria-labelledby attribute.

apps/web/components/homepage/featured-section.tsx

[error] 11-11: Alternative text title element cannot be empty (lint/a11y/noSvgWithoutTitle)

For accessibility purposes, SVGs should have an alternative text, provided via title element. If the svg element has role="img", you should add the aria-label or aria-labelledby attribute.


[error] 31-31: Alternative text title element cannot be empty (lint/a11y/noSvgWithoutTitle)

For accessibility purposes, SVGs should have an alternative text, provided via title element. If the svg element has role="img", you should add the aria-label or aria-labelledby attribute.


[error] 39-39: Alternative text title element cannot be empty (lint/a11y/noSvgWithoutTitle)

For accessibility purposes, SVGs should have an alternative text, provided via title element. If the svg element has role="img", you should add the aria-label or aria-labelledby attribute.


[error] 55-55: Alternative text title element cannot be empty (lint/a11y/noSvgWithoutTitle)

For accessibility purposes, SVGs should have an alternative text, provided via title element. If the svg element has role="img", you should add the aria-label or aria-labelledby attribute.


[error] 104-104: Alternative text title element cannot be empty (lint/a11y/noSvgWithoutTitle)

For accessibility purposes, SVGs should have an alternative text, provided via title element. If the svg element has role="img", you should add the aria-label or aria-labelledby attribute.

apps/web/examples/megaMenu/megaMenu.icons.tsx

[error] 328-328: Provide a valid value for the attribute href. (lint/a11y/useValidAnchor)

The href attribute should be a valid a URL
Check this thorough explanation to better understand the context.


[error] 342-342: Provide a valid value for the attribute href. (lint/a11y/useValidAnchor)

The href attribute should be a valid a URL
Check this thorough explanation to better understand the context.


[error] 356-356: Provide a valid value for the attribute href. (lint/a11y/useValidAnchor)

The href attribute should be a valid a URL
Check this thorough explanation to better understand the context.


[error] 372-372: Provide a valid value for the attribute href. (lint/a11y/useValidAnchor)

The href attribute should be a valid a URL
Check this thorough explanation to better understand the context.


[error] 387-387: Provide a valid value for the attribute href. (lint/a11y/useValidAnchor)

The href attribute should be a valid a URL
Check this thorough explanation to better understand the context.


[error] 403-403: Provide a valid value for the attribute href. (lint/a11y/useValidAnchor)

The href attribute should be a valid a URL
Check this thorough explanation to better understand the context.


[error] 418-418: Provide a valid value for the attribute href. (lint/a11y/useValidAnchor)

The href attribute should be a valid a URL
Check this thorough explanation to better understand the context.


[error] 432-432: Provide a valid value for the attribute href. (lint/a11y/useValidAnchor)

The href attribute should be a valid a URL
Check this thorough explanation to better understand the context.


[error] 446-446: Provide a valid value for the attribute href. (lint/a11y/useValidAnchor)

The href attribute should be a valid a URL
Check this thorough explanation to better understand the context.


[error] 462-462: Provide a valid value for the attribute href. (lint/a11y/useValidAnchor)

The href attribute should be a valid a URL
Check this thorough explanation to better understand the context.


[error] 476-476: Provide a valid value for the attribute href. (lint/a11y/useValidAnchor)

The href attribute should be a valid a URL
Check this thorough explanation to better understand the context.


[error] 490-490: Provide a valid value for the attribute href. (lint/a11y/useValidAnchor)

The href attribute should be a valid a URL
Check this thorough explanation to better understand the context.

Additional comments not posted (16)
packages/ui/tsconfig.json (1)

29-30: The changes to the TypeScript configuration are appropriate. Excluding the dist directory helps in avoiding compilation of generated code, which is a best practice.

apps/web/contentlayer.config.js (1)

1-1: The updated import statements and configuration align with the new version of contentlayer2. This should ensure compatibility with the latest features and fixes of the library.

apps/web/components/homepage/hero-section/copy-package-input.tsx (1)

Line range hint 11-45: The refactoring of CopyPackageInput from FC<Props> to a regular function component with destructured props enhances clarity and maintainability. Good use of React hooks and event handling.

apps/web/package.json (1)

14-14: All dependency updates and the script change in package.json are consistent with the updates described in the PR. Ensure thorough testing to verify that there are no compatibility issues with these updates.

Also applies to: 17-20, 24-43

Verification successful

The contentlayer2 dependency is correctly listed in the package.json file, and the typecheck script is properly defined as "contentlayer2 build && tsc --noEmit".

  • contentlayer2 dependency is present in apps/web/package.json:
    "contentlayer2": "0.4.6"
  • typecheck script is correctly defined:
    "typecheck": "contentlayer2 build && tsc --noEmit"
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify all updated dependencies do not introduce breaking changes.

# Test: Run automated tests and check for dependency-related errors.
echo "Running tests to check for any breaking changes related to dependency updates..."
npm run test

Length of output: 256



Script:

#!/bin/bash
# Verify that `contentlayer2` is listed as a dependency in the package.json file.
echo "Checking for contentlayer2 dependency in package.json..."
grep '"contentlayer2"' apps/web/package.json

# Verify that the `typecheck` script is correctly defined.
echo "Checking for typecheck script in package.json..."
grep '"typecheck": "contentlayer2 build && tsc --noEmit"' apps/web/package.json

Length of output: 443

apps/web/components/homepage/home-navbar.tsx (1)

Line range hint 7-41: Converted HomeNavbar from React.FC to a standard function component. This aligns with modern React best practices of defining components without unnecessary type wrappers unless needed for generics or defaultProps.

apps/web/components/banner.tsx (1)

Line range hint 3-40: Converted Banner from React.FC to a standard function component. This change is consistent with the PR's goal of removing React.FC across components.

packages/ui/src/components/Navbar/theme.ts (1)

38-38: Enhanced the navbarTheme by adding detailed hover and active states for the Navbar links, improving user interaction by providing clear visual feedback.

packages/ui/src/components/Tabs/theme.ts (1)

22-22: Refined the tabTheme by adding nuanced hover and active states for tab items, enhancing the user interface by making tabs more responsive to interactions.

apps/web/components/homepage/hero-section/hero-section.tsx (1)

Line range hint 7-57: Refactored HeroSection from FC to standard function component successfully. Ensure all related component calls and imports are updated accordingly.

Verification successful

The search results indicate that the HeroSection component is being exported and used correctly in multiple files. This suggests that the refactoring from React.FC to a standard function component has been applied consistently.

  • apps/web/components/homepage/index.ts
  • apps/web/components/homepage/hero-section/hero-section.tsx
  • apps/web/components/homepage/hero-section/index.ts
  • apps/web/app/page.tsx
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify all component calls to `HeroSection` are updated.
# Test: Search for the function usage. Expect: Only occurances of the new function signature.
rg --type python $'HeroSection'

Length of output: 61



Script:

#!/bin/bash
# Description: Verify all component calls to `HeroSection` are updated.
# Test: Search for the function usage. Expect: Only occurrences of the new function signature.
rg 'HeroSection' --type js --type ts

Length of output: 391

packages/ui/package.json (2)

61-67: Dependencies updated as per the PR's objectives. Ensure compatibility with the rest of the project through thorough testing.


71-88: Development dependencies updated. Verify no breaking changes by running the existing test suite and checking for deprecations or compatibility issues with the new versions.

apps/web/next.config.js (1)

1-1: Updated import path for withContentlayer to accommodate the new package version. Ensure that all functionalities provided by contentlayer are still compatible and functioning as expected.

apps/web/components/homepage/components-section.tsx (2)

Line range hint 8-37: Refactored ComponentsSection from FC to standard function component successfully. Ensure all related component calls and imports are updated accordingly.

Verification successful

The verification confirms that the ComponentsSection function has been updated and is being used correctly in the codebase.

  • apps/web/components/homepage/index.ts: Export statement is correct.
  • apps/web/components/homepage/components-section.tsx: The function definition is correct.
  • apps/web/app/page.tsx: The function is being imported and used correctly.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify all component calls to `ComponentsSection` are updated.
# Test: Search for the function usage. Expect: Only occurances of the new function signature.
rg --type python $'ComponentsSection'

Length of output: 67



Script:

#!/bin/bash
# Description: Verify all component calls to `ComponentsSection` are updated.
# Test: Search for the function usage. Expect: Only occurances of the new function signature.
rg 'ComponentsSection'

Length of output: 303


Line range hint 47-83: Refactored ComponentCard to use direct prop destructuring, enhancing clarity and maintainability. Ensure all related component calls and imports are updated accordingly.

Verification successful

The results indicate that the ComponentCard is used correctly with the new prop destructuring in the apps/web/components/homepage/components-section.tsx file. No other occurrences were found, suggesting that the refactor is localized and has been applied correctly.

  • apps/web/components/homepage/components-section.tsx: <ComponentCard key={component.name} {...component} />
  • apps/web/components/homepage/components-section.tsx:interface ComponentCardProps extends ComponentProps<"div"> {
  • apps/web/components/homepage/components-section.tsx:function ComponentCard({ link, name, image, imageDark, classes }: ComponentCardProps) {
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify all component calls to `ComponentCard` are updated.
# Test: Search for the function usage. Expect: Only occurances of the new function signature.
rg --type python $'ComponentCard'

Length of output: 63



Script:

#!/bin/bash
# Description: Verify all component calls to `ComponentCard` are updated.
# Test: Search for the function usage. Expect: Only occurrences of the new function signature.
rg --type js --type ts 'ComponentCard'

Length of output: 409

apps/web/components/homepage/contributors-section.tsx (1)

Line range hint 23-100: Refactor to improve error handling and accessibility.

  • Consider enhancing error handling in fetchContributors by logging errors or notifying a monitoring service.
  • The SVG elements at lines 59 and 77 lack accessibility features. Adding a <title> element or aria-label attributes would enhance accessibility.
59a60,61
>             <title>GitHub Icon</title>
>
77a79,80
>             <title>Repository Icon</title>
>
apps/web/components/homepage/featured-section.tsx (1)

3-3: Refactor from FC type to standard function is consistent with modern React best practices.

apps/web/examples/megaMenu/megaMenu.icons.tsx Show resolved Hide resolved
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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between f0e23a6 and f7710c1.

Files ignored due to path filters (1)
  • bun.lockb is excluded by !**/bun.lockb
Files selected for processing (2)
  • .github/actions/setup/action.yml (1 hunks)
  • package.json (1 hunks)
Files skipped from review as they are similar to previous changes (2)
  • .github/actions/setup/action.yml
  • package.json

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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between f7710c1 and c81121c.

Files ignored due to path filters (1)
  • bun.lockb is excluded by !**/bun.lockb
Files selected for processing (2)
  • packages/cli/package.json (1 hunks)
  • packages/ui/package.json (1 hunks)
Files skipped from review as they are similar to previous changes (2)
  • packages/cli/package.json
  • packages/ui/package.json

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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between c81121c and 2050e3f.

Files ignored due to path filters (1)
  • bun.lockb is excluded by !**/bun.lockb
Files selected for processing (2)
  • apps/storybook/package.json (2 hunks)
  • packages/cli/package.json (1 hunks)
Files skipped from review as they are similar to previous changes (2)
  • apps/storybook/package.json
  • packages/cli/package.json

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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between a0a037d and c9ce6e6.

Files ignored due to path filters (1)
  • bun.lockb is excluded by !**/bun.lockb
Files selected for processing (4)
  • .github/actions/setup/action.yml (1 hunks)
  • apps/storybook/package.json (1 hunks)
  • package.json (1 hunks)
  • packages/ui/package.json (1 hunks)
Files skipped from review as they are similar to previous changes (4)
  • .github/actions/setup/action.yml
  • apps/storybook/package.json
  • package.json
  • packages/ui/package.json

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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between c9ce6e6 and 04e3ec8.

Files ignored due to path filters (1)
  • bun.lockb is excluded by !**/bun.lockb
Files selected for processing (3)
  • apps/storybook/package.json (1 hunks)
  • packages/ui/package.json (1 hunks)
  • packages/ui/src/components/Tooltip/Tooltip.spec.tsx (1 hunks)
Files skipped from review due to trivial changes (1)
  • packages/ui/src/components/Tooltip/Tooltip.spec.tsx
Files skipped from review as they are similar to previous changes (2)
  • apps/storybook/package.json
  • packages/ui/package.json

@SutuSebastian SutuSebastian merged commit 4350ffb into main Jun 19, 2024
8 checks passed
@SutuSebastian SutuSebastian deleted the core/improvements branch June 19, 2024 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant