Skip to content

fix link to work with global rule #666

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

Closed

Conversation

sambhav-gore
Copy link

@sambhav-gore sambhav-gore commented Jan 19, 2018

Related to #664

As I was also trying to get it work I fixed this.
This works for me and all tests pass, but please check if this causes any side effects.

May be this should be moved to the jss-global plugin ? ( I am not sure about it), I had to use the 'any' type as the actual type of the rule is 'GlobalContainerRule' which is part of jss-global. Let me know if I should improve this PR or you can adapt it.

@@ -155,7 +155,9 @@ export default class RuleList {
const cssRule = cssRules[i]
let key = this.options.sheet.renderer.getKey(cssRule)
if (map[key]) key = map[key]
const rule = this.map[key]

const mappedGlobal: any = this.map['@global']
Copy link
Member

Choose a reason for hiding this comment

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

core doesn't know anything about plugins, it needs to be solved locally by a plugin, if plugin is missing what it needs, core should provide a generic solution so that plugin can fix it

Copy link
Author

Choose a reason for hiding this comment

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

@kof Thats what I was thinking that this should be moved to the plugin itself. On this weekend if I get some time I will try to move it there. as of right now I am not sure how the plugin should handle this.

Copy link
Member

Choose a reason for hiding this comment

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

hey @sambhav-gore I see you got distracted, any chance you can finish this one?

@aslafy-z
Copy link

@sambhav-gore any news on this ?

@HenriBeck
Copy link
Member

Are there any updates on this? @sambhav-gore

@aslafy-z
Copy link

@kof is this still relevant? We need this to work for a long time now, should we switch to an alternative?

@kof
Copy link
Member

kof commented Oct 22, 2018 via email

@HenriBeck
Copy link
Member

@kof let's maybe close this pr and add a test for it maybe?

@kof
Copy link
Member

kof commented Oct 24, 2018

Lets add the tests first to see if the problem still exists.

@HenriBeck
Copy link
Member

@kof
Copy link
Member

kof commented Oct 25, 2018

seems like that, yes, @sambhav-gore wanna try the new version directly from master and see if your use case is fixed, since you didn't provide a test, we can't be 100% sure, but it seems like we have this covered and it works.

@HenriBeck
Copy link
Member

Closing as this seems to be fixed now.

@HenriBeck HenriBeck closed this Jan 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants