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

Migrate components to React hooks and use new context API #1018

Merged
merged 22 commits into from
Nov 23, 2019

Conversation

jumpinjackie
Copy link
Owner

@jumpinjackie jumpinjackie commented Nov 21, 2019

Fixes #934, #1014 and #1015

…nt with useState() hooks cannot have its state inspected. The guidance around testing such components is to observe the side-effects of internal state change. In the case of the Accordion, we should be testing that the panel change handler is being invoked with the correct panel id.
…it as TypeScript 3.7 optional chaining renders this module obsolete.
…egend components, replace the our legacy React contexts with the new React context API.

Fixes #1014
…Panel unit tests (again, can't peek state of a hook-ed component, should instead verify the expected effects of the state change)
@jumpinjackie jumpinjackie added this to the 0.13 milestone Nov 21, 2019
@coveralls
Copy link

coveralls commented Nov 21, 2019

Coverage Status

Coverage decreased (-0.8%) to 57.117% when pulling c4e7416 on feature-hookification into 70fdfee on master.

…rray content differences which we can simply do ourselves by just looping through both arrays if they happen to both be the same size and testing for item differences at the same position.
…log. Also tidy up UI and plug another localization hole in the ShareLinkToView component.

Fixes #1012
…to hooks (these either use incompatible usage patterns of setState() or are going to be eventually replaced/rewritten anyways).
@jumpinjackie jumpinjackie merged commit 6cfa679 into master Nov 23, 2019
@jumpinjackie jumpinjackie deleted the feature-hookification branch November 23, 2019 13:59
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.

Hook-ification of stateful components
2 participants