We are using the drf_standardized_errors handler to have "nice" errors
for the frontend application. We decided to override the SchemaField
from the django_pydantic_field library in order to make it compatible
with this error handler.
We want to store in the user model the column_preferences parameters.
These parameters are saved by the front application. In order to
validate it, we use pydantic BaseModel and store it in a json field
Super useful for validation when handling unstructured dictionaries.
Follow qbey's recommendation and align with the
suitenumerique/conversation project approach to improve schema
validation and data integrity.
Use placeholderData in useInfiniteChildren and
useInfiniteItems to prevent layout flicker on
re-fetch. Remove addItemToTop from
useOptimisticPagination. Simplify useMutations
by removing unused logic.
Wire custom columns into EmbeddedExplorerGrid,
AppExplorer, AppExplorerGrid, and WorkspacesExplorer.
Update page components ([id], recent, trash) to pass
view configuration through ExplorerLayout.
Update StandardDriver with new ordering support.
Add Zustand store for persisting column visibility
and ordering preferences per view in localStorage.
Add useColumnPreferences and useGridColumns hooks.
Add ordering utility to map column sort to API
parameters. Include unit tests for store and
ordering logic.
Define ColumnId and ViewConfig types for the column
system. Create column registry and per-view configs.
Add icon components: Clock, FileIcon, PersoIcon,
WeightIcon, and sort direction indicators.
Extend ItemOrderBy enum with new sort fields.
The manual useEffect/AbortController fetch is replaced by
useQuery which handles caching, abort, and error state out
of the box. The project already uses react-query elsewhere.
Both PdfPageViewer and PdfThumbnailSidebar were each creating
their own <Document>, parsing the same PDF twice. A single
shared Document at the parent level halves the parsing work
and simplifies child component interfaces.
The callback and its goToPageRef workaround belong with the
rest of the navigation logic. This keeps PreviewPdf focused
on layout and composition, it makes the main components
lighter.
Firefox does not reliably trigger scroll events from
synthetic mouse.wheel calls in Playwright. Using a
direct scrollTop assignment ensures the virtualized
grid processes the scroll across all browsers.
Dynamically imports the PDF viewer to avoid bundling
pdfjs for non-PDF files. Falls back to an outdated
browser message if the import fails. Updates the modal
to use a blurred backdrop and dvh units.
Adds external link confirmation and outdated browser
warning messages in EN, FR and NL. Updates the generic
error description to point users to support.
Implements a full-featured PDF viewer with thumbnail
sidebar, zoom controls, page navigation and external
link interception. Includes polyfills for older browsers
and a fallback component for unsupported environments.
Adds react-pdf and react-virtualized for the PDF viewer
feature. The next.js config transpiles pdfjs-dist to
support Safari < 17.4 which lacks ES2023 static
initialization blocks.
When testing on local network devices (phones, tablets)
the Django CSRF check blocks requests from non-localhost
origins. This merges CSRF_TRUSTED_ORIGINS env var into
the default list.
Handle race condition where two concurrent retrieve requests pass the
exists() check and both attempt to create a LinkTrace for the same
user/item pair, violating the unique constraint.
Fixes#611
A user with at leat editor role, connected can duplicate a file item
which has its upload_state ready. The duplicate_file task is used to do
the copy of the file on the storage.
We plan to add an action to duplicate an item. We want to use a celery
task to make the copy using the s3 client. The task is retried 10 times
if failing and then the item is deleted if the copy fail after 10
retriees.
In order to add in next commit a duplicate action in the ItemViewset, we
add a `duplicate` entry in the item abilities. A user can duplicate a
file if he can update it.
Add placeholderData to useItem query so the previous item data
remains visible during refetch, preventing flickering and layout
shifts when the query is revalidated.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Switch RhfInput to the classic variant with hidden label and
placeholder matching the label text, for a cleaner inline
appearance in forms.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When renaming an item, also update the right panel's forced item
if it's currently displaying the renamed item. This ensures the
panel title stays in sync after a rename without requiring a
manual refresh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Reorganize the context menu items for better UX: share and download
are now grouped first, followed by favorite, then rename/move, then
info, and finally delete. Also fix the favorite handler to only add
the item to the tree sidebar when it's a folder, preventing files
from incorrectly appearing in the favorites tree.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Reduce the large icon size from 48px to 32px to better fit the
grid layout. Pass `size={IconSize.LARGE}` explicitly in
EmbeddedExplorerGridNameCell so the icon renders at the correct
size. Also fix trailing commas in ItemIcon.tsx.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the material icons (zoom_in, zoom_out) with custom SVG icons
(ZoomPlusIcon, ZoomMinusIcon, ResetZoomIcon) for a more polished
image viewer toolbar. Also update IconSvg to support numeric size
prop, add button styles in ImageViewer.scss, and fix trailing commas
throughout the component.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add missing optional chaining operators to prevent runtime errors
when accessing `abilities.children_create` in AppExplorerBreadcrumbs
and `creator.id` in EmbeddedExplorerGridBreadcrumbs. These properties
can be undefined when the item data is not fully loaded yet.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>