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

Overlay #386

Merged
merged 7 commits into from
Jul 11, 2017
Merged

Overlay #386

merged 7 commits into from
Jul 11, 2017

Conversation

steve-holland
Copy link
Contributor

What kind of change is this? (Bug Fix, Feature...)
Feature.

What is the current behavior (You can also link to an issue)
Solves #349

What is the new behavior this introduces (if any)
Adds Grid Overlay to lost-utility.

Does this introduce any breaking changes?
No, it's new functionality.

Does the PR fulfill these requirements?

  • [✔️ ] Tests for the changes have been added
  • [✔️ ] Docs have been added or updated

Other Comments
I wasn't sure how to approach error handling for this, so I took a look at the discussion in #180 and it seemed that throwing node.error was the way forward, so that's what I've done. I've added a helper function to test throwing of errors, again based on what was in #180. If I've gone about it in totally the wrong way, then that's ok, just let me know how you want it to happen going forward and I can update the code.

One other thing I wasn't sure of is your thoughts on comments within the code. It was a bit tricky keeping track of whats going on in this, so I broke it down into steps and put a comment. If you'd rather they weren't in there, again just let me know and I'll remove them.

@codecov
Copy link

codecov bot commented Jul 7, 2017

Codecov Report

Merging #386 into develop will increase coverage by 1.44%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #386      +/-   ##
===========================================
+ Coverage    90.21%   91.66%   +1.44%     
===========================================
  Files           16       16              
  Lines          644      672      +28     
===========================================
+ Hits           581      616      +35     
+ Misses          63       56       -7
Impacted Files Coverage Δ
lib/lost-utility.js 97.87% <100%> (+3.13%) ⬆️
lib/lost-column.js 90.21% <0%> (+3.26%) ⬆️
lib/lost-row.js 100% <0%> (+8%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0cf2579...114f36a. Read the comment docs.

color = utilityArray[4] || '#e6f6ff';

if(!unitsMatch(maxWidth, gutter)) {
throw decl.error('lost-utility: Please use the same units for width and gutter.', { plugin: 'lost', word: 'lost-utility' });
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not for here, but we should make this a method we can more easily access anywhere–that way we can ensure consistency.

Copy link
Owner

@peterramsing peterramsing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for this work! This is awesome!

Golly, I hope I don't sound like that nit-picking type, but a new line at the end of that new file would be my only nit here. I will add that to the CONTRIBUTING.md file. 👍

expect(function(){
return processor.process(input).css;
}).to.throw(CssSyntaxError, message);
};
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codebysubtract Are you using the .editorconfig file? It should add new lines to the end of this file. This should absolutely be automated/linted if we're gonna "enforce" it–but it hopefully would help with having whitespace diffs.

I think this would be my only "nit-pick" in this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpicking absolutely fine 👍 I generally use PHPStorm as my IDE which does put in the newline at the end of files, but I'm just trying out VSCode for javascript work and unfortunately doesn't use .editorconfig out of the box (as I've just found out), so completely missed this!

I've updated the file in question now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@peterramsing not sure why but one of the travis builds failed to start for some reason. I wasn't sure how you restarted it and it doesn't appear to retry on its own. Any ideas?

@peterramsing
Copy link
Owner

Hehe. Great minds think alike on the eslint config. 😄

@peterramsing
Copy link
Owner

Restarting the tests (for some reason one failed to start). Then it should be good to merge.

@peterramsing peterramsing merged commit c63edbf into peterramsing:develop Jul 11, 2017
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