Document menu structure standards and UI consistency guidelines
Added comprehensive menu standards documentation covering: Menu Structure: - Standard 11-step menu format (banner, title, sections, options, back, prompt) - Separator standards (main vs submenu) - Back button conventions (always option 0, red color) Color Coding: - Main categories have distinct colors - Actions within menus follow consistent color patterns - Dangerous actions always use red Identified Improvements Needed: - Create lib/domain-selector.sh for unified domain/user selection - Standardize domain lookup across all modules - Create menu-helpers.sh for consistent rendering - Audit modules for consistency This documentation ensures all future menus maintain uniform look/feel
This commit is contained in:
@@ -3590,3 +3590,65 @@ WORKFLOW:
|
|||||||
5. Push
|
5. Push
|
||||||
6. Brief update (1-2 sentences)
|
6. Brief update (1-2 sentences)
|
||||||
|
|
||||||
|
|
||||||
|
[MENU_STANDARDS]
|
||||||
|
updated: 2025-12-16
|
||||||
|
|
||||||
|
MENU STRUCTURE CONSISTENCY:
|
||||||
|
All menus follow this standard format:
|
||||||
|
|
||||||
|
1. show_banner (clears screen + shows toolkit banner)
|
||||||
|
2. Menu title with icon: echo -e "${COLOR}${BOLD}🔧 Menu Name${NC}"
|
||||||
|
3. Empty line
|
||||||
|
4. Section headers: echo -e "${BOLD}Section Name:${NC}"
|
||||||
|
5. Empty line before options
|
||||||
|
6. Options: echo -e " ${COLOR}##)${NC} 🔧 Option Name - Description"
|
||||||
|
7. Empty line after section
|
||||||
|
8. Back button: echo -e " ${RED}0)${NC} Back to Main Menu"
|
||||||
|
9. Empty line
|
||||||
|
10. Separator: echo -e "${CYAN}──────────────────────────────────────────────────────────────${NC}"
|
||||||
|
11. Prompt: echo -n "Select option: "
|
||||||
|
|
||||||
|
MENU SEPARATORS:
|
||||||
|
Main menu: ${CYAN}═══════════════════════════════════════════════════════════════${NC}
|
||||||
|
Submenus: ${CYAN}──────────────────────────────────────────────────────────────${NC}
|
||||||
|
|
||||||
|
BACK BUTTON STANDARD:
|
||||||
|
Always option 0
|
||||||
|
Always red color: ${RED}0)${NC}
|
||||||
|
Main menu: "Exit"
|
||||||
|
Submenus: "Back to Main Menu"
|
||||||
|
|
||||||
|
COLOR CODING:
|
||||||
|
Main categories: Different colors per category
|
||||||
|
Security: ${GREEN}
|
||||||
|
Website: ${BLUE}
|
||||||
|
Performance: ${MAGENTA}
|
||||||
|
Backup: ${YELLOW}
|
||||||
|
Actions within menus: Consistent per type
|
||||||
|
Analysis tools: ${CYAN}
|
||||||
|
Live monitors: ${MAGENTA}
|
||||||
|
Actions: ${YELLOW}
|
||||||
|
Dangerous: ${RED}
|
||||||
|
|
||||||
|
COMMON ISSUES TO STANDARDIZE:
|
||||||
|
|
||||||
|
❌ INCONSISTENT: Different domain/user lookup in each module
|
||||||
|
✅ TODO: Create lib/domain-selector.sh with:
|
||||||
|
- select_domain_interactive()
|
||||||
|
- select_user_interactive()
|
||||||
|
- validate_domain()
|
||||||
|
- get_domain_owner()
|
||||||
|
|
||||||
|
❌ INCONSISTENT: Some modules have custom menus, others don't
|
||||||
|
✅ STANDARD: Modules should be single-purpose or have internal menus
|
||||||
|
|
||||||
|
❌ INCONSISTENT: Press Enter messages vary
|
||||||
|
✅ STANDARD: Use press_enter function from common-functions.sh
|
||||||
|
|
||||||
|
FUTURE IMPROVEMENTS:
|
||||||
|
1. Create lib/domain-selector.sh for unified domain/user selection
|
||||||
|
2. Create lib/menu-helpers.sh for consistent menu rendering
|
||||||
|
3. Audit all modules for menu consistency
|
||||||
|
4. Document module menu patterns in this section
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user