Skip to content

Get rid from dynamicStyleSheet, fix nested dynamic rules#24

Merged
lttb merged 14 commits intomasterfrom
feature/nested
May 28, 2017
Merged

Get rid from dynamicStyleSheet, fix nested dynamic rules#24
lttb merged 14 commits intomasterfrom
feature/nested

Conversation

@lttb
Copy link
Copy Markdown
Member

@lttb lttb commented May 19, 2017

@lttb lttb requested a review from kof May 19, 2017 04:23
@lttb lttb added the bug label May 19, 2017
@lttb lttb force-pushed the feature/nested branch from d1c0d8e to bcf7475 Compare May 19, 2017 04:27
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-2.03%) to 90.678% when pulling bcf7475 on feature/nested into ac5cb91 on master.

@lttb lttb force-pushed the feature/nested branch from bcf7475 to 915a4e3 Compare May 19, 2017 04:59
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+4.8%) to 97.479% when pulling 915a4e3 on feature/nested into ac5cb91 on master.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+5.6%) to 98.319% when pulling bb9b0c7 on feature/nested into ac5cb91 on master.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+6.5%) to 99.242% when pulling c223c46 on feature/nested into ac5cb91 on master.

@lttb lttb force-pushed the feature/nested branch 2 times, most recently from 0da963a to ed2edc8 Compare May 26, 2017 15:12
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+6.5%) to 99.231% when pulling ed2edc8 on feature/nested into ac5cb91 on master.

@lttb lttb force-pushed the feature/nested branch from ed2edc8 to b4228fb Compare May 26, 2017 15:33
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+6.5%) to 99.231% when pulling b4228fb on feature/nested into ac5cb91 on master.

Comment thread src/createStyled.js Outdated
sheet = jss.createStyleSheet(baseStyles, {
link: true,
meta: 'DynamicComponentSheet',
meta: 'sheet',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this isn't saying a lot, maybe at least use : 'styled-jss'

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

+1

Comment thread src/tests/functional.spec.jsx Outdated

// $FlowIgnore
generateTagName.mockImplementation((tagName: string) => `${tagName}-${++styledCounter}`)
generateClassName.mockImplementation(rule => `${rule.name}-${++jssCounter}`)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why do you mock it? Maybe you want to remove dynamic part in it so that tests don't break that often

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

counter is important for styled-jss, because it shows an ordering of mounting, but for jss it may be static really

Comment thread src/tests/functional.spec.jsx Outdated
const wrapper = mount(<App />)
const sheet = styled.mountSheet()

expect(sheet.toString()).toBe(stripIndent`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why not to use .toMatchSnapshot() everywhere?

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+6.5%) to 99.231% when pulling b8dde00 on feature/nested into ac5cb91 on master.

@lttb lttb merged commit 07e4d16 into master May 28, 2017
@lttb lttb deleted the feature/nested branch May 31, 2017 13:41
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.

Function don't work with nested rules

3 participants