feat: add docs for ory elements v1.2#2361
Conversation
Co-authored-by: Vincent <vincent@ory.sh>
|
Warning Review limit reached
More reviews will be available in 2 minutes and 38 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (44)
📝 WalkthroughWalkthroughThis PR expands the Ory Elements React reference documentation by adding type aliases for discriminated UI node variants, component prop types with input element attributes, type-guard helper functions, a code-resend hook, and updated component implementations with deprecation guidance. The sidebar configuration is updated to expose the expanded API surface. ChangesType and Function Reference Documentation
🎯 3 (Moderate) | ⏱️ ~20 minutes
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@docs/elements/reference/`@ory/elements-react/theme/functions/DefaultButtonSocial.md:
- Line 14: The documentation for DefaultButtonSocial incorrectly mentions an
optional label via a now-removed prop; update the text in DefaultButtonSocial
(the component docs) to remove any reference to a `showLabel` prop and instead
describe the current behavior (renders a button with a logo and optional label
only if the current props support it, or simply "renders a button with a logo")
so the intro matches the actual prop contract of DefaultButtonSocial.
In `@docs/elements/reference/`@ory/elements-react/variables/Node.md:
- Around line 4-12: The Node declaration's parentheses are misplaced so the type
is parsed as a function returning "ReactNode & { ... }" instead of a callable
component intersected with static renderer properties; update the type of the
Node constant to be an intersection between the function signature and the
renderer-object type by wrapping the function type in parentheses, i.e. change
the shape from "const Node: (__namedParameters: NodeProps) => ReactNode & {
Button: ..., Checkbox: ..., ConsentCheckbox: ..., Image: ..., Input: ...,
SsoButton: ..., Text: ... }" to "const Node: (({...}: NodeProps) => ReactNode) &
{ Button: ..., Checkbox: ..., ConsentCheckbox: ..., Image: ..., Input: ...,
SsoButton: ..., Text: ... }" so Button, Checkbox, ConsentCheckbox, Image, Input,
SsoButton and Text are static properties on the callable Node.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 40dd2a85-c760-4ead-ad93-56a1593106a3
⛔ Files ignored due to path filters (1)
docs/elements/guides/05_upgrading.mdxis excluded by!**/*.mdx
📒 Files selected for processing (49)
docs/elements/reference/@ory/elements-react/functions/OryCardValidationMessages.mddocs/elements/reference/@ory/elements-react/functions/OrySettingsFormSection.mddocs/elements/reference/@ory/elements-react/functions/isUiNodeAnchor.mddocs/elements/reference/@ory/elements-react/functions/isUiNodeDiv.mddocs/elements/reference/@ory/elements-react/functions/isUiNodeImage.mddocs/elements/reference/@ory/elements-react/functions/isUiNodeInput.mddocs/elements/reference/@ory/elements-react/functions/isUiNodeScript.mddocs/elements/reference/@ory/elements-react/functions/isUiNodeText.mddocs/elements/reference/@ory/elements-react/functions/resolvePlaceholder.mddocs/elements/reference/@ory/elements-react/functions/useResendCode.mddocs/elements/reference/@ory/elements-react/index.mddocs/elements/reference/@ory/elements-react/theme/functions/DefaultButtonSocial.mddocs/elements/reference/@ory/elements-react/theme/functions/DefaultCard.mddocs/elements/reference/@ory/elements-react/theme/functions/Settings.mddocs/elements/reference/@ory/elements-react/theme/index.mddocs/elements/reference/@ory/elements-react/type-aliases/NodeProps.mddocs/elements/reference/@ory/elements-react/type-aliases/OryCardAuthMethodListItemProps.mddocs/elements/reference/@ory/elements-react/type-aliases/OryFlowComponents.mddocs/elements/reference/@ory/elements-react/type-aliases/OryNodeButtonButtonProps.mddocs/elements/reference/@ory/elements-react/type-aliases/OryNodeButtonProps.mddocs/elements/reference/@ory/elements-react/type-aliases/OryNodeCheckboxInputProps.mddocs/elements/reference/@ory/elements-react/type-aliases/OryNodeCheckboxProps.mddocs/elements/reference/@ory/elements-react/type-aliases/OryNodeConsentScopeCheckboxProps.mddocs/elements/reference/@ory/elements-react/type-aliases/OryNodeImageProps.mddocs/elements/reference/@ory/elements-react/type-aliases/OryNodeInputInputProps.mddocs/elements/reference/@ory/elements-react/type-aliases/OryNodeInputProps.mddocs/elements/reference/@ory/elements-react/type-aliases/OryNodeLabelProps.mddocs/elements/reference/@ory/elements-react/type-aliases/OryNodeSettingsButton.mddocs/elements/reference/@ory/elements-react/type-aliases/OryNodeSsoButtonProps.mddocs/elements/reference/@ory/elements-react/type-aliases/OryNodeTextProps.mddocs/elements/reference/@ory/elements-react/type-aliases/OrySettingsPasskeyProps.mddocs/elements/reference/@ory/elements-react/type-aliases/OrySettingsRecoveryCodesProps.mddocs/elements/reference/@ory/elements-react/type-aliases/OrySettingsSsoProps.mddocs/elements/reference/@ory/elements-react/type-aliases/OrySettingsTotpProps.mddocs/elements/reference/@ory/elements-react/type-aliases/OrySettingsWebauthnProps.mddocs/elements/reference/@ory/elements-react/type-aliases/UiNodeAnchor.mddocs/elements/reference/@ory/elements-react/type-aliases/UiNodeDiv.mddocs/elements/reference/@ory/elements-react/type-aliases/UiNodeFixed.mddocs/elements/reference/@ory/elements-react/type-aliases/UiNodeImage.mddocs/elements/reference/@ory/elements-react/type-aliases/UiNodeInput.mddocs/elements/reference/@ory/elements-react/type-aliases/UiNodeScript.mddocs/elements/reference/@ory/elements-react/type-aliases/UiNodeText.mddocs/elements/reference/@ory/elements-react/variables/Node.mddocs/elements/reference/@ory/nextjs/app/index.mddocs/elements/reference/@ory/nextjs/middleware/index.mddocs/elements/reference/@ory/nextjs/pages/index.mddocs/elements/reference/index.mddocs/elements/reference/typedoc-sidebar.tssrc/sidebar-old.ts
💤 Files with no reviewable changes (4)
- docs/elements/reference/@ory/nextjs/middleware/index.md
- docs/elements/reference/@ory/nextjs/app/index.md
- docs/elements/reference/@ory/elements-react/theme/index.md
- docs/elements/reference/@ory/nextjs/pages/index.md
Related Issue or Design Document
Checklist
If this pull request addresses a security vulnerability,
I confirm that I got approval (please contact security@ory.sh) from the maintainers to push the changes.
Further comments
Summary by CodeRabbit
@ory/elements-react, including type aliases, helper functions, and component signatures.useResendCodehook.