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

DEVREL-977 - Flatten circular data, fix product filtering #57

Merged
merged 6 commits into from
Nov 13, 2023
Merged

Conversation

pokornyd
Copy link
Member

@pokornyd pokornyd commented Nov 6, 2023

Motivation

DEVREL-977

Adds helper methods to flatten/restore items with potential circular references to pass through getStaticProps. Fixes a bug where product filtering wasn't applied at all.

Checklist

  • Code follows coding conventions held in this repo
  • Automated tests have been added
  • Tests are passing
  • Docs have been updated (if applicable)
  • Temporary settings (e.g. variables used during development and testing) have been reverted to defaults

How to test

Introduce a circular reference in Kontent.ai project (e.g. via content item link in any given Fact item), run the app and visit any page that requests said item, confirm it works as expected.

@pokornyd pokornyd requested a review from a team as a code owner November 6, 2023 00:21
Copy link

netlify bot commented Nov 6, 2023

Deploy Preview for new-sample-app ready!

Name Link
🔨 Latest commit 359ddd0
🔍 Latest deploy log https://app.netlify.com/sites/new-sample-app/deploys/65526cdc9b3f10000838b43a
😎 Deploy Preview https://deploy-preview-57--new-sample-app.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

vercel bot commented Nov 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ficto-healthtech ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 13, 2023 6:41pm
ficto-healthtech-qa ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 13, 2023 6:41pm
ficto-imaging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 13, 2023 6:41pm
ficto-imaging-qa ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 13, 2023 6:41pm
ficto-surgical ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 13, 2023 6:41pm
ficto-surgical-qa ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 13, 2023 6:41pm

@pokornyd pokornyd mentioned this pull request Nov 6, 2023
5 tasks
pages/[envId]/[slug].tsx Show resolved Hide resolved
lib/utils/changeUrlQueryString.ts Outdated Show resolved Hide resolved
@pokornyd
Copy link
Member Author

pokornyd commented Nov 9, 2023

Now when use both categories and paging, the URL search bar only has one of the query params (categories or pagin).. also we should consider writing a readme section about the handling circular references

I refactored the method and added comments to make the steps clear. Also added a readme entry.

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