feat: Enhance mobile navbar animations and responsiveness across various components

This commit is contained in:
Anish Sarkar 2025-12-29 00:24:49 +05:30
parent 5bd26ab669
commit ed6470525a
17 changed files with 245 additions and 133 deletions

View file

@ -83,8 +83,14 @@ export function DocumentsTableShell({
const toggleAll = (checked: boolean) => {
const next = new Set(selectedIds);
if (checked) sorted.forEach((d) => { next.add(d.id); });
else sorted.forEach((d) => { next.delete(d.id); });
if (checked)
sorted.forEach((d) => {
next.add(d.id);
});
else
sorted.forEach((d) => {
next.delete(d.id);
});
setSelectedIds(next);
};

View file

@ -9,9 +9,7 @@ interface ProcessingIndicatorProps {
documentProcessorTasksCount: number;
}
export function ProcessingIndicator({
documentProcessorTasksCount
}: ProcessingIndicatorProps) {
export function ProcessingIndicator({ documentProcessorTasksCount }: ProcessingIndicatorProps) {
const t = useTranslations("documents");
// Only show when there are document_processor tasks (uploads), not connector_indexing_task (periodic reindexing)

View file

@ -136,14 +136,13 @@ export default function DocumentsTable() {
// Set up polling for active tasks
const { summary } = useLogsSummary(searchSpaceId, 24, { refetchInterval: 5000 });
// Filter active tasks to only include document_processor tasks (uploads via "add sources")
// Exclude connector_indexing_task tasks (periodic reindexing)
const documentProcessorTasks = summary?.active_tasks.filter(
task => task.source === "document_processor"
) || [];
const documentProcessorTasks =
summary?.active_tasks.filter((task) => task.source === "document_processor") || [];
const documentProcessorTasksCount = documentProcessorTasks.length;
const activeTasksCount = summary?.active_tasks.length || 0;
const prevActiveTasksCount = useRef(activeTasksCount);