-
Notifications
You must be signed in to change notification settings - Fork 3.3k
feat(uploadFiles): extend asset links to support file upload #15225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
feat(uploadFiles): extend asset links to support file upload #15225
Conversation
9b071da to
439ab1c
Compare
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
|
✅ 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. |
Bundle ReportChanges will increase total bundle size by 6.78kB (0.02%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: datahub-react-web-esmAssets Changed:
Files in
|
chriscollins3456
left a comment
There was a problem hiding this 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
| if (scenario == UploadDownloadScenario.ASSET_DOCUMENTATION_LINKS) { | ||
| validateInputForAssetDocumentationScenario(context, input); | ||
| } |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
|
||
| import { UploadDownloadScenario } from '@types'; | ||
|
|
||
| export function useUploadFileHandler() { |
There was a problem hiding this comment.
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

This PR adds possibility to upload files to documentation links
File node component