Skip to content

Conversation

chriscollins3456
Copy link
Collaborator

This PR builds a new extension that allows us to drag and drop files into our rich text Editor component and upload them to S3, completing the desired flow of requesting a presigned URL, uploading to S3, then rendering a classic markdown link/image with a reference to our own file service REST API (what this PR is built on top of).

Right now this is only enabled on the new summary tab, but we have another PR coming out where we can support this for all entity documentation and extend support elsewhere as well.

Screen.Recording.2025-10-14.at.12.49.30.PM.mov

@github-actions github-actions bot added the product PR or Issue related to the DataHub UI/UX label Oct 14, 2025
@datahub-cyborg datahub-cyborg bot added the needs-review Label for PRs that need review from a maintainer. label Oct 14, 2025
Copy link

alwaysmeticulous bot commented Oct 14, 2025

✅ Meticulous spotted 0 visual differences across 950 screens tested: view results.

Meticulous evaluated ~9 hours of user flows against your PR.

Expected differences? Click here. Last updated for commit 9367e7d. This comment will update as new commits are pushed.

Copy link

codecov bot commented Oct 14, 2025

Bundle Report

Changes will increase total bundle size by 8.25kB (0.03%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
datahub-react-web-esm 28.6MB 8.25kB (0.03%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: datahub-react-web-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-*.js 8.25kB 18.94MB 0.04%

Files in assets/index-*.js:

  • ./src/alchemy-components/components/Editor/extensions/fileDragDrop/fileUtils.ts → Total Size: 3.78kB

  • ./src/alchemy-components/components/Editor/extensions/fileDragDrop/FileNodeView.tsx → Total Size: 1.66kB

  • ./src/alchemy-components/components/Editor/extensions/fileDragDrop/FileDragDropExtension.tsx → Total Size: 7.25kB

  • ./src/alchemy-components/components/Editor/extensions/markdownToHtml.tsx → Total Size: 592 bytes

  • ./src/alchemy-components/components/Editor/Editor.tsx → Total Size: 2.72kB

  • ./src/app/entityV2/summary/documentation/EditDescriptionModal.tsx → Total Size: 1.61kB

  • ./src/alchemy-components/components/Editor/extensions/htmlToMarkdown.tsx → Total Size: 4.57kB

  • ./src/app/shared/hooks/useFileUpload.ts → Total Size: 1.0kB

  • ./src/app/shared/Loading.tsx → Total Size: 852 bytes

Copy link

codecov bot commented Oct 14, 2025

Codecov Report

❌ Patch coverage is 98.39572% with 3 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...components/Editor/extensions/fileDragDrop/index.ts 0.00% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

removeEditingParam();
};

const { uploadFile } = useFileUpload({ scenario: UploadDownloadScenario.AssetDocumentation, assetUrn });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Somewhere we have to add checking of our feature flag to enable/disable uploading

url.includes('amazonaws.com') || // Other AWS storage
url.includes('storage.googleapis.com') || // Google Cloud Storage
url.includes('blob.core.windows.net') || // Azure Blob Storage
url.match(/\.(pdf|doc|docx|xls|xlsx|ppt|pptx|txt|jpg|jpeg|png|gif|webp|mp4|mp3|zip|rar)$/i) !== null // File extensions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we generate the pattern from EXTENSION_TO_FILE_TYPE to keep them in sync?

@datahub-cyborg datahub-cyborg bot added pending-submitter-response Issue/request has been reviewed but requires a response from the submitter and removed needs-review Label for PRs that need review from a maintainer. labels Oct 15, 2025
@datahub-cyborg datahub-cyborg bot added needs-review Label for PRs that need review from a maintainer. and removed pending-submitter-response Issue/request has been reviewed but requires a response from the submitter labels Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-review Label for PRs that need review from a maintainer. product PR or Issue related to the DataHub UI/UX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants