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

fix(file-uploader): change button from sm to default primary #2048

Merged
merged 19 commits into from
Mar 13, 2019
Merged

fix(file-uploader): change button from sm to default primary #2048

merged 19 commits into from
Mar 13, 2019

Conversation

dakahn
Copy link
Contributor

@dakahn dakahn commented Mar 11, 2019

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?

@dakahn dakahn changed the title Dak/file uploader audit fixes fix(file-uploader): change button from sm to default primary Mar 11, 2019
@netlify
Copy link

netlify bot commented Mar 11, 2019

Deploy preview for the-carbon-components ready!

Built with commit 1bdf59f

https://deploy-preview-2048--the-carbon-components.netlify.com

@netlify
Copy link

netlify bot commented Mar 11, 2019

Deploy preview for the-carbon-components ready!

Built with commit 919aebe

https://deploy-preview-2048--the-carbon-components.netlify.com

@dakahn dakahn mentioned this pull request Mar 11, 2019
@@ -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"
Copy link
Contributor

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}}"
Copy link
Contributor Author

@dakahn dakahn Mar 11, 2019

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. 👍

Copy link
Member

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

Copy link
Contributor Author

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 <[email protected]>
Copy link
Contributor

@asudoh asudoh left a 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!

Copy link
Member

@laurenmrice laurenmrice left a 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.
    Screen Shot 2019-03-12 at 10 02 47 AM

  • 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'.

@asudoh asudoh added this to the v10.0-rc1 milestone Mar 13, 2019
@asudoh
Copy link
Contributor

asudoh commented Mar 13, 2019

@laurenmrice Thank you for your visual review (as always)! May I ask what you think the absolute no-go items for this PR are?

@laurenmrice
Copy link
Member

@asudoh absolute no-go for this PR would be that we need to have a close button on each uploaded file.

@dakahn
Copy link
Contributor Author

dakahn commented Mar 13, 2019

@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 setState is a public API -- does this sound right?

Copy link
Member

@laurenmrice laurenmrice left a 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.
    File uploader - Specs - White theme Copy 2

@asudoh
Copy link
Contributor

asudoh commented Mar 13, 2019

Looked at file-uploader.js with @joshblack and it looks like setState is a public API -- does this sound right?

Thank you for asking @dakahn - Yes, public API, and the close button shows up upon setState() call IIRC.

@asudoh
Copy link
Contributor

asudoh commented Mar 13, 2019

Let's track the remainder in #2088 - Thanks @laurenmrice for working with on triaging each items!

@asudoh asudoh merged commit 011e22b into carbon-design-system:master Mar 13, 2019
@carbon-bot
Copy link
Contributor

🎉 This PR is included in version 9.84.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants