Update sidebar label to Theme Builder and add implementation prompt

This commit is contained in:
mmabdalla 2025-12-29 00:51:29 +02:00
parent 120b7285dc
commit b7e0d900ff
4 changed files with 59 additions and 2 deletions

View file

@ -0,0 +1,36 @@
# BOSA Sidebar Integration for BP_WB
## Task
Add sidebar link support for apps in the `apps/` directory. BP_WB app needs a sidebar link labeled **"Theme Builder"** that appears for Super Admin users only, positioned after the "Themes" link.
## Requirements
1. **Read sidebar configuration from apps:**
- Scan `apps/*/manifest.yaml` for `sidebar` section
- Or scan `apps/*/sidebar.json` files
- Merge app sidebar links with core sidebar links
2. **Configuration format:**
```yaml
# In apps/bp_wb/manifest.yaml
sidebar:
label: Theme Builder
url: /bp_wb/
icon: pencil-square
role: super_admin
position: after
after: themes
```
3. **Filtering:**
- Only show links where `role: "super_admin"` for Super Admin users
- Hide links for users without required role
4. **Positioning:**
- Support `position: "after"` with `after: "themes"` to place link after Themes
- Support `position: "before"` for placing before specific links
- Support `position: "append"` for adding to end of sidebar
## Expected Result
When BP_WB is deployed to `apps/bp_wb/`, Super Admin users should see a "Theme Builder" link in the sidebar immediately after the "Themes" link, linking to `/bp_wb/`.

View file

@ -0,0 +1,21 @@
BOSA Sidebar Integration for BP_WB
Add sidebar link support for apps in apps/ directory. BP_WB needs a "Theme Builder" link for Super Admin only, positioned after "Themes".
Requirements:
1. Read sidebar config from apps/*/manifest.yaml (sidebar section) or apps/*/sidebar.json
2. Filter by role (super_admin only)
3. Support positioning: position: "after" with after: "themes"
4. Merge app links with core sidebar links
Config format (apps/bp_wb/manifest.yaml):
sidebar:
label: Theme Builder
url: /bp_wb/
icon: pencil-square
role: super_admin
position: after
after: themes
Result: Super Admin sees "Theme Builder" link after "Themes" → /bp_wb/

View file

@ -5,7 +5,7 @@ author: BOSA Team
# Sidebar configuration for Super Admin # Sidebar configuration for Super Admin
sidebar: sidebar:
label: Website Builder label: Theme Builder
url: /bp_wb/ url: /bp_wb/
icon: pencil-square icon: pencil-square
role: super_admin role: super_admin

View file

@ -2,7 +2,7 @@
"sidebar": { "sidebar": {
"links": [ "links": [
{ {
"label": "Website Builder", "label": "Theme Builder",
"url": "/bp_wb/", "url": "/bp_wb/",
"icon": "pencil-square", "icon": "pencil-square",
"role": "super_admin", "role": "super_admin",