-
Notifications
You must be signed in to change notification settings - Fork 397
[ui-importer] Add configured filesystems in importer #4131
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?
Conversation
✅ Test files were modified. Ensure that the tests cover all relevant changes. ✅ |
465c3d9
to
42dccf4
Compare
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 work.
Please check the comments below.
desktop/core/src/desktop/js/apps/storageBrowser/FileChooserModal/FileChooserModal.tsx
Show resolved
Hide resolved
desktop/core/src/desktop/js/apps/storageBrowser/FileChooserModal/FileChooserModal.tsx
Outdated
Show resolved
Hide resolved
desktop/core/src/desktop/js/apps/storageBrowser/FileChooserModal/FileChooserModal.tsx
Outdated
Show resolved
Hide resolved
desktop/core/src/desktop/js/apps/storageBrowser/FileChooserModal/FileChooserModal.tsx
Outdated
Show resolved
Hide resolved
desktop/core/src/desktop/js/apps/newimporter/ImporterSourceSelector/ImporterSourceSelector.tsx
Outdated
Show resolved
Hide resolved
desktop/core/src/desktop/js/apps/newimporter/ImporterSourceSelector/ImporterSourceSelector.tsx
Outdated
Show resolved
Hide resolved
desktop/core/src/desktop/js/apps/newimporter/ImporterSourceSelector/ImporterSourceSelector.tsx
Outdated
Show resolved
Hide resolved
desktop/core/src/desktop/js/apps/newimporter/ImporterSourceSelector/ImporterSourceSelector.tsx
Show resolved
Hide resolved
desktop/core/src/desktop/js/apps/storageBrowser/FileChooserModal/FileChooserModal.tsx
Outdated
Show resolved
Hide resolved
Lots of good feedback from @ramprasadagarwal. I'll hold while you guys sort it out, but I did notice that the screenshot of the drag and drop looks weird where the "drop area" appears behind the action buttons of the modal. |
desktop/core/src/desktop/js/apps/newimporter/ImporterSourceSelector/ImporterSourceSelector.tsx
Outdated
Show resolved
Hide resolved
desktop/core/src/desktop/js/apps/newimporter/ImporterSourceSelector/ImporterSourceSelector.tsx
Outdated
Show resolved
Hide resolved
811ebb9
to
3700a3c
Compare
.../core/src/desktop/js/apps/newimporter/ImporterSourceSelector/ImporterSourceSelector.test.tsx
Outdated
Show resolved
Hide resolved
desktop/core/src/desktop/js/apps/newimporter/ImporterSourceSelector/ImporterSourceSelector.tsx
Outdated
Show resolved
Hide resolved
desktop/core/src/desktop/js/apps/newimporter/ImporterSourceSelector/ImporterSourceSelector.tsx
Outdated
Show resolved
Hide resolved
desktop/core/src/desktop/js/apps/newimporter/ImporterSourceSelector/ImporterSourceSelector.tsx
Outdated
Show resolved
Hide resolved
...p/core/src/desktop/js/apps/newimporter/ImporterSourceSelector/LocalFileUploadOption.test.tsx
Outdated
Show resolved
Hide resolved
desktop/core/src/desktop/js/apps/storageBrowser/FileChooserModal/FileChooserModal.tsx
Outdated
Show resolved
Hide resolved
desktop/core/src/desktop/js/reactComponents/BottomSlidePanel/BottomSlidePanel.tsx
Outdated
Show resolved
Hide resolved
desktop/core/src/desktop/js/reactComponents/BottomSlidePanel/BottomSlidePanel.tsx
Outdated
Show resolved
Hide resolved
desktop/core/src/desktop/js/reactComponents/BottomSlidePanel/BottomSlidePanel.tsx
Show resolved
Hide resolved
desktop/core/src/desktop/js/reactComponents/BottomSlidePanel/BottomSlidePanel.tsx
Outdated
Show resolved
Hide resolved
3700a3c
to
1e68db6
Compare
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 work. I reviewed the first half of the files. Will continue with the rest later, but you can start addressing the issues.
.../core/src/desktop/js/apps/newimporter/ImporterSourceSelector/ImporterSourceSelector.test.tsx
Show resolved
Hide resolved
.../core/src/desktop/js/apps/newimporter/ImporterSourceSelector/ImporterSourceSelector.test.tsx
Outdated
Show resolved
Hide resolved
desktop/core/src/desktop/js/apps/newimporter/ImporterSourceSelector/ImporterSourceSelector.tsx
Show resolved
Hide resolved
.../core/src/desktop/js/apps/newimporter/ImporterSourceSelector/ImporterSourceSelector.test.tsx
Outdated
Show resolved
Hide resolved
desktop/core/src/desktop/js/apps/newimporter/ImporterSourceSelector/ImporterSourceSelector.tsx
Show resolved
Hide resolved
desktop/core/src/desktop/js/apps/newimporter/ImporterSourceSelector/LocalFileUploadOption.tsx
Outdated
Show resolved
Hide resolved
desktop/core/src/desktop/js/apps/newimporter/ImporterSourceSelector/LocalFileUploadOption.tsx
Outdated
Show resolved
Hide resolved
desktop/core/src/desktop/js/apps/newimporter/ImporterSourceSelector/LocalFileUploadOption.tsx
Show resolved
Hide resolved
data-testid="hue-file-input" | ||
className="hue-importer__source-selector-option-upload" | ||
onChange={handleFileUpload} | ||
accept=".csv, .xlsx, .xls" |
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.
did we really agree that these are the only supported file formats?
...p/core/src/desktop/js/apps/newimporter/ImporterSourceSelector/LocalFileUploadOption.test.tsx
Outdated
Show resolved
Hide resolved
@nidhibhatg I'm also trying out some deep PR review AI prompting using the the copilot chat functionality. Please have a look, I think they make sense. Unfortunately I can't get them to appear as comments in the actual code.
Comment:
ImporterSourceSelector.tsx
Comment:
Comment:
LocalFileUploadOption.test.tsx
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.
Pull Request Overview
This PR adds support for configured filesystems in the importer and enhances the file chooser with upload and folder-creation capabilities.
- Introduces a reusable
BottomSlidePanel
component for folder creation UI - Extends
FileChooserModal
with drag-and-drop, polling, upload button, and error/retry handling - Updates
ImporterSourceSelector
to fetch and render configured filesystems dynamically
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
reactComponents/BottomSlidePanel/BottomSlidePanel.tsx | New bottom slide panel component |
apps/storageBrowser/FileChooserModal/FileChooserModal.tsx | File chooser extended to support upload & folder creation |
apps/newimporter/ImporterSourceSelector/ImporterSourceSelector.tsx | Fetch and display configured filesystems |
apps/newimporter/ImporterSourceSelector/LocalFileUploadOption.tsx | Local file upload option with size validation |
Comments suppressed due to low confidence (4)
desktop/core/src/desktop/js/reactComponents/BottomSlidePanel/BottomSlidePanel.tsx:24
- The onPrimaryClick prop is typed as
(unknown) => void
, which is ambiguous. Consider changing it to a clear signature like() => void
or specify the exact argument type.
onPrimaryClick?: (unknown) => void;
desktop/core/src/desktop/js/reactComponents/BottomSlidePanel/BottomSlidePanel.tsx:66
- The mask div has
role="button"
but no accessible name. Addaria-label
oraria-labelledby
(e.g.,aria-label="Close panel"
) so screen readers announce its purpose.
<div className={`hue-bottom-slide-mask ${isOpen ? 'fade-in' : 'fade-out'}`}
desktop/core/src/desktop/js/reactComponents/BottomSlidePanel/BottomSlidePanel.scss:62
- Missing semicolon after the
padding: 16px 24px
property in.hue-bottom-slide-panel__footer
. Add a semicolon to avoid CSS parsing errors.
padding: 16px 24px
desktop/core/src/desktop/js/apps/storageBrowser/FileChooserModal/FileChooserModal.tsx:207
- The variable
name
is undefined here. You probably meant to usecreateFolderValue
or the new folder name returned from the API.
setDestPath(prev => `${prev}/${name}`);
desktop/core/src/desktop/js/apps/storageBrowser/FileChooserModal/FileChooserModal.tsx
Outdated
Show resolved
Hide resolved
desktop/core/src/desktop/js/apps/newimporter/ImporterSourceSelector/LocalFileUploadOption.tsx
Outdated
Show resolved
Hide resolved
desktop/core/src/desktop/js/apps/newimporter/ImporterSourceSelector/ImporterSourceSelector.tsx
Outdated
Show resolved
Hide resolved
1e68db6
to
18ae023
Compare
desktop/core/src/desktop/js/apps/newimporter/ImporterSourceSelector/ImporterSourceSelector.tsx
Outdated
Show resolved
Hide resolved
desktop/core/src/desktop/js/apps/newimporter/ImporterSourceSelector/LocalFileUploadOption.tsx
Outdated
Show resolved
Hide resolved
desktop/core/src/desktop/js/apps/newimporter/ImporterSourceSelector/LocalFileUploadOption.tsx
Outdated
Show resolved
Hide resolved
desktop/core/src/desktop/js/apps/newimporter/ImporterSourceSelector/LocalFileUploadOption.tsx
Show resolved
Hide resolved
desktop/core/src/desktop/js/apps/newimporter/ImporterSourceSelector/ImporterSourceSelector.tsx
Outdated
Show resolved
Hide resolved
desktop/core/src/desktop/js/apps/newimporter/ImporterSourceSelector/ImporterSourceSelector.tsx
Show resolved
Hide resolved
desktop/core/src/desktop/js/apps/newimporter/ImporterSourceSelector/LocalFileUploadOption.tsx
Outdated
Show resolved
Hide resolved
desktop/core/src/desktop/js/apps/newimporter/ImporterSourceSelector/LocalFileUploadOption.tsx
Show resolved
Hide resolved
desktop/core/src/desktop/js/apps/storageBrowser/FileChooserModal/FileChooserModal.tsx
Show resolved
Hide resolved
desktop/core/src/desktop/js/apps/storageBrowser/FileChooserModal/FileChooserModal.tsx
Outdated
Show resolved
Hide resolved
desktop/core/src/desktop/js/apps/storageBrowser/FileChooserModal/FileChooserModal.tsx
Outdated
Show resolved
Hide resolved
457e002
to
a1f9824
Compare
desktop/core/src/desktop/js/apps/newimporter/ImporterSourceSelector/LocalFileUploadOption.tsx
Show resolved
Hide resolved
{/* TODO: Refactor CreateAndUpload to reuse */} | ||
<LoadingErrorWrapper errors={createFolderErrorConfig}> | ||
<Input | ||
defaultValue={createFolderValue} |
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.
why not just use value={createFolderValue}, we don't need to trigger onChange than?
desktop/core/src/desktop/js/apps/storageBrowser/FileChooserModal/FileChooserModal.tsx
Show resolved
Hide resolved
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 work,
Please add the tests and this PR is good from my side.
loading: false, | ||
error: null, | ||
reloadData: mockReloadData | ||
}); |
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.
FileChooser Component has lot of new code, can we add those tests here?
What changes were proposed in this pull request?
How was this patch tested?
Please review Hue Contributing Guide before opening a pull request.