Skip to content

Sprint 4: Basket Page, Catalog Page Enhancements, and About Us Page Implementation #50

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

Merged
merged 67 commits into from
Jun 20, 2025

Conversation

bitbybit
Copy link
Owner

@bitbybit bitbybit commented Jun 16, 2025

  1. Task: https://github.com/rolling-scopes-school/tasks/blob/master/tasks/eCommerce-Application/Sprints/Sprint%234.md
  2. Deploy: https://release-basket-about-us.js-fe-2024q4.pages.dev/
  3. Done: 16.06.2025 / deadline: 17.06.2025
  4. Score: 60 / 60

Снимок экрана 2025-06-17 в 21 56 14
  • 1. Code Review Participation (10 points): Students actively participate in code reviews, providing constructive feedback and suggestions to their peers.
  • 2. No Merges Without Approvals (10 points): Pull requests are not merged without approvals from other team members, ensuring the quality of code contributions.
  • 3. Pull Request Descriptions (10 points): Pull requests include detailed descriptions, outlining the changes made and the purpose of the changes, facilitating better understanding and review.
  • 4. Task Board Management (10 points): Students maintain and regularly update a task board (e.g., Trello, Jira), ensuring that tasks are moved according to their progress and completion.
  • 5. Active Participation in Development Discussions (5 points): Students take an active role in discussing the development process, sharing ideas, and collaborating on solutions and improvements.
  • 6. Unit Test Coverage (15 points): The codebase has a minimum of 30% unit test coverage, ensuring the reliability and robustness of the implemented features.

merucoding and others added 30 commits June 11, 2025 19:32
Bumps the npm_and_yarn group with 1 update in the / directory: [brace-expansion](https://github.com/juliangruber/brace-expansion).


Updates `brace-expansion` from 1.1.11 to 1.1.12
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](juliangruber/brace-expansion@1.1.11...v1.1.12)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 1.1.12
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <[email protected]>
…yarn-6ea9762674

build(deps): Bump brace-expansion from 1.1.11 to 1.1.12 in the npm_and_yarn group across 1 directory
feat: ECOM-80 add pagination to catalog page
ECOM-79 Integrate Catalog Page with Commercetools API; ECOM-95 Routing to Basket Page
feat: ECOM-88 add message when cart is empty
feat: ECOM-90 add clear shopping cart button
feat: ECOM-85 add product item quantity control
ECOM-84 Fetch and Display Cart Items
ECOM-89 Apply Promo Code and Display Updated Prices
Added About Us page, add/remove item on product page
@bitbybit bitbybit marked this pull request as ready for review June 16, 2025 22:13
@merucoding merucoding changed the title Sprint 4 Sprint 4: Basket Page, Catalog Page Enhancements, and About Us Page Implementation Jun 17, 2025
@bitbybit bitbybit merged commit d972255 into develop Jun 20, 2025
1 check passed
Copy link
Collaborator

@YuliyaMinsk YuliyaMinsk left a comment

Choose a reason for hiding this comment

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

Great job overall! The structure is clean, the typing is thoughtful, and it's clear you're paying attention to error handling and async flow. Just a few tweaks and it'll be even more maintainable. Keep up the good work)

Comment on lines +17 to +35
const handleClick = async (event: MouseEvent<HTMLButtonElement>): Promise<void> => {
event.stopPropagation()
setIsLoading(true)
setError(undefined)
try {
if (isInCart) {
await dispatch(removeProduct({ productId: product.id, quantity: 1 })).unwrap()
toast('❌ Removed from Cart')
} else {
await dispatch(addProduct({ productId: product.id, quantity: 1 })).unwrap()
toast('🛒 Added to Cart')
}
} catch (error) {
setError('An error occurred. Please try again.')
toast(error instanceof Error ? error.message : '❌ Failed to update the cart')
} finally {
setIsLoading(false)
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just a heads-up: since handleClick is async, setIsLoading(false) might run after the component unmounts, which can trigger a React warning. To avoid that, it's a good idea to track if the component is still mounted before updating state

Copy link
Owner Author

Choose a reason for hiding this comment

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

@YuliyaMinsk it seems that the warning and this recommendation is gone since React 18 release: facebook/react#22114

@bitbybit bitbybit mentioned this pull request Jun 22, 2025
@bitbybit
Copy link
Owner Author

@YuliyaMinsk #65

@bitbybit bitbybit deleted the release/basket-about_us branch June 23, 2025 17:03
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.

4 participants