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

Feat/migrate out of antd #34

Closed
wants to merge 19 commits into from
Closed

Conversation

apurv-wednesday
Copy link
Contributor

@apurv-wednesday apurv-wednesday commented Apr 26, 2024

Summary by CodeRabbit

  • New Features

    • Enhanced localization with Lingui for improved translation mechanisms.
    • Introduced Lighthouse CI for monitoring web performance metrics.
    • Improved Jest configuration for better testing and module resolution.
    • Added metadata components, repository info handling, and error state components.
  • Enhancements

    • Updated CI to Node.js 20.x for performance improvements.
    • Enhanced Redux store setup and introduced Redux hooks.
    • Improved styling consistency with Material-UI components.
  • Bug Fixes

    • Streamlined codebase by removing unused imports and outdated dependencies.
    • Fixed data handling issues with repository item types.
  • Documentation

    • Updated README to reflect the switch from react-intl to Lingui for localization.
  • Refactor

    • Transitioned to Material-UI for styling consistency.
    • Improved internationalization support with @lingui/macro for error messages.
  • Style

    • Ensured consistent theming and styling using Material-UI components.
  • Chores

    • Updated .gitignore to exclude directories and files related to Lighthouse CI and SWC.
    • Enhanced package.json scripts for building and testing with Lingui integration.

Copy link

coderabbitai bot commented Apr 26, 2024

Warning

Rate Limit Exceeded

@apurv-wednesday has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 21 minutes and 53 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.
Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.
Please see our FAQ for further information.

Commits Files that changed from the base of the PR and between 2a52566 and 24213b2.

Walkthrough

The project has seen a comprehensive overhaul touching on ESLint configurations, Jest setup, CI workflows, localization changes, styling updates, and more. These changes signify a move towards modern standards, emphasizing code quality, testing enhancements, and an improved user experience.

Changes

Files Summary
.eslintrc.json, jest.config.ts, package.json, sonar-project.properties Enhanced configurations for ESLint, Jest, package management, and SonarQube to elevate code quality and testing practices.
.github/workflows/..., lighthouserc.js Introduction and updates to CI workflows for Node.js and Lighthouse CI, focusing on performance evaluation.
README.md, lingui.config.js, src/themes/styles.ts, src/utils/index.ts Transition from react-intl to lingui for localization, impacting documentation and utility functions.
next.config.js, src/common/..., src/containers/..., src/features/..., src/pages/... Shift to Material-UI for styling and configuration, updating themes and components accordingly.

🐇🎉
A Poem by CodeRabbit

Among the bytes and bits that dance and play,
A symphony of changes in the code's array.
With each update a step towards the sublime,
In the realm of logic, where errors chime.
Embrace the evolution, swift and spry,
In the realm of code, let creativity fly! 🌟🚀


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.

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 a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @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.

This comment has been minimized.

Copy link

@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

Out of diff range and nitpick comments (1)
src/themes/mui/typography.ts (1)

1-8: The typography configuration is correctly implemented. Consider adding a comment about the choice of the Montserrat font if it aligns with specific design requirements.

This comment has been minimized.

Copy link

github-actions bot commented Apr 26, 2024

Jest Coverage Report

Total coverage

Status Category Percentage Covered / Total
🔴 Statements 59.96% (-1.97% 🔻) 298/497
🔴 Branches 54.05% 60/111
🔴 Functions 53% (-2.81% 🔻) 53/100
🟡 Lines 64.43% (+2.97% 🔼) 250/388

Status of coverage: 🟢 - ok, 🟡 - slightly more than threshold, 🔴 - under the threshold

Show new covered files 🌑

Coverage of new files

Status Filename Statements Branches Functions Lines
🟢 themes/mui/index.ts 75% 100% 100% 100%
🟢 themes/mui/palette.ts 100% 100% 100% 100%
🟢 themes/mui/typography.ts 80% 100% 100% 100%
🟢 themes/mui/breakpoints.ts 100% 100% 100% 100%
🟢 translations/en.js 100% 100% 100% 100%
🟢 features/repos/components/RepoItem/index.tsx 88.89% 100% 50% 87.5%
🔴 store/hooks.ts 0% 100% 100% 0%
🔴 utils/createEmotionCache.ts 0% 0% 0% 0%
🔴 utils/linguiUtils.ts 0% 0% 0% 0%

Status of coverage: 🟢 - ok, 🟡 - slightly more than threshold, 🔴 - under the threshold

Show files with reduced coverage 🔻

Reduced coverage

Status Filename Statements Branches Functions Lines
🟢 themes/styles.ts 100% 91.18% (-5.7% 🔻) 100% 100%
🟢 features/info/index.ts 75% (-25% 🔻) 100% 100% 100%
🟢 features/info/components/index.ts 50% (-50% 🔻) 100% 100% 100%
🟢 common/index.ts 61.11% (-38.89% 🔻) 100% 100% 100%
🟢 common/For/index.tsx 81.25% (-2.08% 🔻) 0% (-27.27% 🔻) 60% (-20% 🔻) 83.33% (+3.33% 🔼)
🟢 common/T/index.tsx 80% (-10% 🔻) 100% (+33.33% 🔼) 100% (+20% 🔼) 100%
🟢 common/styled/index.tsx 83.33% (-16.67% 🔻) 100% 83.33% (-16.67% 🔻) 100%
🟢 themes/index.ts 71.43% (-28.57% 🔻) 100% 100% 100%
🟡 features/info/components/RepoInfo/index.tsx 50% (+30% 🔼) 0% (-100% 🔻) 0% 60% (+40% 🔼)
🟢 utils/apiUtils.ts 88.89% (+63.89% 🔼) 0% (-8.33% 🔻) 100% (+77.78% 🔼) 87.5% (+59.5% 🔼)
🟢 features/repos/index.ts 75% (-25% 🔻) 100% 100% 100%
🟢 features/repos/components/index.ts 50% (-50% 🔻) 100% 100% 100%
🔴 features/repos/components/styled/index.ts 0% (-100% 🔻) 100% 0% (-100% 🔻) 0% (-100% 🔻)

Status of coverage: 🟢 - ok, 🟡 - slightly more than threshold, 🔴 - under the threshold

Report generated by 🧪jest coverage report action from 24213b2

This comment has been minimized.

Copy link

@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

Comment on lines +23 to +31
# could not find the threshold value in jest.config.js
# therefore hardcoded for now
# - name: Get Threshold
# id: threshold
# uses: notiz-dev/github-action-json-property@release
# with:
# path: 'jest.config.js'
# prop_path: 'coverageThreshold.global.statements'

Copy link

Choose a reason for hiding this comment

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

Consider removing the commented-out code related to dynamic threshold fetching or implement it to avoid hardcoding values, which can enhance maintainability.

This comment has been minimized.

@apurv-wednesday apurv-wednesday force-pushed the feat/migrate-out-of-antd branch 2 times, most recently from 851349c to 0a2f036 Compare April 26, 2024 10:52
Copy link

@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

const emotionInsertionPoint = document.querySelector<HTMLMetaElement>(
'meta[name="emotion-insertion-point"]'
);
insertionPoint = emotionInsertionPoint ?? undefined;
Copy link

Choose a reason for hiding this comment

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

Consider simplifying the assignment of insertionPoint by directly using the result of the query selector.

- insertionPoint = emotionInsertionPoint ?? undefined;
+ insertionPoint = emotionInsertionPoint;

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.

Suggested change
insertionPoint = emotionInsertionPoint ?? undefined;
insertionPoint = emotionInsertionPoint;

}),
// to fix the error: "Type alias 'RootState' circularly references itself". return type is set to any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
extractRehydrationInfo(action, { reducerPath }): any {
Copy link

Choose a reason for hiding this comment

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

Consider replacing any with a more specific type to enhance type safety.

Copy link

sonarqube-ws bot commented Apr 26, 2024

Failed

  • 0.00% Coverage on New Code (is less than 80.00%)

Analysis Details

1 Issue

  • Bug 0 Bugs
  • Vulnerability 0 Vulnerabilities
  • Code Smell 1 Code Smell

Coverage and Duplications

  • Coverage 0.00% Coverage (0.00% Estimated after merge)
  • Duplications 0.00% Duplicated Code (0.00% Estimated after merge)

Project ID: wednesday-solutions_next-bulletproof-ts_AY6yu6eKB2n8RRmGoUz4

View in SonarQube

@apurv-wednesday apurv-wednesday deleted the feat/migrate-out-of-antd branch May 13, 2024 02:10
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.

2 participants