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

Add is-empty modifier to file upload #1383

Merged
merged 3 commits into from
Nov 6, 2017
Merged

Add is-empty modifier to file upload #1383

merged 3 commits into from
Nov 6, 2017

Conversation

timacdonald
Copy link
Contributor

@timacdonald timacdonald commented Oct 29, 2017

This is a new feature.

Proposed solution

Currently the file upload looks like this when there is no filename yet provided. The thing this addresses is the empty white box where the name would go once populated.

screen shot 2017-10-29 at 11 51 51 pm

This allows devs to add the is-empty (not sure if there is an already established name that would be better for this - and if not I'm sure there is a better name - so feedback welcomed) modifier to the .file to remove the name box, thus the input will look like this:

screen shot 2017-10-29 at 11 53 28 pm

Then when the user has selected a file you simply remove the is-empty class and it will appear as expected...

screen shot 2017-10-29 at 11 54 17 pm

This also works similar with the is-boxed modifier.

Tradeoffs

Not really any use without JS, but then again, you can't change the name with JS anyway so 👍

Testing Done

Currently running this in production, works great. Also, check out the code pen I did to show it working.

@jgthms jgthms merged commit c2fae71 into jgthms:master Nov 6, 2017
jgthms pushed a commit that referenced this pull request Nov 6, 2017
* add classes

* add to changelog
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.

2 participants