-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix(file-uploader): change button from sm to default primary #2048
fix(file-uploader): change button from sm to default primary #2048
Conversation
# Conflicts: # src/components/inline-loading/inline-loading.hbs
Deploy preview for the-carbon-components ready! Built with commit 1bdf59f https://deploy-preview-2048--the-carbon-components.netlify.com |
Deploy preview for the-carbon-components ready! Built with commit 919aebe https://deploy-preview-2048--the-carbon-components.netlify.com |
@@ -11,7 +11,7 @@ | |||
<p class="{{@root.prefix}}--label-description">only .jpg and .png files. 500kb max file size.</p> | |||
<div class="{{@root.prefix}}--file" data-file> | |||
<label for="your-file-importer-id-here" | |||
class="{{@root.prefix}}--file-btn {{@root.prefix}}--btn {{@root.prefix}}--btn--primary {{@root.prefix}}--btn--sm" |
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.
Seems that this portion of the markup affects v9
as well - Can we rope it off?
@@ -11,7 +11,7 @@ | |||
<p class="{{@root.prefix}}--label-description">only .jpg and .png files. 500kb max file size.</p> | |||
<div class="{{@root.prefix}}--file" data-file> | |||
<label for="your-file-importer-id-here" | |||
class="{{@root.prefix}}--file-btn {{@root.prefix}}--btn {{@root.prefix}}--btn--primary" | |||
class="{{@root.prefix}}--file-btn {{@root.prefix}}--btn {{@root.prefix}}--btn--primary {{#if componentsX}}{{else}}{{@root.prefix}}--btn--sm{{/if}}" |
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.
@asudoh This feels a little sketchy -- let me know if there's a smarter way to do this. 👍
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.
you may want to use unless
here instead
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.
Ah, exactly! Thanks 💪
Removes unneeded white space Co-Authored-By: dakahn <40970507+dakahn@users.noreply.github.com>
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.
LGTM 👍 - Thanks @dakahn for all the updates!
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.
For some reason now I can see the background of the uploaded files by using the netlify link!
Changes:
-
The uploaded file box should be 40px/2.5rem not 32px.
-
There needs to be an icon-01 (#171717) 16px close icon in the uploaded file so a user can delete it. Needs to be 16px from the right hand side and have 16px padding from the left hand side.
-
We do not need the success checkmark icon in the uploaded file.
-
For the error state, the input text needs to be disabled-02 (#bebebe). Make sure the error message text is calling caption-01 (support-01, #da1e28).
The warning icon is pulling in the old icon, but this seems to be a global issue for components.The icon is correct disregard this. -
Capitalize O in 'Only'.
@laurenmrice Thank you for your visual review (as always)! May I ask what you think the absolute no-go items for this PR are? |
@asudoh absolute no-go for this PR would be that we need to have a close button on each uploaded file. |
@laurenmrice It looks like the close X icon as well as the confirmation and error handling states and their icons are something we provide to consumers of this component -- but do not handle the functionality of on our end. So that first example is -- "hey, here's what we give you out of the box" and the example of the various states below it (success, failure, even X to remove uploaded file) is an example of some of the things they can do with our component. @asudoh Looked at file-uploader.js with @joshblack and it looks like |
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.
Ok thanks DA for explanation about close, success and loading icon examples! 👍
Changes for the examples:
-
So we can show a success example but we need to pull in the 16/checkmark and it should be color token interactive-01 (#0062ff) https://carbon-elements.netlify.com/icons/examples/preview/#16%2Fcheckmark
-
Also make sure the loading spinner is pulling in the one that is being used on the inline loading page.
-
The close icon, checkmark icon and loader need to be 16px away from the right.
Thank you for asking @dakahn - Yes, public API, and the close button shows up upon |
Let's track the remainder in #2088 - Thanks @laurenmrice for working with on triaging each items! |
🎉 This PR is included in version 9.84.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
partly Closes #2043
Removes the
sm
attribute on the uploader button so it meets the spec height of 48px.Could the reviewers double check that the background color on uploaded files is properly
field-01
?