Skip to content
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

Merged
merged 18 commits into from
Aug 18, 2020
Merged

Conversation

manu-kr
Copy link
Contributor

@manu-kr manu-kr commented Jul 31, 2020

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

@netlify
Copy link

netlify bot commented Jul 31, 2020

❌ 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

export class FileUploaderDragndropDirective {
/** Whether multiple files can be dropped at once. */
@Input()
multiple: boolean = true;
Copy link
Contributor

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.

Copy link
Contributor Author

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[] = [];
Copy link
Contributor

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

Copy link
Member

Choose a reason for hiding this comment

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

Please use camel-case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

used camelCase

package.json Show resolved Hide resolved
@salarenko salarenko added blocked blocked ticket core Core library specific issues labels Jul 31, 2020
Copy link
Member

@KevinOkamoto KevinOkamoto left a 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[] = [];
Copy link
Member

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) {
Copy link
Member

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?

Copy link
Contributor Author

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.

@CLAassistant
Copy link

CLAassistant commented Aug 5, 2020

CLA assistant check
All committers have signed the CLA.

<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>
Copy link
Contributor

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

Copy link
Contributor Author

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>
Copy link
Contributor

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

Copy link
Contributor Author

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.

@InnaAtanasova InnaAtanasova changed the title Fix(File Uploader):Introducing new Fiori3 file uploader component fix: introduce File Uploader component Aug 18, 2020
@InnaAtanasova InnaAtanasova changed the title fix: introduce File Uploader component feat: introduce File Uploader component Aug 18, 2020
@InnaAtanasova InnaAtanasova merged commit 41670b9 into master Aug 18, 2020
@InnaAtanasova InnaAtanasova deleted the fix/file-uploader branch August 18, 2020 18:38
@manavs manavs added this to the Sprint 44 - ariba milestone Sep 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked blocked ticket core Core library specific issues New Fiori component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create 'File Uploader' component in ngx/core