-
Notifications
You must be signed in to change notification settings - Fork 5
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
refactor(multidropzone): [SIDE-7] Update MultiDropzone component to have default accept type #315
refactor(multidropzone): [SIDE-7] Update MultiDropzone component to have default accept type #315
Conversation
…ave default accept type
a803530
to
d8ba9d2
Compare
@@ -1,25 +1,41 @@ | |||
import { Accept } from "react-dropzone"; | |||
|
|||
export enum FileMimeTypes { | |||
avi = "video/x-msvideo", |
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.
👴
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 know, I know 😄
@@ -128,14 +128,14 @@ describe('MultiDropzone component', () => { | |||
const screen = setup({ accept: 'image' }); | |||
|
|||
expect( | |||
screen.getByText('Supports HEIC, BMP, JPEG, JPG, PNG') | |||
screen.getByText('Supports images, videos and documents') |
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.
Shouldn't this show only "images" because we are explicitly adding the { accept: 'image' }
object?
It seems like we are dropping the labelling based on the file types. Is that what we want?
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.
@talo242 Fixed it. For custom accept types you need to provide your own label but for generic image/video/documents it will now show the default label.
815222e
to
bc97671
Compare
What this PR does
Updates
MultiDropzone
component to:Solves:
SIDE-7
How to test?
Please include additional context on how to test this PR.
Checklist:
Or give a reason why this does not apply:
Or give a reason why this does not apply:
Browser support
My code works in the following browsers: