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

[CustomInputs]: handle the hook being re-rendered #15744

Merged
merged 2 commits into from
Feb 8, 2023

Conversation

joshuaellis
Copy link
Member

What does it do?

  • ignore if we're loading in the effect and instead depend on newUids existing to trigger it.

Why is it needed?

  • when the hook rerenders with new arguments, the effect was not triggered

How to test it?

  • i've specifically added a new test to highlight it works

Related issue(s)/PR(s)

@joshuaellis joshuaellis added source: core:content-manager Source is core/content-manager package pr: fix This PR is fixing a bug labels Feb 8, 2023
@joshuaellis joshuaellis added this to the 4.6.1 milestone Feb 8, 2023
@codecov
Copy link

codecov bot commented Feb 8, 2023

Codecov Report

Base: 47.60% // Head: 59.26% // Increases project coverage by +11.65% 🎉

Coverage data is based on head (1f99ddf) compared to base (7ab5789).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##             main   #15744       +/-   ##
===========================================
+ Coverage   47.60%   59.26%   +11.65%     
===========================================
  Files         448     1547     +1099     
  Lines       15785    39096    +23311     
  Branches     3388     7506     +4118     
===========================================
+ Hits         7514    23169    +15655     
- Misses       6864    13634     +6770     
- Partials     1407     2293      +886     
Flag Coverage Δ
back 47.33% <ø> (-0.06%) ⬇️
front 67.21% <100.00%> (?)
unit_back 47.33% <ø> (-0.06%) ⬇️
unit_front 67.21% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...c/content-manager/hooks/useLazyComponents/index.js 100.00% <100.00%> (ø)
packages/core/admin/ee/server/register.js 100.00% <0.00%> (ø)
.../ee/admin/pages/AuthPage/components/Login/index.js 75.00% <0.00%> (ø)
packages/core/admin/admin/src/utils/tests/data.js 100.00% <0.00%> (ø)
...pload/admin/src/components/BulkMoveDialog/index.js 100.00% <0.00%> (ø)
.../content-manager/pages/ListSettingsView/reducer.js 100.00% <0.00%> (ø)
...dmin/src/hooks/useReleaseNotification/utils/api.js 0.00% <0.00%> (ø)
...ermissions/utils/formatSettingsPermissionsToAPI.js 100.00% <0.00%> (ø)
...tionInfosPage/components/LogoModalStepper/index.js 96.42% <0.00%> (ø)
.../admin/src/components/UnauthenticatedLogo/index.js 100.00% <0.00%> (ø)
... and 1091 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

markkaylor
markkaylor previously approved these changes Feb 8, 2023
Copy link
Contributor

@markkaylor markkaylor left a comment

Choose a reason for hiding this comment

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

Looks good to me, I think you just have a small typo in the test.

Thanks for moving this forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: fix This PR is fixing a bug source: core:content-manager Source is core/content-manager package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

custom fields broken in v4.5.4
2 participants