feat(fileuploaderdropcontainer): added pattern for accepted file ext#9929
Conversation
|
✔️ Deploy Preview for carbon-react-next ready! 🔨 Explore the source changes: 7be01bc 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-react-next/deploys/617ae7ea977e550008d2b2aa 😎 Browse the preview: https://deploy-preview-9929--carbon-react-next.netlify.app |
|
DCO Assistant Lite bot All contributors have signed the DCO. |
|
I have read the DCO document and I hereby sign the DCO. |
|
✔️ Deploy Preview for carbon-elements ready! 🔨 Explore the source changes: ec2b211 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-elements/deploys/617346026d2ef8000809f7bb 😎 Browse the preview: https://deploy-preview-9929--carbon-elements.netlify.app |
|
✔️ Deploy Preview for carbon-components-react ready! 🔨 Explore the source changes: ec2b211 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-components-react/deploys/61734602e5870d000708a447 😎 Browse the preview: https://deploy-preview-9929--carbon-components-react.netlify.app |
|
✔️ Deploy Preview for carbon-elements ready! 🔨 Explore the source changes: 7be01bc 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-elements/deploys/617ae7eaad2b17000703f664 😎 Browse the preview: https://deploy-preview-9929--carbon-elements.netlify.app |
|
✔️ Deploy Preview for carbon-components-react ready! 🔨 Explore the source changes: 7be01bc 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-components-react/deploys/617ae7ea6cc22e00073ad156 😎 Browse the preview: https://deploy-preview-9929--carbon-components-react.netlify.app |
jnm2377
left a comment
There was a problem hiding this comment.
Thanks for contributing this! It looks great! 🎉
Closes #
#9919
Changelog
Changed
I made a change based off a feature request I proposed and if the idea is worth taking into account, I thought I could take a gamble at it for my first carbon PR and get some experience with contributing to carbon
Basically, we found ourselves allowing file extensions that contain
-an_for our project. Even though we allow it in theacceptprop, the built in regex does not allow it. So I thought if we could give he user access to changing/modifying that regex directly to work with what they pass into theacceptprop it could help cases like ours. This best making changes to the regex like hard coding things for our need or every person's need that may or may not come a need.Testing / Reviewing
My attempt at testing was a few things.
Regression test was my main thing. I added the default regex as a default prop to keep default behavior and tested this in a local storybook copy (after modifying the story book) and added unit test.
Thoughts
This idea is something I believe can be useful but i understand if this idea gets thrown out. If it does or does not, if there is any advice for the code or unit test (coding design, style, framework, etc) please let me know so I can learn and do better next time, thanks!