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

Refactor ContentSearch to use react query #326

Merged
merged 15 commits into from
Jun 11, 2024

Conversation

fabiankaegy
Copy link
Member

@fabiankaegy fabiankaegy commented Jun 6, 2024

Description of the Change

This PR replaces the custom useEffect based data fetching with custom pagination & abort controller with react-query

Closes #

How to test the Change

Changelog Entry

Changed - Refactor ContentSearch component to use react-query instead of a custom data fetching logic based on useEffect

Credits

Props @fabiankaegy @johnwatkins0

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

Copy link

github-actions bot commented Jun 6, 2024

Size Change: -642 B (-0.99%)

Total Size: 64.5 kB

Filename Size Change
dist/index.js 64.5 kB -642 B (-0.99%)

compressed-size-action

Copy link

cypress bot commented Jun 6, 2024

1 failed test on run #869 ↗︎

1 5 0 0 Flakiness 0

Details:

Merge branch 'develop' into fix/refactor-content-search-to-react-query
Project: 10up Block Components Commit: fe400485f1
Status: Failed Duration: 01:20 💡
Started: Jun 11, 2024 6:56 AM Ended: Jun 11, 2024 6:57 AM
Failed  cypress/e2e/IconPicker.spec.js • 1 failed test

View Output

Test Artifacts
IconPicker > allows the user to use the post picker to change an icon and displays it Test Replay Screenshots

Review all test suite changes for PR #326 ↗︎

Copy link

github-actions bot commented Jun 6, 2024

🎉 A new testing version of this package has been published to NPM. You can install it with npm install @10up/block-components@testing-326

@fabiankaegy
Copy link
Member Author

This work here includes improvements suggested in #221

components/content-search/index.tsx Outdated Show resolved Hide resolved
components/content-search/index.tsx Outdated Show resolved Hide resolved
# Conflicts:
#	components/content-search/SearchItem.tsx
#	components/content-search/index.tsx
#	package-lock.json
#	package.json
@fabiankaegy fabiankaegy merged commit a1f134f into develop Jun 11, 2024
4 of 8 checks passed
@fabiankaegy fabiankaegy deleted the fix/refactor-content-search-to-react-query branch June 11, 2024 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants