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>
Update the ui-kit dependency from 0.19.9 to 0.19.10 to get
the latest fixes and features from the design system.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
File items created by the search fixture were left with
upload_state=PENDING (set automatically on first save),
so the new pending items exclusion filter hid them from
search results. Set upload_state to READY for file items.
Pending items that were never fully uploaded remain invisible
but still occupy storage. This command deletes items stuck in
pending state beyond a configurable threshold (default 48h).
Existing tests now set upload_state=READY on file items
so they remain visible after the pending exclusion filter.
New dedicated tests verify that pending items are excluded
from list, children, recents and search endpoints.
Items with upload_state=PENDING are now filtered out from
list, children, recents and search endpoints. This avoids
showing files to other users before the upload is complete.
The progress handler was skipping 100% entirely, leaving
the indicator stuck before the upload-ended call. Instead,
we now scale the 0-100 range to 0-90 so the user sees
smooth progression while the final 10% is reserved for
the upload-ended endpoint confirmation.
In the item model the properties numchild and numchild_folder must be
maintain by doing a +/- 1 operation in several actions. Maintaining is
error prone, hard to catch and can have lot of root cause we can't
identified. We choose to use annotation instead and to compute the value
when needed.
- Added a new `NewFolderIcon` component for creating folders.
- Updated `AppExplorerBreadcrumbs` to replace `WorkspaceIcon` with
`FolderIcon`.
- Introduced an `ItemActionDropdown` to manage item actions, including
folder creation.
- Improved layout in `AppExplorer.scss` by adding `justify-content:
space-between` for better alignment.
When a user with priviledged role on an item but inherited he can not
invite external person. We refacto the invitation viewset, serializer
and permission to check roles against all the tree.