Closed MohammadPCh closed 5 days ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
giveth-dapps-v2 | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 26, 2024 9:49am |
Overall changes focus on replacing the "liked projects" feature with "bookmarked projects" and involve updating labels, GraphQL queries, and components accordingly. This transition affects the user interface by modifying icons, labels, and functionality related to project interactions, such as bookmarking instead of liking. Additionally, there are updates to the package dependencies and minor adjustments to project action components, aligning the application more consistently with the new bookmarking functionality.
File/Directory | Summary of Changes |
---|---|
lang/ca.json , lang/en.json , lang/es.json |
Added label for "Bookmarked Projects", removed "Liked Projects", adjusted sharing options |
package.json |
Updated @giveth/ui-design-system from 1.11.31 to 1.11.33 |
src/apollo/gql/gqlHomePage.ts , src/apollo/gql/gqlProjects.ts , src/apollo/types/types.ts |
Removed totalReactions field from queries and IProject interface |
src/components/DonateSocialBox.tsx , src/components/badges/ShareLikeBadge.tsx |
Removed type prop logic, updated badge display to always share |
src/components/project-card/ProjectCard.tsx , .../ProjectCardBadgeButtons.tsx |
Renamed and updated badge buttons, removed like/unlike functionality |
src/components/views/project/projectActionCard/ProjectPublicActions.tsx |
Swapped heart icons for bookmark icons, updated like to bookmark actions |
src/components/views/projects/sort/ProjectsSortSelect.tsx |
Removed MOST_LIKED sorting option and icon |
src/components/views/userProfile/ProfileContributes.tsx |
Updated label to "Bookmarked Projects" |
src/components/views/userProfile/projectsTab/ProfileProjectsTab.tsx , .../ProjectItem.tsx |
Removed changeOrder function and heart icon import |
src/components/views/verification/projectContact/ProjectContactIndex.tsx |
Removed type='share' prop from ShareLikeBadge |
src/features/user/user.slice.ts |
Removed incrementLikedProjectsCount and decrementLikedProjectsCount functions |
src/lib/reaction.ts |
Renamed likeProject to bookmarkProject , unlikeProject to unBookmarkProject |
In code we trust, a shift we make,
From hearts to bookmarks, a change we take.
Reactions gone, new stories told,
Bookmarked projects, new and bold.
Bugs we've banished, features new,
🎉 Here's to updates, and to you!— 🐰 A Rabbit Dev
src/components/badges/ShareLikeBadge.tsx (1)
`18-33`: **Simplified Badge Component Review.** The refactoring of `ShareLikeBadge` to always display a share icon and label is in line with the PR's objectives. The prop destructuring and conditional rendering logic are correctly implemented.src/apollo/gql/gqlHomePage.ts (1)
Line range hint `1-46`: **GraphQL Query Review for Homepage Data.** The GraphQL query `FETCH_HOMEPAGE_DATA` appears to be correctly updated, removing all instances of `totalReactions`. This aligns well with the PR's goal of removing reaction-related fields.src/components/DonateSocialBox.tsx (1)
Line range hint `1-50`: **Review of DonateSocialBox Component Integration.** The `DonateSocialBox` component integrates the updated `ShareLikeBadge` correctly. It handles modal visibility and provides links for learning more about donating, which are appropriate given the context.src/components/views/userProfile/projectsTab/ProfileProjectsTab.tsx (2)
Line range hint `1-1`: **Ensure proper import ordering and grouping.** Imports should be grouped and ordered: external libraries, internal modules, styles, and types. This enhances readability and maintainability. --- Line range hint `22-22`: **Consider using a more descriptive variable name.** The variable `itemPerPage` could be renamed to `itemsPerPage` to better reflect that it represents multiple items.src/components/views/userProfile/projectsTab/ProjectItem.tsx (2)
`1-1`: **Ensure consistent import ordering.** Imports should be grouped and ordered: external libraries, internal modules, styles, and types. This enhances readability and maintainability. --- Line range hint `22-22`: **Consider adding type annotations for state hooks.** For state hooks like `useState`, adding type annotations can improve type safety and code readability.src/components/views/verification/projectContact/ProjectContactIndex.tsx (2)
Line range hint `1-1`: **Optimize import statements.** Imports should be grouped and ordered: external libraries, internal modules, styles, and types. This enhances readability and maintainability. --- Line range hint `20-20`: **Use a more descriptive variable name for `BtnContainer`.** The name `BtnContainer` is too generic. Consider renaming it to `ButtonContainer` for better readability and maintainability.src/apollo/types/types.ts (1)
Line range hint `1-1`: **Review import statements for consistency.** Ensure that all necessary types are imported and used correctly throughout the file to maintain type safety and consistency.src/components/project-card/ProjectCard.tsx (2)
`22-22`: **Updated import path reflects component renaming.** The import path change from `ProjectCardLikeAndShareButtons` to `ProjectCardBadgeButtons` aligns with the PR's goal of transitioning from "like" functionality to "bookmark". This is consistent with the renaming of the component to better reflect its new functionality. --- Line range hint `22-329`: **Comprehensive Component Review: `ProjectCard`.** The `ProjectCard` component appears well-structured and follows best practices for React functional components. It utilizes hooks effectively for state management and routing, and styled-components for dynamic styling based on props and state. 1. **State Management and Hooks:** The use of `useState` and `useRouter` is appropriate for handling component state and routing. The component's state management logic, particularly for handling hover states and modal visibility, is clear and concise. 2. **Conditional Rendering:** The component uses conditional rendering effectively to manage different UI states based on the project's verification status and whether the round has started. 3. **Internationalization and Styling:** The use of `react-intl` for internationalization ensures that the component can support multiple languages. The styled-components are used effectively to adjust styles based on the component's state and props. Overall, the component is well-implemented with attention to performance, maintainability, and user experience.lang/en.json (2)
`206-206`: **Addition of "label.bookmarked_projects" is appropriate.** The addition of the key "label.bookmarked_projects" with the value "Bookmarked Projects" aligns with the PR objectives to transition from "liked" projects to "bookmarked" projects. The key and value are correctly formatted and follow the consistent naming convention used throughout the file. --- `873-873`: **Reordering of "label.share_on_linkedin" is handled correctly.** The key "label.share_on_linkedin" has been moved to appear before "label.share_on_farcaster", aligning with the PR objectives to adjust the position of sharing options. This change is correctly implemented and reflects a potential change in UI priorities.
4128
Summary by CodeRabbit
New Features
Bug Fixes
Updates
@giveth/ui-design-system
to version1.11.33
.UI Improvements
Backend Adjustments
totalReactions
field from various GraphQL queries for improved performance.