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

[WIP] Update to new react context for the jss context #924

Merged
merged 22 commits into from
Dec 11, 2018

Conversation

HenriBeck
Copy link
Member

What would you like to add/fix?
Move from the old context to the new context.

We might need to consider to export the consumer and provider so that other libaries can integrate into it.

@HenriBeck HenriBeck changed the title Update to new react context for the jss context [WIP] Update to new react context for the jss context Nov 27, 2018
@HenriBeck
Copy link
Member Author

@kof

I checked again our options on the issue with the generateId from the jss instance.

In the case that we support it, we need to require the user to generate a new jss instance on every request when he wants to use a custom one.

We could also not support this and simply requiring if the user wants a custom generateId function, he will need to use the prop.

In my opinion, we should support it and require the user to create a new jss instance for every request. This is also a safer practice so that requests don't share anything.

Henri Beck added 3 commits December 3, 2018 21:11
@kof
Copy link
Member

kof commented Dec 7, 2018

Can you please list all changes from user perspective? We need a changelog.

packages/react-jss/src/types.js Outdated Show resolved Hide resolved
@HenriBeck HenriBeck changed the base branch from master to react-jss/update December 10, 2018 19:55
@HenriBeck HenriBeck requested a review from kof December 11, 2018 10:54
kof
kof previously approved these changes Dec 11, 2018
@kof kof self-requested a review December 11, 2018 12:28
@kof
Copy link
Member

kof commented Dec 11, 2018

We completely forgot the changelog and docs. Since docs are in refactoring, lets at least add to the changelog here, so we can't forget update the docs later

@HenriBeck HenriBeck merged commit e2f15ae into react-jss/update Dec 11, 2018
@HenriBeck HenriBeck deleted the react-jss/jss-context branch December 11, 2018 14:15
kof added a commit that referenced this pull request Jan 16, 2019
* [WIP] Update to new react context for the jss context (#924)

* Update to new react context for the jss context

* Fixed types

* Fix some tests

* Remove unnecessary cloning

* Fix JssProvider

* Update logic of merging context

* Fix a few issues and tests

* Make getTheme non public

* Update warning inside JssProvider

* Remove duplicate beforeEach

* Update size-snapshot

* Fix a few bugs

* Created a Managers type

* Create sheetOptions prop type definition

* Removed meta property from sheet options shape

* Fix creating a new generateId for every render

* Move media into it's own prop

* Added changelog

* Rename to JssContextSubscriber

* Moved context to jssContext prop instead of spreading it

* [react-jss] Remove inject option (#934)

* Update to new react context for the jss context

* Fixed types

* Fix some tests

* Remove unnecessary cloning

* Fix JssProvider

* Update logic of merging context

* Fix a few issues and tests

* Make getTheme non public

* Update warning inside JssProvider

* Remove duplicate beforeEach

* Update size-snapshot

* Fix a few bugs

* Remove inject option

* Fix

* Always inject the theme

* Only inject theme when injectTheme is true

* Upgrade theming package (#942)

* Add forwardRef support (#943)

* [react-jss] Merge classes instead of overwriting (#946)

* Add forwardRef support

* Add support for merging the classes

* Fix path of test file

* Remove jsdoc comment

* Implement custom memoize-one

* Convert function to arrow function

* Fix

* Update some of the tests

* Update dynamic styles tests

* Fix SSR tests

* Add theme inject tests

* Add merge classes tests

* Remove dependency of react-dom

* Fix an issue with memoizing and memoize the context

* Remove createHoC file and remove injectSheet to withStyles

* Update TS types

* Update TS types

* Fix flow types

* Fix react-jss types

* Rename injectSheet to withStyles in docs

* Fix react-jss types

* Update changelog.md

* Rename class and

* Fix tests

* Fix a few typos in docs

* Fix changelog

* Use javascript for codeblocks instead of js

* Upgrade theming

* Fix type import

* Update size-snapshot

* Fix docs

* Update size-snapshot

* Upgrade theming to v3.0.2

* Use travis_wait for test command

* Remove travis_wait command

* Update docs
bhupinderbola pushed a commit to bhupinderbola/jss that referenced this pull request Sep 17, 2019
* [WIP] Update to new react context for the jss context (cssinjs#924)

* Update to new react context for the jss context

* Fixed types

* Fix some tests

* Remove unnecessary cloning

* Fix JssProvider

* Update logic of merging context

* Fix a few issues and tests

* Make getTheme non public

* Update warning inside JssProvider

* Remove duplicate beforeEach

* Update size-snapshot

* Fix a few bugs

* Created a Managers type

* Create sheetOptions prop type definition

* Removed meta property from sheet options shape

* Fix creating a new generateId for every render

* Move media into it's own prop

* Added changelog

* Rename to JssContextSubscriber

* Moved context to jssContext prop instead of spreading it

* [react-jss] Remove inject option (cssinjs#934)

* Update to new react context for the jss context

* Fixed types

* Fix some tests

* Remove unnecessary cloning

* Fix JssProvider

* Update logic of merging context

* Fix a few issues and tests

* Make getTheme non public

* Update warning inside JssProvider

* Remove duplicate beforeEach

* Update size-snapshot

* Fix a few bugs

* Remove inject option

* Fix

* Always inject the theme

* Only inject theme when injectTheme is true

* Upgrade theming package (cssinjs#942)

* Add forwardRef support (cssinjs#943)

* [react-jss] Merge classes instead of overwriting (cssinjs#946)

* Add forwardRef support

* Add support for merging the classes

* Fix path of test file

* Remove jsdoc comment

* Implement custom memoize-one

* Convert function to arrow function

* Fix

* Update some of the tests

* Update dynamic styles tests

* Fix SSR tests

* Add theme inject tests

* Add merge classes tests

* Remove dependency of react-dom

* Fix an issue with memoizing and memoize the context

* Remove createHoC file and remove injectSheet to withStyles

* Update TS types

* Update TS types

* Fix flow types

* Fix react-jss types

* Rename injectSheet to withStyles in docs

* Fix react-jss types

* Update changelog.md

* Rename class and

* Fix tests

* Fix a few typos in docs

* Fix changelog

* Use javascript for codeblocks instead of js

* Upgrade theming

* Fix type import

* Update size-snapshot

* Fix docs

* Update size-snapshot

* Upgrade theming to v3.0.2

* Use travis_wait for test command

* Remove travis_wait command

* Update docs
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.

2 participants