feat(content-drive): prompt Asset vs File on upload (#35575)#36243
feat(content-drive): prompt Asset vs File on upload (#35575)#36243zJaaal wants to merge 6 commits into
Conversation
Uploading to a folder with no preference now prompts the user to choose between Asset (dotAsset) and File (FileAsset) before the upload runs, for both the Upload button and OS drag-and-drop. The selected base type is sent to the upload endpoint instead of the hardcoded dotAsset. - Parameterize DotUploadFileService.uploadDotAsset with a contentType (defaults to dotAsset; backward compatible) - Add the dot-content-drive-dialog-upload-selector dialog (Assets recommended + selected by default, Files), wired through the shell's UPLOAD_SELECTOR dialog and emitting the full selection (folder + type + files) so a future per-folder "remember" can reuse it - Rename onAddNewDotAsset/addNewDotAsset to onUpload/upload - Fix pre-existing dropzone overlay icon centering and the locale chip wrapping at narrow widths - Tests for the dialog, both upload flows, and the service param Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…-vs-file-type-selection
|
Claude finished @zJaaal's task in 1m 48s —— View job Rollback Safety Analysis
Result: ✅ Safe To RollbackAll 16 changed files are pure frontend (Angular/TypeScript) and i18n properties. The diff was checked against every unsafe category:
Summary: This PR is entirely frontend — new Angular dialog component, updated shell wiring, renamed component outputs, one Label added: AI: Safe To Rollback |
🤖 Bedrock Review —
|
- Type the upload selection's contentType as a union derived from UPLOAD_SELECTOR_OPTIONS so it can't drift or accept arbitrary values - Rename the shadowed contentType in the upload success handler Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Thanks for the review — went through each item. Addressed (e097bfa):
Intentional / no change (with rationale):
— Reply drafted by Claude (Claude Code) on behalf of @zJaaal. |
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…-vs-file-type-selection
…-vs-file-type-selection
Proposed Changes
Closes #35575.
When uploading to a folder with no preference set, Content Drive now prompts the user to choose between Asset (
dotAsset) and File (FileAsset) before the upload runs, and sends the selected base type to the upload endpoint instead of the hardcodeddotAsset. This applies to both upload entry points: the Upload button and OS drag-and-drop.Behavior
FileAsset.contentTypefield;FileAssetis the File Asset content-type variable (matchesDEFAULT_FILE_ASSET_TYPES).Screen.Recording.2026-06-18.at.2.34.07.PM-1.mov
Changes
dot-content-drive-dialog-upload-selectordialog, wired through the shell'sUPLOAD_SELECTORdialog. It emits the full selection (target folder + content type + files) so a future per-folder "remember" preference ([TASK] Content Drive: Persist default upload base type on folder (remember preference + edit folder fields) #35578) can reuse it without rework.DotUploadFileService.uploadDotAssettakes an optionalcontentType(defaults todotAsset; backward compatible with existing callers).onAddNewDotAsset/addNewDotAsset→onUpload/upload(no more hardcodeddotAssetin handler/event names).Out of scope (tracked in epic #35436)
Folder-level preferences/inheritance (#35577), the "Remember for this folder" checkbox (#35578), dynamic button label, MIME-type routing, and multi-file upload.
Testing
dotAsset/FileAsset, root upload, message handling, multi-file warning, and the button flow (pick → picker → upload).contentType.portlets-content-drive: 666 passing;data-access: 690 passing. Lint clean.🤖 Generated with Claude Code