Skip to content
This repository has been archived by the owner on Mar 18, 2019. It is now read-only.

Add postcss-message to show postcss 4.1 message output ? #88

Closed
MoOx opened this issue Apr 3, 2015 · 24 comments
Closed

Add postcss-message to show postcss 4.1 message output ? #88

MoOx opened this issue Apr 3, 2015 · 24 comments

Comments

@MoOx
Copy link
Owner

MoOx commented Apr 3, 2015

Related to #64

What do you think about that as an option?

https://github.com/postcss/postcss-messages

@magsout
Copy link
Sponsor Contributor

magsout commented Apr 3, 2015

👍

@MoOx
Copy link
Owner Author

MoOx commented Apr 3, 2015

I will go for a custom skin by default with the logo/color of cssnext. Do you think it's a good idea ?

@magsout
Copy link
Sponsor Contributor

magsout commented Apr 4, 2015

I think yes. We will see that the error is raised by cssnext

@MoOx
Copy link
Owner Author

MoOx commented Apr 8, 2015

@MoOx MoOx modified the milestone: v2.0.0 Apr 14, 2015
@MoOx MoOx closed this as completed in 3c70d5b Jun 5, 2015
@MoOx
Copy link
Owner Author

MoOx commented Jun 6, 2015

How does it look ?

screen shot 2015-06-06 at 08 21 03

@magsout
Copy link
Sponsor Contributor

magsout commented Jun 6, 2015

Woooot awesome.

@awayken
Copy link

awayken commented Jun 6, 2015

Is cssnext actually parsing your error and suggesting an accurate fix for it? That's pretty cool.

Related to the error formatting: is it possible to use whitespace to better indicate the problem line and the corrected line?

Something like:

> cssnext:custom-selectors:missing-colon-fix: <css input>:1:30: Incorrect syntax for @custom-selector.

@custom-selector --h h1, h2;

Should be:

@custom-selector :--h h1, h2;

I also see the "Please adjust this..." sentence as maybe being unnecessary.

Anyway, those are just my 2¢ as a relative outsider who apparently has an opinion on this.

@MoOx
Copy link
Owner Author

MoOx commented Jun 6, 2015

My question was more for the design that the content itself.

That said, i will probably adjust messages with some newlines, that's a good idea.

For the record some plugin currently use console.log to talk to users (eg. postcss-custom-properties might warns you if you try to use an undefined var). Since it's not really users friendly (especially when you are using postcss in a verbose env like webpack) you might miss those log. That's why I asked this API for postcss.

This way we will be able to properly emit warnings in the appropriate way depending in the env (webpack, gulp, cli...) + in the css itself using the famous hack ::before/content.

@awayken
Copy link

awayken commented Jun 6, 2015

That said, I really like the design. I know the blue complements the logo, but it has the side effect of being calming even in the midst of the potential frustrations of learning these new specs. Bonus!

@MoOx
Copy link
Owner Author

MoOx commented Jun 6, 2015

I think I will replace the logo by another icon: { ! }

@MoOx
Copy link
Owner Author

MoOx commented Jun 6, 2015

Is this any better ?

screen shot 2015-06-06 at 23 42 52

@MoOx
Copy link
Owner Author

MoOx commented Jun 6, 2015

Or with more space ?

screen shot 2015-06-06 at 23 46 44

@awayken
Copy link

awayken commented Jun 7, 2015

I like them both. What's nice about the additional space is that it makes it easier to pick out individual issues if you miss the > cssnext:.

@MoOx
Copy link
Owner Author

MoOx commented Jun 7, 2015

Or with the icon in the top left corner

screen shot 2015-06-07 at 14 37 33

@awayken
Copy link

awayken commented Jun 7, 2015

I like that better.

@MoOx
Copy link
Owner Author

MoOx commented Jun 8, 2015

I will go for a simpler icon

Which one ?

screen shot 2015-06-08 at 09 16 16
screen shot 2015-06-08 at 09 16 24
screen shot 2015-06-08 at 09 16 29

@madx
Copy link
Contributor

madx commented Jun 8, 2015

I vote for the second one: being filled makes it more visible, and it keeps the shape of the {!} logo

@bloodyowl
Copy link
Contributor

first one IMO

@madx
Copy link
Contributor

madx commented Jun 8, 2015

The downside being that it looks like and information instead of a warning/error :/

@MoOx
Copy link
Owner Author

MoOx commented Jun 8, 2015

Note that we might have here info/debug message in the future.

@kud
Copy link

kud commented Jun 8, 2015

I prefer the third one, but the second one is quite ok and mostly efficient. So the 2nd one. The first one is "an error", not a notice.

@awayken
Copy link

awayken commented Jun 8, 2015

I like the third one best. Second favorite is the second one.

@awayken
Copy link

awayken commented Jun 17, 2015

Updated the project I'm using cssnext on to see how this works in practice, and I love this feature so much.

@MoOx
Copy link
Owner Author

MoOx commented Jun 17, 2015

Glad you enjoy it.

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

No branches or pull requests

6 participants