Files
Perplexica/ui/app
haddadrm 136063792c Discover Page Optimization
Restructured the Discover page to prevent the entire page from
refreshing when selecting categories or updating settings

1. Component Separation
-Split the page into three main components:
-DiscoverHeader: Contains the title, settings button, and category navigation
-DiscoverContent: Contains the grid of articles with its own loading state
-PreferencesModal: Manages the settings modal with temporary state

2. Optimized Rendering
-Used React.memo for all components to prevent unnecessary re-renders
-Each component only receives the props it needs
-The header remains stable while only the content area updates

3. Improved Loading States

3.1. Added separate loading states:
-Initial loading for the first page load
-Content-only loading when changing categories or preferences
-Loading spinners now only appear in the content area when changing
categories

3.2. Better State Management
-Main state is managed in the parent component
-Modal uses temporary state that only updates the main state after saving
-Clear separation of concerns between components

These changes create a more polished user experience where the header
and sidebar remain stable while only the content area refreshes when
needed. The page now feels more responsive and app-like, rather than
having the entire page refresh on every interaction
2025-02-25 23:27:56 +04:00
..
2025-02-25 23:27:56 +04:00
2024-04-09 16:21:05 +05:30
2025-02-25 20:22:48 +04:00
2024-07-25 20:33:56 +05:30
2024-05-11 21:19:38 +05:30