-
Notifications
You must be signed in to change notification settings - Fork 25
feat: add product-details block #488
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
Changes from 20 commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
dfb2b65
feat: add product-details block
michnowak b252fdc
fix: update @o2s/blocks.product-details dependency version to wildcard
michnowak e06413d
refactor: remove equipment field from product details
michnowak bd048d9
feat: enhance product details block
michnowak 0564f4b
feat: ProductCarousel component
michnowak 322e9b2
feat: enhance ProductCarousel with description and action support
michnowak f87ef9e
feat: add ProductGallery component with thumbnail navigation
michnowak 987213e
refactor: simplify ProductGallery component by removing hover state m…
michnowak e13e9ee
refactor: enhance ProductGallery component with improved state manage…
michnowak 78e21d7
refactor: optimize lightbox handling in ProductGallery component with…
michnowak cc8d423
refactor: replace Carousel with ProductGallery in ProductDetails comp…
michnowak 8574e3c
Merge branch 'feature/productCarousel-component' into feature/product…
michnowak a020034
feat: add recommended offers details to productDetails block
michnowak f774844
chore: update product-details block dependency version to latest
michnowak 3876059
chore: update description for product-details block
michnowak 6e68fd1
fix: correct typo in product-details block description and update ren…
michnowak 592d318
fix: increase z-index for action button in ProductDetails component
michnowak c538dfd
refactor: update ProductDetails module to use dynamic registration an…
michnowak 7770c90
refactor: simplify Typography usage in ProductDetails component
michnowak 0823caa
refactor: enhance ProductDetailsBlockModule by integrating CMS service
michnowak 39fc198
refactor: remove includePopularOffers from ProductDetails component
michnowak f509d22
refactor: rename hasPriority to shouldPreloadGallery in ProductGallery
michnowak 29bc6e2
refactor: replace offerNumber with sku in ProductDetails
michnowak 9cd6b2f
refactor: enhance product description
michnowak b32be7b
feat: add recommended products block with API integration and fronten…
michnowak a106ff1
refactor: update labels structure
michnowak babc810
refactor: remove unused slug prop and simplify excludeProductId
michnowak b731728
test: add productsService injection test to RecommendedProductsService
michnowak 089c8ad
refactor: remove limit parameter from recommended products
michnowak dbdc20f
refactor: change badge and specification rendering to use list elements
michnowak 0600a5d
refactor: update action button structure
michnowak 4286808
refactor: improve product key specifications and link handling in com…
michnowak 61515d2
feat: enhance product details with comprehensive descriptions
michnowak 76f6c92
refactor: adjust layout properties in ProductCard
michnowak bc37740
feat: add navigation group for 'Shop' in multiple language headers
michnowak d815592
refactor: streamline product mapping and localization for improved mu…
michnowak 241adab
refactor: enhance loading state structure in ProductDetails and Recom…
michnowak d24ace9
refactor: update 'Shop' navigation URL for German localization
michnowak 4de4e2c
fix: merge main into feature branch
michnowak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,6 +33,7 @@ yarn-error.log* | |
| .idea | ||
| .vscode | ||
| .cursor | ||
| agent-os | ||
|
|
||
| # Local history | ||
| .lh | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| # compiled output | ||
| /dist | ||
| /node_modules | ||
| /build | ||
|
|
||
| # Logs | ||
| logs | ||
| *.log | ||
| npm-debug.log* | ||
| pnpm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
| lerna-debug.log* | ||
|
|
||
| # OS | ||
| .DS_Store | ||
|
|
||
| # Tests | ||
| /coverage | ||
| /.nyc_output | ||
|
|
||
| # IDEs and editors | ||
| /.idea | ||
| .project | ||
| .classpath | ||
| .c9/ | ||
| *.launch | ||
| .settings/ | ||
| *.sublime-workspace | ||
|
|
||
| # IDE - VSCode | ||
| .vscode/* | ||
| !.vscode/settings.json | ||
| !.vscode/tasks.json | ||
| !.vscode/launch.json | ||
| !.vscode/extensions.json | ||
|
|
||
| # dotenv environment variable files | ||
| .env | ||
| .env.development.local | ||
| .env.test.local | ||
| .env.production.local | ||
|
|
||
| # temp directory | ||
| .temp | ||
| .tmp | ||
|
|
||
| # Runtime data | ||
| pids | ||
| *.pid | ||
| *.seed | ||
| *.pid.lock | ||
|
|
||
| # Diagnostic reports (https://nodejs.org/api/report.html) | ||
| report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
|
||
| /tsconfig.tsbuildinfo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| import apiConfig from "@o2s/prettier-config/api.mjs"; | ||
| import frontendConfig from "@o2s/prettier-config/frontend.mjs"; | ||
|
|
||
| /** | ||
| * @see https://prettier.io/docs/en/configuration.html | ||
| * @type {import("prettier").Config} | ||
| */ | ||
| const config = { | ||
| overrides: [ | ||
| { | ||
| files: "./src/api-harmonization/**/*", | ||
| options: apiConfig, | ||
| }, | ||
| { | ||
| files: "./src/frontend/**/*", | ||
| options: frontendConfig, | ||
| }, | ||
| { | ||
| files: "./src/sdk/**/*", | ||
| options: frontendConfig, | ||
| }, | ||
| ], | ||
| }; | ||
|
|
||
| export default config; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| import { config as apiConfig } from '@o2s/eslint-config/api'; | ||
| import { config as frontendConfig } from '@o2s/eslint-config/frontend-block'; | ||
| import { defineConfig } from 'eslint/config'; | ||
|
|
||
| export default defineConfig([ | ||
| { | ||
| files: ['src/api-harmonization/**/*'], | ||
| extends: [apiConfig], | ||
| }, | ||
| { | ||
| files: ['src/frontend/**/*'], | ||
| extends: [frontendConfig], | ||
| }, | ||
| { | ||
| files: ['src/sdk/**/*'], | ||
| extends: [frontendConfig], | ||
| }, | ||
| ]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| import { config } from '@o2s/lint-staged-config/base'; | ||
|
|
||
| export default config; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| { | ||
| "name": "@o2s/blocks.product-details", | ||
| "version": "0.0.1", | ||
| "private": false, | ||
| "license": "MIT", | ||
| "description": "A block for displaying comprehensive product information including title, images, price, description.", | ||
| "exports": { | ||
| "./api-harmonization": "./dist/api-harmonization/api-harmonization/index.js", | ||
| "./frontend": "./dist/frontend/frontend/index.js", | ||
| "./sdk": "./dist/sdk/sdk/index.js", | ||
| "./client": "./dist/api-harmonization/api-harmonization/product-details.client.js" | ||
| }, | ||
| "files": [ | ||
| "dist" | ||
| ], | ||
| "scripts": { | ||
| "build": "tsc --build tsconfig.json --preserveWatchOutput && tsc-alias", | ||
| "test": "vitest run", | ||
| "test:watch": "vitest", | ||
| "lint": "tsc --noEmit && eslint \"{src,apps,libs,test}/**/*.ts\" --fix", | ||
| "format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,css,scss,json}\"" | ||
| }, | ||
| "dependencies": { | ||
| "@o2s/framework": "*", | ||
| "@o2s/utils.logger": "*", | ||
| "@o2s/ui": "*", | ||
| "@o2s/utils.api-harmonization": "*", | ||
| "@o2s/utils.frontend": "*", | ||
| "@o2s/configs.integrations": "*" | ||
| }, | ||
| "devDependencies": { | ||
| "dotenv-cli": "^11.0.0", | ||
| "@o2s/eslint-config": "*", | ||
| "@o2s/lint-staged-config": "*", | ||
| "@o2s/prettier-config": "*", | ||
| "@o2s/typescript-config": "*", | ||
| "@o2s/vitest-config": "*", | ||
| "concurrently": "^9.2.1", | ||
| "eslint": "^9.39.1", | ||
| "prettier": "^3.6.2", | ||
| "react-hook-form": "^7.54.0", | ||
| "tsc-alias": "^1.8.16", | ||
| "typescript": "^5.9.3" | ||
| }, | ||
| "peerDependencies": { | ||
| "@types/react": "^19", | ||
| "@types/react-dom": "^19", | ||
| "react": "^19", | ||
| "react-dom": "^19", | ||
| "react-hook-form": "^7", | ||
| "tailwindcss": "^4", | ||
| "@nestjs/axios": "^4.0.1", | ||
| "@nestjs/common": "^11.0.16", | ||
| "@nestjs/config": "^4.0.2", | ||
| "@nestjs/core": "^11", | ||
| "rxjs": "^7", | ||
| "next": "^16.0.5", | ||
| "next-intl": "^4.1.0" | ||
| } | ||
| } | ||
10 changes: 10 additions & 0 deletions
10
packages/blocks/product-details/src/api-harmonization/index.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| export const URL = '/blocks/product-details'; | ||
|
|
||
| export { ProductDetailsBlockModule as Module } from './product-details.module'; | ||
| export { ProductDetailsService as Service } from './product-details.service'; | ||
| export { ProductDetailsController as Controller } from './product-details.controller'; | ||
|
|
||
| export * as Model from './product-details.model'; | ||
| export * as Request from './product-details.request'; | ||
|
|
||
| export * from './product-details.client'; | ||
michnowak marked this conversation as resolved.
Show resolved
Hide resolved
|
||
4 changes: 4 additions & 0 deletions
4
packages/blocks/product-details/src/api-harmonization/product-details.client.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| export { URL } from './product-details.url'; | ||
|
|
||
| export * as Model from './product-details.model'; | ||
| export * as Request from './product-details.request'; |
26 changes: 26 additions & 0 deletions
26
packages/blocks/product-details/src/api-harmonization/product-details.controller.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| import { Controller, Get, Headers, Param, Query, UseInterceptors } from '@nestjs/common'; | ||
|
|
||
| import { Models } from '@o2s/utils.api-harmonization'; | ||
| import { LoggerService } from '@o2s/utils.logger'; | ||
|
|
||
| import { Auth } from '@o2s/framework/modules'; | ||
|
|
||
| import { URL } from './'; | ||
| import type { GetProductDetailsBlockQuery } from './product-details.request'; | ||
| import { ProductDetailsService } from './product-details.service'; | ||
|
|
||
| @Controller(URL) | ||
| @UseInterceptors(LoggerService) | ||
| export class ProductDetailsController { | ||
| constructor(protected readonly service: ProductDetailsService) {} | ||
|
|
||
| @Get(':id') | ||
| @Auth.Decorators.Roles({ roles: [] }) | ||
| getProductDetails( | ||
| @Param('id') id: string, | ||
| @Query() query: GetProductDetailsBlockQuery, | ||
| @Headers() headers: Models.Headers.AppHeaders, | ||
| ) { | ||
| return this.service.getProductDetails(id, query, headers); | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.