@akinon/projectzero 1.99.0-snapshot-ZERO-3640-20250919140935 → 1.100.0-rc.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +238 -5
- package/app-template/.env.example +1 -0
- package/app-template/.github/instructions/account.instructions.md +749 -0
- package/app-template/.github/instructions/edge-cases.instructions.md +73 -0
- package/app-template/.gitignore +3 -0
- package/app-template/CHANGELOG.md +5004 -312
- package/app-template/README.md +25 -1
- package/app-template/package.json +19 -19
- package/app-template/public/locales/en/common.json +48 -1
- package/app-template/public/locales/tr/common.json +48 -1
- package/app-template/src/app/[commerce]/[locale]/[currency]/basket/page.tsx +9 -82
- package/app-template/src/app/[commerce]/[locale]/[currency]/category/[pk]/page.tsx +17 -4
- package/app-template/src/app/[commerce]/[locale]/[currency]/flat-page/[pk]/page.tsx +12 -1
- package/app-template/src/app/[commerce]/[locale]/[currency]/group-product/[pk]/page.tsx +29 -11
- package/app-template/src/app/[commerce]/[locale]/[currency]/landing-page/[pk]/page.tsx +12 -1
- package/app-template/src/app/[commerce]/[locale]/[currency]/product/[pk]/loading.tsx +67 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/product/[pk]/page.tsx +28 -10
- package/app-template/src/app/[commerce]/[locale]/[currency]/special-page/[pk]/page.tsx +12 -1
- package/app-template/src/app/api/form/[...id]/route.ts +1 -7
- package/app-template/src/app/api/image-proxy/route.ts +1 -0
- package/app-template/src/app/api/similar-product-list/route.ts +1 -0
- package/app-template/src/app/api/similar-products/route.ts +1 -0
- package/app-template/src/assets/fonts/pz-icon.css +3 -0
- package/app-template/src/components/__tests__/link.test.tsx +2 -0
- package/app-template/src/components/accordion.tsx +22 -19
- package/app-template/src/components/currency-select.tsx +1 -0
- package/app-template/src/components/file-input.tsx +27 -7
- package/app-template/src/components/generate-form-fields.tsx +43 -4
- package/app-template/src/components/input.tsx +9 -2
- package/app-template/src/components/modal.tsx +32 -16
- package/app-template/src/components/pagination.tsx +1 -0
- package/app-template/src/components/select.tsx +38 -26
- package/app-template/src/components/types/index.ts +25 -1
- package/app-template/src/hooks/index.ts +2 -0
- package/app-template/src/hooks/use-product-cart.ts +77 -0
- package/app-template/src/hooks/use-stock-alert.ts +74 -0
- package/app-template/src/plugins.js +3 -1
- package/app-template/src/settings.js +8 -2
- package/app-template/src/types/index.ts +74 -3
- package/app-template/src/utils/variant-validation.ts +41 -0
- package/app-template/src/views/account/address-form.tsx +8 -4
- package/app-template/src/views/account/contact-form.tsx +1 -1
- package/app-template/src/views/account/content-header.tsx +2 -2
- package/app-template/src/views/account/faq/faq-tabs.tsx +8 -2
- package/app-template/src/views/basket/basket-content.tsx +106 -0
- package/app-template/src/views/basket/basket-item.tsx +22 -14
- package/app-template/src/views/basket/summary.tsx +10 -7
- package/app-template/src/views/breadcrumb.tsx +2 -2
- package/app-template/src/views/category/category-info.tsx +1 -0
- package/app-template/src/views/category/filters/index.tsx +1 -1
- package/app-template/src/views/guest-login/index.tsx +6 -1
- package/app-template/src/views/header/action-menu.tsx +1 -1
- package/app-template/src/views/header/search/index.tsx +17 -5
- package/app-template/src/views/login/index.tsx +11 -10
- package/app-template/src/views/otp-login/index.tsx +11 -6
- package/app-template/src/views/product/product-actions.tsx +165 -0
- package/app-template/src/views/product/product-info.tsx +62 -263
- package/app-template/src/views/product/product-share.tsx +56 -0
- package/app-template/src/views/product/product-variants.tsx +26 -0
- package/app-template/src/views/product/slider.tsx +86 -73
- package/app-template/src/views/register/index.tsx +15 -11
- package/app-template/src/widgets/footer-menu.tsx +6 -2
- package/commands/plugins.ts +63 -16
- package/dist/commands/plugins.js +57 -16
- package/package.json +1 -1
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
applyTo: '**'
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Edge Cases & Troubleshooting Instructions
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
This document contains common edge cases, bugs, and troubleshooting steps encountered in Project Zero Next.js development. These are real-world issues that have caused development delays and should be checked first when similar problems occur.
|
|
10
|
+
|
|
11
|
+
## Checkout Flow Edge Cases
|
|
12
|
+
|
|
13
|
+
### 1. Order Selection Page Request Timing
|
|
14
|
+
|
|
15
|
+
**Problem:** `orderselectionpage` request should NOT be called after `walletselectionpage` or `walletpaymentpage` requests.
|
|
16
|
+
|
|
17
|
+
This causes checkout flow to break after wallet payment steps, order selection shows incorrect state, and payment flow gets reset unexpectedly. After `walletselectionpage` or `walletpaymentpage` requests are made, `orderselectionpage` request should not be called. Always check the sequence of checkout API calls.
|
|
18
|
+
|
|
19
|
+
### 2. Guest Login with URL Parameters
|
|
20
|
+
|
|
21
|
+
**Problem:** Adding `?page=IndexPage` to checkout URLs breaks guest login functionality.
|
|
22
|
+
|
|
23
|
+
Guest login fails on checkout URLs with `?page=IndexPage` but works fine without the parameter. This parameter interferes with authentication middleware routing. Avoid adding unnecessary URL parameters to checkout flows.
|
|
24
|
+
|
|
25
|
+
### 3. Agreement Error After 3D Payment Redirect
|
|
26
|
+
|
|
27
|
+
**Problem:** "You must accept agreement to continue" error appears after 3D payment or redirections, but the issue is NOT related to agreements.
|
|
28
|
+
|
|
29
|
+
Agreement error occurs after successful 3D payment and checkout flow breaks after external redirections. The error message is misleading - actually `preOrder` data gets reset/lost during payment redirections. Don't assume agreement errors are actually about agreements.
|
|
30
|
+
|
|
31
|
+
### 4. Address Visibility with fetchCheckout
|
|
32
|
+
|
|
33
|
+
**Problem:** When `fetchCheckout` request includes `page=IndexPage` parameter, addresses don't show in checkout and the entire flow breaks.
|
|
34
|
+
|
|
35
|
+
Addresses are missing from checkout page, shipping options don't load, and checkout flow is completely broken. Avoid adding unnecessary parameters to core checkout requests and validate that all checkout data loads properly.
|
|
36
|
+
|
|
37
|
+
## Plugin & Configuration Edge Cases
|
|
38
|
+
|
|
39
|
+
### 5. Attribute-Based Shipping Options Typo
|
|
40
|
+
|
|
41
|
+
**Problem:** `attribute_based_shipping_options` was incorrectly entered as `atribute_based` (missing 't') in brand configurations.
|
|
42
|
+
|
|
43
|
+
Shipping options don't work for specific brands and debugging is difficult because the setting exists but is misspelled. This can cause days of debugging. Always double-check configuration property names.
|
|
44
|
+
|
|
45
|
+
### 6. Apple Pay Plugin Configuration
|
|
46
|
+
|
|
47
|
+
**Problem:** Apple Pay can work as both `confirmation` and `wallet` payment types, but for the plugin to work properly, it should NOT be configured as `confirmation` type.
|
|
48
|
+
|
|
49
|
+
Apple Pay flow breaks in certain scenarios, payment confirmation issues occur, and plugin conflicts with checkout flow. Always configure Apple Pay as wallet type.
|
|
50
|
+
|
|
51
|
+
## Build & Development Edge Cases
|
|
52
|
+
|
|
53
|
+
### 7. Build Failures Due to yarn.lock Corruption
|
|
54
|
+
|
|
55
|
+
**Problem:** Build fails with apparent TypeScript errors in `@akinon/next` components, but the real issue is a corrupted `yarn.lock` file.
|
|
56
|
+
|
|
57
|
+
Build fails with nonsensical type errors, components from `@akinon/next` are flagged with errors, and multiple versions of the same package exist in lock file.
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
# Check for duplicate packages in yarn.lock
|
|
61
|
+
yarn list --pattern "@akinon/next" --depth=0
|
|
62
|
+
|
|
63
|
+
# If multiple versions exist, clean up
|
|
64
|
+
rm yarn.lock
|
|
65
|
+
rm -rf node_modules
|
|
66
|
+
yarn install
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Regularly check `yarn.lock` for duplicate dependencies and use `yarn dedupe` after adding new packages.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
**Remember:** Edge cases often have misleading error messages. Always investigate the root cause rather than fixing symptoms. The most time-consuming bugs are usually simple configuration or timing issues.
|