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

Use new context api #1637

Merged
merged 9 commits into from
Sep 27, 2019
Merged

Use new context api #1637

merged 9 commits into from
Sep 27, 2019

Conversation

bjoernricks
Copy link
Contributor

@bjoernricks bjoernricks commented Sep 19, 2019

Checklist:

@codecov
Copy link

codecov bot commented Sep 27, 2019

Codecov Report

Merging #1637 into gsa-8.0 will decrease coverage by 0.04%.
The diff coverage is 88%.

Impacted file tree graph

@@            Coverage Diff             @@
##           gsa-8.0   #1637      +/-   ##
==========================================
- Coverage    37.64%   37.6%   -0.05%     
==========================================
  Files          966     966              
  Lines        22140   22125      -15     
  Branches      6235    6211      -24     
==========================================
- Hits          8335    8320      -15     
+ Misses       12481   12480       -1     
- Partials      1324    1325       +1
Impacted Files Coverage Δ
gsa/src/web/pages/page.js 13.63% <ø> (ø) ⬆️
gsa/src/web/app.js 0% <ø> (ø) ⬆️
gsa/src/web/pages/permissions/multipledialog.js 13.51% <ø> (-2.28%) ⬇️
...rc/web/components/provider/capabilitiesprovider.js 100% <100%> (ø) ⬆️
gsa/src/web/components/provider/gmpprovider.js 100% <100%> (ø) ⬆️
gsa/src/web/components/icon/withIconSize.js 80% <100%> (+2.72%) ⬆️
gsa/src/web/utils/withCapabilities.js 100% <100%> (ø) ⬆️
...sa/src/web/components/provider/iconsizeprovider.js 100% <100%> (+11.11%) ⬆️
gsa/src/web/utils/withGmp.js 100% <100%> (ø)
gsa/src/web/utils/withSubscription.js 60% <33.33%> (-20%) ⬇️
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ac99fa4...50897aa. Read the comment docs.

@bjoernricks bjoernricks marked this pull request as ready for review September 27, 2019 07:24
Use the new context api defined at https://reactjs.org/docs/context.html
for getting the gmp object.
To be able to use the new context API at the end both HOCs need to be
converted to not use withContext anymore.
The hoc is obsolete now.
This will allow to use capabilities in hooks.
Update SubscriptionProvider and withSubscription to use new context API.
The dialog already uses the withCapabilities HOC and receives the
capabilities via props instead of context. Therefore this definition was
obsolete already.
@bjoernricks bjoernricks requested a review from a team September 27, 2019 07:30
@swaterkamp swaterkamp merged commit 78cde32 into greenbone:gsa-8.0 Sep 27, 2019
@bjoernricks bjoernricks deleted the use-new-context-api branch September 30, 2019 06:21
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