-
Notifications
You must be signed in to change notification settings - Fork 863
fix(): exclude custom subsections #7298
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
Conversation
Dangerous URL checkNo absolute URLs to prisma.io/docs found. |
WalkthroughA documentation category JSON adds Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Pre-merge checks❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
No files changed. |
Redirect checkThis PR probably requires the following redirects to be added to static/_redirects:
|
🍈 Lychee Link Check Report
📊 Results Overview
Errors per inputErrors in 800-guides/320-permit-io-access-control.mdx
|
Deploying docs with
|
| Latest commit: |
7368e84
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://78431117.docs-51g.pages.dev |
| Branch Preview URL: | https://docs-ui-fix.docs-51g.pages.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/theme/DocCardList/index.tsx (1)
22-26: Recompute filtered items fromitemsinstead of re‑filtering previous stateRight now the effect ignores the latest
itemsvalue and only refinesprevFilteredItems. Ifitemsever changes (e.g., sidebar structure updates), new entries will never appear infilteredItems, and repeated runs just keep filtering an already filtered list.Since this is purely derived state, it’s safer and simpler to base the effect on
itemsdirectly:- useEffect(() => { - setFilteredItems(prevFilteredItems => - prevFilteredItems - .filter((e: any) => e?.href?.slice(0, -1) !== location.pathname) - .filter((e: any) => !e?.customProps?.hide_from_subsection) - ); - }, [items]); + useEffect(() => { + setFilteredItems( + filterDocCardListItems(items) + .filter((e: any) => e?.href?.slice(0, -1) !== location.pathname) + .filter((e: any) => !e?.customProps?.hide_from_subsection), + ); + }, [items]);This keeps the new
hide_from_subsectionbehavior while avoiding stale or out‑of‑sync lists.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
content/200-orm/500-reference/300-errors/_category_.json(1 hunks)src/theme/DocCardList/index.tsx(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Check internal links
- GitHub Check: Cloudflare Pages
🔇 Additional comments (1)
content/200-orm/500-reference/300-errors/_category_.json (1)
2-4: Custom props wiring looks consistent and JSON is valid
customProps.hide_from_subsectionis named consistently with the consumer inDocCardList, and the JSON remains syntactically valid with the additional property. No further changes needed here.
cce4959 to
7368e84
Compare
|
No files changed. |
This adds a custom prop support to our Subsection component. With this we can exclude specific pages from being rendered in our sub-sections, but still use them if we need custom redirects
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.
✏️ Tip: You can customize this high-level summary in your review settings.