Skip to content

Conversation

@v-tarasevich-blitz-brain
Copy link
Contributor

@v-tarasevich-blitz-brain v-tarasevich-blitz-brain commented Nov 6, 2025

This PR adds possibility to upload files to documentation links

image image image

File node component

image

@github-actions github-actions bot added the product PR or Issue related to the DataHub UI/UX label Nov 6, 2025
@codecov
Copy link

codecov bot commented Nov 11, 2025

Codecov Report

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

Files with missing lines Patch % Lines
...onents/Editor/extensions/fileDragDrop/fileUtils.ts 7.69% 12 Missing ⚠️
...rc/alchemy-components/components/FileNode/utils.ts 92.72% 4 Missing ⚠️
...rc/alchemy-components/components/FileNode/types.ts 0.00% 1 Missing ⚠️
...app/entityV2/summary/links/useUploadFileHandler.ts 98.75% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@alwaysmeticulous
Copy link

alwaysmeticulous bot commented Nov 11, 2025

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

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

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

@codecov
Copy link

codecov bot commented Nov 11, 2025

Bundle Report

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

Detailed changes
Bundle name Size Change
datahub-react-web-esm 28.64MB 6.78kB (0.02%) ⬆️

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 6.78kB 19.02MB 0.04%

Files in assets/index-*.js:

  • ./src/app/entityV2/summary/links/LinkFormWrapper.tsx → Total Size: 2.48kB

  • ./src/app/entityV2/summary/links/UploadFileForm.tsx → Total Size: 2.4kB

  • ./src/app/entityV2/summary/links/UrlLinkForm.tsx → Total Size: 613 bytes

  • ./src/app/entityV2/summary/links/types.ts → Total Size: 200 bytes

  • ./src/app/entityV2/summary/links/AddEditLinkModal.tsx → Total Size: 1.84kB

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

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

  • ./src/app/entityV2/summary/links/FileDragAndDropArea.tsx → Total Size: 3.31kB

  • ./src/app/entityV2/summary/links/utils.ts → Total Size: 983 bytes

  • ./src/app/entityV2/summary/links/useLinkUtils.ts → Total Size: 3.73kB

  • ./src/app/entityV2/summary/links/useUploadFileHandler.ts → Total Size: 1.95kB

  • ./src/alchemy-components/components/FileNode/FileNode.tsx → Total Size: 2.76kB

  • ./src/alchemy-components/components/FileNode/FileIcon.tsx → Total Size: 341 bytes

  • ./src/app/entityV2/summary/links/LinkItem.tsx → Total Size: 2.94kB

  • ./src/alchemy-components/components/FileNode/utils.ts → Total Size: 1.03kB

  • ./src/app/entityV2/summary/links/AddLinkModal.tsx → Total Size: 569 bytes

  • ./src/app/entityV2/summary/links/LinksList.tsx → Total Size: 2.49kB

@v-tarasevich-blitz-brain v-tarasevich-blitz-brain changed the title [WIP] feat(uploadFiles): extend asset links to support file upload feat(uploadFiles): extend asset links to support file upload Nov 12, 2025
@v-tarasevich-blitz-brain v-tarasevich-blitz-brain marked this pull request as ready for review November 12, 2025 09:23
@datahub-cyborg datahub-cyborg bot added the needs-review Label for PRs that need review from a maintainer. label Nov 12, 2025
Copy link
Collaborator

@chriscollins3456 chriscollins3456 left a comment

Choose a reason for hiding this comment

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

nice this is looking awesome! a few comments before approval, but shouldn't be far off

Comment on lines +85 to +87
if (scenario == UploadDownloadScenario.ASSET_DOCUMENTATION_LINKS) {
validateInputForAssetDocumentationScenario(context, input);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

okay actually i do think we have slightly different privileges for adding links - we have the LinkUtils.isAuthorizedToUpdateLinks check in AddLinkResolver and also the GlossaryUtils.canUpdateGlossaryEntity check. so I suppose we should be consistent here

className?: string;
}

export function FileDragAndDropArea({ onFilesUpload, className }: Props) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nice - this will probably be a more shared component soon. not saying it should be in the component library... but maybe actually. doesn't need to happen in this PR

setShowAddLinkModal: React.Dispatch<React.SetStateAction<boolean>>;
};

export default function AddLinkModal({ setShowAddLinkModal }: Props) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

okay so this is looking real nice - can we add this functionality to our other add and edit link modal on the existing documentation tabs?

ideally there's just one component there tbh i'm not sure why there are two of them right now.

fontSize?: FontSizeOptions;
}

export function UploadFileForm({ initialValues, fontSize: _fontSize }: Props) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

for some reason when editing a link for a file I uploaded shows nothing where the file should probably be:
Screenshot 2025-11-12 at 10 18 40 AM


import { UploadDownloadScenario } from '@types';

export function useUploadFileHandler() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

in the future when we have other file upload scenarios, could we reuse this? and just pass in the scenario for instance as a prop

@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 Nov 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-submitter-response Issue/request has been reviewed but requires a response from the submitter product PR or Issue related to the DataHub UI/UX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants