Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/utils/ui_enhancement.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def __init__(self):
self.navigation_structure: Dict = {}
self.accessibility_features: Dict[str, bool] = {}
self.user_preferences: Dict[str, Dict] = {}
self.navigation_history: List[Dict] = []

def add_filter_option(self, category: str, options: List[str]):
"""Add filter options for a category."""
Expand Down Expand Up @@ -128,9 +129,18 @@ def get_ui_guidance(self, page: str) -> Dict:

def track_navigation_flow(self, user_id: str, from_page: str, to_page: str):
"""Track user navigation for UX improvements."""
return {
record = {
"user_id": user_id,
"from": from_page,
"to": to_page,
"timestamp": str(datetime.utcnow()),
}
self.navigation_history.append(record)
return record

def get_navigation_history(self, user_id: str) -> List[Dict]:
"""Return navigation history for a specific user."""
return [
entry for entry in self.navigation_history
if entry.get("user_id") == user_id
]
Loading