-
Notifications
You must be signed in to change notification settings - Fork 125
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
feat: introduce File Uploader component #2947
Conversation
❌ Check the deploy log for errors here: https://app.netlify.com/sites/fundamental-ngx/deploys 🔨 Explore the source changes: 464e5ec 🔍 Inspect the deploy logs: https://app.netlify.com/sites/fundamental-ngx/deploys/5f3a21b711f1950007a17a95 |
...e-uploader/examples/file-uploader-compact-example/file-uploader-compact-example.component.ts
Outdated
Show resolved
Hide resolved
...docs/file-uploader/examples/file-uploader-max-example/file-uploader-max-example.component.ts
Outdated
Show resolved
Hide resolved
apps/docs/src/app/core/component-docs/file-uploader/file-uploader-docs.component.html
Outdated
Show resolved
Hide resolved
export class FileUploaderDragndropDirective { | ||
/** Whether multiple files can be dropped at once. */ | ||
@Input() | ||
multiple: boolean = true; |
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.
have you run linter? Seems like strict typing enforcement has been removed recently so types may not be needed.
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.
yes fixed all lint errors
|
||
fileName: string = ''; | ||
|
||
valid_files: File[] = []; |
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.
missing comments, again not sure of inconsistency in naming, camel cases vs underscores
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.
Please use camel-case.
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.
used camelCase
libs/core/src/lib/form/form-input-message-group/form-input-message-group.component.scss
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.
Please add unit tests for parseFileSize
|
||
fileName: string = ''; | ||
|
||
valid_files: File[] = []; |
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.
Please use camel-case.
this.inputRefText.nativeElement.title = fileName; | ||
} | ||
|
||
parseFileSize(filesize: string) { |
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.
Can you add unit tests to the spec for this function which test all the valid inputs and a few invalid inputs as well?
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.
Written unit test cases for all the scenario.
949fd83
to
3490a11
Compare
eaa16f5
to
b80a0fd
Compare
apps/docs/src/app/core/component-docs/file-uploader/file-uploader-docs.component.html
Outdated
Show resolved
Hide resolved
715fe2f
to
1d1f785
Compare
<fd-docs-section-title [id]="'file-uploader-compact'" [componentName]="'file-uploader'"> | ||
Compact File Upload | ||
</fd-docs-section-title> | ||
<description>Fiori3 recommended file uploader example.</description> |
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.
Specify what makes this fiori 3 and how to achieve it
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.
i have modified the description.
<fd-docs-section-title [id]="'file-uploader-compact'" [componentName]="'file-uploader'"> | ||
Compact File Upload | ||
</fd-docs-section-title> | ||
<description>Example to demonstrate the compact file uploader. </description> |
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.
Say what api must be used to achieve compact
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.
I have mentioned it in the description now.
…ents given by Edrez and Mikerodonnel
28a4358
to
52c6333
Compare
Please provide a link to the associated issue.
Closes: #2927
Blocked by: #2882
Please provide a brief summary of this pull request.
Creating new 'File Uploader' Component.
Please check whether the PR fulfills the following requirements
https://github.com/SAP/fundamental-ngx/blob/master/CONTRIBUTING.md
https://github.com/SAP/fundamental-ngx/wiki/PR-Review-Checklist