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

stylelint-arrows #38

Merged
merged 4 commits into from May 19, 2017

Conversation

4 participants
@binjospookie
Contributor

binjospookie commented May 12, 2017

According to http://cultofmartians.com/tasks/stylelint-arrows.html

This realisation care about the order of the rules

@ai

This comment has been minimized.

Show comment
Hide comment
@ai

ai commented May 12, 2017

@binjospookie

This comment has been minimized.

Show comment
Hide comment
@binjospookie

binjospookie May 12, 2017

Contributor

I'm resolving this conflict right now

Contributor

binjospookie commented May 12, 2017

I'm resolving this conflict right now

@ai

This comment has been minimized.

Show comment
Hide comment
@ai

ai commented May 15, 2017

@davidtheclark

This comment has been minimized.

Show comment
Hide comment
@davidtheclark

davidtheclark May 15, 2017

Contributor

I'm fine with this. I have not played a very active role in the design of the site, though, so I defer to others.

Contributor

davidtheclark commented May 15, 2017

I'm fine with this. I have not played a very active role in the design of the site, though, so I defer to others.

@ai

This comment has been minimized.

Show comment
Hide comment
@ai

ai May 15, 2017

@davidtheclark nice :) what we need to do to merge it?

ai commented May 15, 2017

@davidtheclark nice :) what we need to do to merge it?

@jeddy3

This comment has been minimized.

Show comment
Hide comment
@jeddy3

jeddy3 May 15, 2017

Member

@binjospookie Thank you for your contribution.

Having seen the implementation I'm concerned about the maintenance burden this nice-to-have feature adds. Normally, I'd be in favour of adding such a feature (especially when somebody has already put the work into it!), but we've been down this path before. In #14 we added lifecycle complexity to the components. We undid this in #28 because we were struggling to keep the website dependencies up to date. We moved to using only the presentional components derived from phenomic's default theme.

This PR also introduces a list we need to keep up to date with the docs. We added a similar burden here, but that felt justified as using colours to distinguish between invalid and valid patterns made a significant improvement to the usability of the docs.

Is there another approach we could use here? One that doesn't add life cycle complexities nor a list that we need to keep up to date?

Perhaps adding a next and previous link to the bottom of each rule page by using a specific layout for them, one that composes the Page layout. This might solve the former. It also means the heavy-lifting happens in scripts/copy-stylelint-docs, the clunky area where we prepare the docs for phenomic. We could also parse the markdown content of the user-guide/rules.md to determine the order of this collection. This might solve the latter.

Member

jeddy3 commented May 15, 2017

@binjospookie Thank you for your contribution.

Having seen the implementation I'm concerned about the maintenance burden this nice-to-have feature adds. Normally, I'd be in favour of adding such a feature (especially when somebody has already put the work into it!), but we've been down this path before. In #14 we added lifecycle complexity to the components. We undid this in #28 because we were struggling to keep the website dependencies up to date. We moved to using only the presentional components derived from phenomic's default theme.

This PR also introduces a list we need to keep up to date with the docs. We added a similar burden here, but that felt justified as using colours to distinguish between invalid and valid patterns made a significant improvement to the usability of the docs.

Is there another approach we could use here? One that doesn't add life cycle complexities nor a list that we need to keep up to date?

Perhaps adding a next and previous link to the bottom of each rule page by using a specific layout for them, one that composes the Page layout. This might solve the former. It also means the heavy-lifting happens in scripts/copy-stylelint-docs, the clunky area where we prepare the docs for phenomic. We could also parse the markdown content of the user-guide/rules.md to determine the order of this collection. This might solve the latter.

@binjospookie

This comment has been minimized.

Show comment
Hide comment
@binjospookie

binjospookie May 15, 2017

Contributor

@jeddy3 Thank for your code-review.

I'll try to improve it. Parsing user-guide/rules.md firstly and then adding links to each rule page.

Contributor

binjospookie commented May 15, 2017

@jeddy3 Thank for your code-review.

I'll try to improve it. Parsing user-guide/rules.md firstly and then adding links to each rule page.

@jeddy3

This comment has been minimized.

Show comment
Hide comment
@jeddy3

jeddy3 May 15, 2017

Member

I'll try to improve it. Parsing user-guide/rules.md firstly and then adding links to each rule page.

Good stuff. I think it'll be possible to add these links using just phenomic's layouts and a bit of work in scripts/copy-stylelint-docs.js. This means we can continue using only presentational components, as was introduced in #28.

Try adding the YAML frontmatter for the rule pages in scripts/copy-stylelint-docs#L8-L12:

---
layout: RulePage
---

And going from there.

Member

jeddy3 commented May 15, 2017

I'll try to improve it. Parsing user-guide/rules.md firstly and then adding links to each rule page.

Good stuff. I think it'll be possible to add these links using just phenomic's layouts and a bit of work in scripts/copy-stylelint-docs.js. This means we can continue using only presentational components, as was introduced in #28.

Try adding the YAML frontmatter for the rule pages in scripts/copy-stylelint-docs#L8-L12:

---
layout: RulePage
---

And going from there.

@binjospookie

This comment has been minimized.

Show comment
Hide comment
@binjospookie

binjospookie May 16, 2017

Contributor

@jeddy3 and what about keyPress (prev/next rules)? Where should I describe these listeners?

Contributor

binjospookie commented May 16, 2017

@jeddy3 and what about keyPress (prev/next rules)? Where should I describe these listeners?

@jeddy3

This comment has been minimized.

Show comment
Hide comment
@jeddy3

jeddy3 May 16, 2017

Member

@jeddy3 and what about keyPress (prev/next rules)?

I don't think adding keyPress support brings enough benefit to warrant the added maintenance burden. It's an enhancement that will only benefit some users i.e. those with hard keyboards. The links, in contrast, will work on all devices and will benefit all users. I think the links get us 90% of the way there (being able to move sideways through the rules) with little cost. Adding keyPress support is like the last 10%, but comes at a cost.

Member

jeddy3 commented May 16, 2017

@jeddy3 and what about keyPress (prev/next rules)?

I don't think adding keyPress support brings enough benefit to warrant the added maintenance burden. It's an enhancement that will only benefit some users i.e. those with hard keyboards. The links, in contrast, will work on all devices and will benefit all users. I think the links get us 90% of the way there (being able to move sideways through the rules) with little cost. Adding keyPress support is like the last 10%, but comes at a cost.

@binjospookie

This comment has been minimized.

Show comment
Hide comment
@binjospookie

binjospookie May 16, 2017

Contributor

WIP

It remains only to care about the order.

Contributor

binjospookie commented May 16, 2017

WIP

It remains only to care about the order.

@@ -0,0 +1,103 @@
import React, { PropTypes } from "react"

This comment has been minimized.

@jeddy3

jeddy3 May 16, 2017

Member

I think RulePage should compose Page. See example

@jeddy3

jeddy3 May 16, 2017

Member

I think RulePage should compose Page. See example

@jeddy3

I think you're on the right track! I've made some suggestions.

Show outdated Hide outdated src/layouts/RulePage/index.css
@binjospookie

This comment has been minimized.

Show comment
Hide comment
@binjospookie

binjospookie May 17, 2017

Contributor

@jeddy3 Maybe something like that?

upd: done :)

Contributor

binjospookie commented May 17, 2017

@jeddy3 Maybe something like that?

upd: done :)

@binjospookie

This comment has been minimized.

Show comment
Hide comment
@binjospookie

binjospookie May 19, 2017

Contributor

@jeddy3 ping

Contributor

binjospookie commented May 19, 2017

@jeddy3 ping

@jeddy3

This comment has been minimized.

Show comment
Hide comment
@jeddy3

jeddy3 May 19, 2017

Member

@jeddy3 Maybe something like that?

Thanks! These changes minimise the changes to the default theme, so LGTM.

Member

jeddy3 commented May 19, 2017

@jeddy3 Maybe something like that?

Thanks! These changes minimise the changes to the default theme, so LGTM.

@jeddy3 jeddy3 merged commit a362137 into stylelint:master May 19, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@hudochenkov hudochenkov referenced this pull request Dec 28, 2017

Merged

Remove leftover file #46

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