-
-
Notifications
You must be signed in to change notification settings - Fork 590
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
Updated vite and removed CRA files #2278
Updated vite and removed CRA files #2278
Conversation
WalkthroughThe pull request introduces several changes primarily focused on improving the handling of SVG files within a React application. It updates the Jest configuration to mock SVG imports, modifies how SVGs are imported across multiple components, and upgrades various dependencies in the Changes
Possibly related PRs
Suggested labels
Recent review detailsConfiguration used: .coderabbit.yaml Files ignored due to path filters (1)
Files selected for processing (1)
Files skipped from review as they are similar to previous changes (1)
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
Documentation and Community
|
Our Pull Request Approval ProcessWe have these basic policies to make the approval process smoother for our volunteer team. Testing Your CodePlease make sure your code passes all tests. Our test code coverage system will fail if these conditions occur:
The process helps maintain the overall reliability of the code base and is a prerequisite for getting your PR approved. Assigned reviewers regularly review the PR queue and tend to focus on PRs that are passing. ReviewersDo not assign reviewers. Our Queue Monitors will review your PR and assign them.
Reviewing Your CodeYour reviewer(s) will have the following roles:
CONTRIBUTING.mdRead our CONTRIBUTING.md file. Most importantly:
Other
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #2278 +/- ##
========================================
Coverage 97.54% 97.54%
========================================
Files 241 241
Lines 6887 6887
Branches 2005 2016 +11
========================================
Hits 6718 6718
Misses 157 157
Partials 12 12 ☔ View full report in Codecov by Sentry. |
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.
Actionable comments posted: 1
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files ignored due to path filters (1)
package-lock.json
is excluded by!**/package-lock.json
Files selected for processing (21)
- jest.config.js (1 hunks)
- package.json (2 hunks)
- scripts/mocks/fileMock.js (1 hunks)
- scripts/config-overrides/custom_build.js (0 hunks)
- scripts/config-overrides/custom_start.js (0 hunks)
- scripts/config-overrides/index.js (0 hunks)
- scripts/config-overrides/package.json (0 hunks)
- scripts/test.js (0 hunks)
- src/components/IconComponent/IconComponent.tsx (1 hunks)
- src/components/LeftDrawer/LeftDrawer.tsx (1 hunks)
- src/components/LeftDrawerOrg/LeftDrawerOrg.tsx (1 hunks)
- src/components/OrgListCard/OrgListCard.tsx (1 hunks)
- src/components/OrganizationDashCards/CardItem.tsx (1 hunks)
- src/components/UserPortal/UserSidebar/UserSidebar.tsx (1 hunks)
- src/components/UserPortal/UserSidebarOrg/UserSidebarOrg.tsx (1 hunks)
- src/components/Venues/VenueCard.tsx (1 hunks)
- src/screens/EventManagement/EventManagement.tsx (1 hunks)
- src/screens/ForgotPassword/ForgotPassword.tsx (1 hunks)
- src/screens/LoginPage/LoginPage.tsx (1 hunks)
- src/screens/OrganizationDashboard/OrganizationDashboard.tsx (1 hunks)
- src/screens/UserPortal/Chat/Chat.tsx (1 hunks)
Files not reviewed due to no reviewable changes (5)
- scripts/config-overrides/custom_build.js
- scripts/config-overrides/custom_start.js
- scripts/config-overrides/index.js
- scripts/config-overrides/package.json
- scripts/test.js
Files skipped from review due to trivial changes (6)
- scripts/mocks/fileMock.js
- src/components/LeftDrawerOrg/LeftDrawerOrg.tsx
- src/screens/EventManagement/EventManagement.tsx
- src/screens/ForgotPassword/ForgotPassword.tsx
- src/screens/LoginPage/LoginPage.tsx
- src/screens/OrganizationDashboard/OrganizationDashboard.tsx
Additional comments not posted (36)
jest.config.js (2)
30-30
: LGTM!The new mapping for SVG files with query parameters (
\\.svg\\?react$
) to the mock file is a good addition to enhance the testing setup. It should help prevent issues related to importing SVGs directly in a testing environment.
31-31
: Looks good!The new mapping for standard SVG files (
\\.svg$
) to the mock file is a consistent addition to enhance the testing setup, similar to the previous mapping for SVG files with query parameters. It should help prevent issues related to importing SVGs directly in a testing environment.src/components/OrganizationDashCards/CardItem.tsx (5)
2-6
: Verify the SVG import configuration.The changes to the SVG import syntax using
?react
are consistent across the file. This suggests the use of a custom loader or configuration to handle SVGs as React components.Please ensure that the custom loader or configuration is properly set up and tested to handle SVGs as React components. Verify that the SVGs are correctly rendered and optimized within the application.
Line range hint
35-38
: LGTM!The conditional rendering of SVG icons based on the
type
prop is implemented correctly. The logic is sound, and the syntax is valid.
Line range hint
54-59
: LGTM!The rendering of the
creator
information is implemented correctly. The logic is sound, and the syntax is valid.
Line range hint
71-78
: LGTM!The rendering of the
location
information is implemented correctly. The logic is sound, and the syntax is valid.
Line range hint
79-97
: LGTM!The conditional rendering of event dates or post time is implemented correctly. The logic is sound, and the syntax is valid. The use of the
dayjs
library for date formatting is appropriate.src/components/Venues/VenueCard.tsx (1)
4-4
: LGTM!The change to the
PeopleIcon
import statement is a valid optimization related to the Vite update. By using the?react
query parameter, the SVG will be imported as a React component, which can improve performance and bundle size.This change should not affect the functionality of the
VenueCard
component.src/components/IconComponent/IconComponent.tsx (16)
6-6
: LGTM!The import statement change for
ActionItemIcon
looks good. Using the?react
query parameter is a valid way to import SVG files as React components in Vite.
7-7
: LGTM!The import statement change for
BlockUserIcon
looks good.
8-8
: LGTM!The import statement change for
CheckInRegistrantsIcon
looks good.
9-9
: LGTM!The import statement change for
DashboardIcon
looks good.
10-10
: LGTM!The import statement change for
EventsIcon
looks good.
11-11
: LGTM!The import statement change for
FundsIcon
looks good.
12-12
: LGTM!The import statement change for
ListEventRegistrantsIcon
looks good.
13-13
: LGTM!The import statement change for
OrganizationsIcon
looks good.
14-14
: LGTM!The import statement change for
PeopleIcon
looks good.
15-15
: LGTM!The import statement change for
TagsIcon
looks good.
16-16
: LGTM!The import statement change for
TagIcon
looks good.
17-17
: LGTM!The import statement change for
PluginsIcon
looks good.
18-18
: LGTM!The import statement change for
PostsIcon
looks good.
19-19
: LGTM!The import statement change for
SettingsIcon
looks good.
20-20
: LGTM!The import statement change for
VenueIcon
looks good.
21-21
: LGTM!The import statement change for
RequestsIcon
looks good.src/components/OrgListCard/OrgListCard.tsx (1)
2-2
: LGTM!The updated import statement for
FlaskIcon
using the?react
suffix is a valid syntax supported by the latest version of Vite for importing SVGs as React components. This change aligns with the PR objective of updating the Vite package and should not affect the functionality of theOrgListCard
component.src/components/UserPortal/UserSidebar/UserSidebar.tsx (4)
5-5
: LGTM!The change in import syntax for
OrganizationsIcon
to include the?react
query parameter is a valid optimization. This change should improve the compatibility and performance of SVG rendering within the React application without affecting the functionality of theUserSidebar
component.
6-6
: LGTM!The change in import syntax for
SettingsIcon
to include the?react
query parameter is a valid optimization. This change should improve the compatibility and performance of SVG rendering within the React application without affecting the functionality of theUserSidebar
component.
7-7
: LGTM!The change in import syntax for
ChatIcon
to include the?react
query parameter is a valid optimization. This change should improve the compatibility and performance of SVG rendering within the React application without affecting the functionality of theUserSidebar
component.
8-8
: LGTM!The change in import syntax for
TalawaLogo
to include the?react
query parameter is a valid optimization. This change should improve the compatibility and performance of SVG rendering within the React application without affecting the functionality of theUserSidebar
component.src/components/LeftDrawer/LeftDrawer.tsx (1)
5-5
: LGTM!The change in the import statement for
OrganizationsIcon
is consistent with the other SVG imports in the file. This suggests that the SVG is being imported directly as a React component, which should not affect the functionality of the component as long as the build tool or configuration supports this syntax.package.json (3)
61-61
: Verify the Vite upgrade and update documentation if needed.The upgrade to Vite 5.x is a significant change that could potentially introduce breaking changes. Please ensure that the development and build processes are thoroughly tested with this new version to catch any issues early.
Also, if there are any relevant changes to the development or build processes due to this upgrade, make sure to update the project's documentation accordingly.
143-143
: LGTM!The minor version update to
tsx
should be backwards compatible, but please make sure to test the project with this new version to confirm that there are no unexpected issues.
144-144
: Verify the vite-plugin-svgr upgrade and update documentation if needed.The upgrade to vite-plugin-svgr 4.x is a significant change that could potentially introduce breaking changes. Please ensure that SVG handling and rendering are thoroughly tested with this new version to catch any issues early.
Also, if there are any relevant changes to SVG handling or rendering due to this upgrade, make sure to update the project's documentation accordingly.
src/components/UserPortal/UserSidebarOrg/UserSidebarOrg.tsx (2)
12-12
: LGTM!The change in import syntax for
AngleRightIcon
looks good. The?react
suffix is a feature often used by build tools like Vite or Webpack to optimize the import and rendering of SVG assets within React components. This aligns with the PR objective of updating the Vite package.
13-13
: Looks good!Similar to the previous import change, the updated syntax for importing
TalawaLogo
is a valid modification related to the Vite package update. Refer to the comment above for more context on the?react
suffix.src/screens/UserPortal/Chat/Chat.tsx (1)
11-11
: LGTM!The change in the import statement for the
NewChat
component looks good. The transformation of the SVG file into a React component using a loader or plugin should improve the performance and maintainability of the codebase.
77ce887
into
PalisadoesFoundation:develop
Issue Number:
Follow up PR for PR #2268
Did you add tests for your changes?
Not required
If relevant, did you update the documentation?
Not required
Summary
Does this PR introduce a breaking change?
No.
Have you read the contributing guide?
Yes
Summary by CodeRabbit
New Features
Updates
Bug Fixes
Chores