docs(admin): move locale-hardcoding gap from Open to Fixed
Follow-up to ff4fba3 - the admin/products + admin/categories
translation-tab locale-hardcoding gap flagged as deferred in the
bug-hunt audit docs is now fixed; updates docs/ADMIN.md's audit
section and moves docs/KNOWN-ISSUES.md's item from Open to Fixed.
This commit is contained in:
@@ -594,16 +594,25 @@ Found 2 real bugs in `admin/categories`, both fixed:
|
|||||||
`{ id: 'c', order: 0 }` (tying `a` and `c`). After the fix, the gateway
|
`{ id: 'c', order: 0 }` (tying `a` and `c`). After the fix, the gateway
|
||||||
receives the correct 3-way reshuffle: `c:0, a:1, b:2`.
|
receives the correct 3-way reshuffle: `c:0, a:1, b:2`.
|
||||||
|
|
||||||
One real gap was found but **not** fixed inline (real feature work, not a
|
A third bug, found in the same pass, was fixed in a follow-up commit:
|
||||||
wiring bug - see `docs/KNOWN-ISSUES.md`): both `admin-product-form.component`
|
`admin-product-form.component` and `admin-category-form.component` both
|
||||||
and `admin-category-form.component` hardcode their translation-tab locales to
|
hardcoded their translation-tab locales to `['en', 'ru', 'hy']` instead of
|
||||||
`['en', 'ru', 'hy']` rather than reading the tenant's actual configured
|
reading the tenant's actual configured `supportedLocales` (which live on
|
||||||
`supportedLocales` (which live on `ProjectEditorFacade.bootstrap()`, the same
|
`ProjectEditorFacade.bootstrap()`, the same source
|
||||||
source `static-pages-editor.component.ts` already reads correctly). Wiring
|
`static-pages-editor.component.ts` already reads correctly) - neither
|
||||||
this up means threading `supportedLocales` from `ProjectEditorFacade` through
|
`AdminProductsFacade` nor `AdminCategoriesFacade` depended on project-editor
|
||||||
`AdminProductsFacade`/`AdminCategoriesFacade` (neither currently depends on
|
state at all before this. Fixed by giving both facades a `supportedLocales`
|
||||||
project-editor state at all) down to two presentational form components -
|
computed (`bootstrap()?.localization.supportedLocales ?? ['en']`) and an
|
||||||
real cross-feature plumbing, not a bounded bug fix.
|
`ensureLocalesLoaded()` that calls `ProjectEditorFacade.loadBootstrap()` if
|
||||||
|
it hasn't loaded yet (same lazy-load pattern
|
||||||
|
`AdminDashboardFacade.ensureLoaded()` already uses for the same dependency);
|
||||||
|
both editor pages call it in their constructor and pass
|
||||||
|
`[locales]="facade.supportedLocales()"` down to the form components, which
|
||||||
|
now iterate a `locales: string[]` `@Input()` instead of the literal array.
|
||||||
|
Verified live: both `facade.supportedLocales()` and the form's bound
|
||||||
|
`locales` changed from the hardcoded `['en','ru','hy']` to the real tenant
|
||||||
|
order `['ru','en','hy']` (default locale first), confirmed by the rendered
|
||||||
|
tab order in both editors.
|
||||||
|
|
||||||
The already-documented, deliberately-scoped-down items from earlier sprints
|
The already-documented, deliberately-scoped-down items from earlier sprints
|
||||||
(related-products picker limited to the current page, not a full catalog
|
(related-products picker limited to the current page, not a full catalog
|
||||||
|
|||||||
@@ -76,21 +76,6 @@ don't fix inline unless asked.
|
|||||||
auth-system check first (does one exist yet?) before building the menu.
|
auth-system check first (does one exist yet?) before building the menu.
|
||||||
- Found: 2026-07-17, project-editor bug-hunt audit.
|
- Found: 2026-07-17, project-editor bug-hunt audit.
|
||||||
|
|
||||||
6. **Admin product/category translation tabs hardcode `['en', 'ru', 'hy']`
|
|
||||||
instead of reading the tenant's configured `supportedLocales`.**
|
|
||||||
`admin-product-form.component.html` and `admin-category-form.component.html`
|
|
||||||
both `@for (locale of ['en','ru','hy']; ...)` over a fixed literal array
|
|
||||||
rather than `ProjectEditorFacade.bootstrap().localization.supportedLocales`
|
|
||||||
(the same source `static-pages-editor.component.ts` already reads
|
|
||||||
correctly). A tenant with fewer or different supported locales gets
|
|
||||||
translation tabs for languages it doesn't support, and no tab at all for
|
|
||||||
ones it does. Not fixed inline: neither `AdminProductsFacade` nor
|
|
||||||
`AdminCategoriesFacade` currently depends on project-editor state, so this
|
|
||||||
needs real cross-feature plumbing (facade -> facade -> two presentational
|
|
||||||
form components), not a bounded wiring fix.
|
|
||||||
- Found: 2026-07-17, `admin/products` + `admin/categories` bug-hunt audit
|
|
||||||
(`docs/ADMIN.md`'s "Bug-hunt audit pass" section).
|
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
|
|
||||||
1. **Full-project UX/UI + motion pass across storefront, admin dashboard,
|
1. **Full-project UX/UI + motion pass across storefront, admin dashboard,
|
||||||
@@ -229,10 +214,17 @@ don't fix inline unless asked.
|
|||||||
backend unreachable in this environment, so via
|
backend unreachable in this environment, so via
|
||||||
`facade.categories.set([...])` synthetic siblings feeding the same
|
`facade.categories.set([...])` synthetic siblings feeding the same
|
||||||
facade methods/gateway calls the UI drives).
|
facade methods/gateway calls the UI drives).
|
||||||
- One further gap found but deferred as real feature work, not a wiring
|
- A third bug from the same audit pass, fixed in a follow-up commit:
|
||||||
bug - see Open item 6 above: `admin-product-form`/`admin-category-form`
|
`admin-product-form`/`admin-category-form` hardcoded translation-tab
|
||||||
hardcode translation-tab locales to `['en','ru','hy']` instead of the
|
locales to `['en','ru','hy']` instead of the tenant's actual
|
||||||
tenant's actual `supportedLocales`.
|
`supportedLocales`. Fixed by giving `AdminProductsFacade`/
|
||||||
|
`AdminCategoriesFacade` a `supportedLocales` computed +
|
||||||
|
`ensureLocalesLoaded()` reading/lazily-loading
|
||||||
|
`ProjectEditorFacade.bootstrap()` (same pattern
|
||||||
|
`AdminDashboardFacade.ensureLoaded()` already uses), threaded down to
|
||||||
|
both form components via a new `locales` `@Input()`. Verified live:
|
||||||
|
rendered tab order changed from the hardcoded `['en','ru','hy']` to the
|
||||||
|
real tenant order `['ru','en','hy']` in both editors.
|
||||||
|
|
||||||
## Notes (not bugs, just flag before shipping)
|
## Notes (not bugs, just flag before shipping)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user