-
Notifications
You must be signed in to change notification settings - Fork 357
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
feature(file-input): introducing file-input component. (closes #326) and (closes #286) #339
Conversation
there was a need to be able to replace the input and upload text, and now you can even replace the icons
…alent into feature/file-browse
used markup to bind elements and give more a11y options
Thats an issue from |
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.
UI gets distorted when one or more than one files are dropped or uploaded.
it('should mimic file selection and then clear it', | ||
async(inject([], () => { | ||
let fixture: ComponentFixture<any> = TestBed.createComponent(TdFileUploadBasicTestComponent); | ||
let component: TdFileUploadBasicTestComponent = fixture.debugElement.componentInstance; | ||
component.multiple = false; | ||
fixture.detectChanges(); | ||
fixture.whenStable().then(() => { | ||
expect(fixture.debugElement.query(By.css('.td-file-browse'))).toBeTruthy(); | ||
expect(fixture.debugElement.query(By.css('td-file-input'))).toBeTruthy(); |
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 tags be called by By.css
or it should be By.directive
? or were you actually calling it on class: td-file-input
and missed the dot.
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.
By.css
doesnt literally mean it needs to be a class
. It just means it can be a css selector
, which in this case is an element
selector.
Description
Removed the
file-selection
part out offile-upload
to create an atomic component thats able to be used stand-alone or part offile-upload
.#326 and #286
What's included?
td-file-input
component for stand-alone usage withngModel
support.td-file-upload
usage oftd-file-input
internally and added way to set its labels so its easier to fori18n
usage [Enhancement] Test (and modify) all our components to make them support or handlei18n
andl10n
. #324:README.md
fortd-file-upload
and load it as part of the docs.td-file-upload
with better examples.(select)
event totd-file-upload
component.OnPush
change detection. [Performance] Make sure all our elements work underOnPush
. #325Test Steps
ng serve
README.md
README.md
General Tests for Every PR
ng serve --aot
still works.npm run lint
passes.npm test
passes and code coverage is not lower.npm run build
still works.Screenshots or link to CodePen/Plunker/JSfiddle