-
-
Notifications
You must be signed in to change notification settings - Fork 45
Advisory: ory elements‐react upgrade guide to v1.0.0‐next.11
Jonas Hungershausen edited this page Oct 14, 2024
·
6 revisions
-
Renamed all
Headless*
types and components toOry*
equivalents to better align with naming conventions:-
HeadlessButtonProps
➔OryNodeButtonProps
-
HeadlessInputProps
➔OryNodeInputProps
-
HeadlessImageProps
➔OryNodeImageProps
-
HeadlessLabelProps
➔OryNodeLabelProps
-
HeadlessTextProps
➔OryNodeTextProps
-
HeadlessLinkButtonProps
➔OryNodeAnchorProps
-
HeadlessMessageProps
➔OryMessageContentProps
-
HeadlessMessagesProps
➔OryMessageRootProps
-
HeadlessFormProps
➔OryFormRootProps
-
HeadlessGroupProps
➔OryFormGroupsProps
-
HeadlessGroupContainerProps
➔OryFormGroupProps
-
HeadlessCurrentIdentifierProps
➔OryCurrentIdentifierProps
-
HorizontalDividerProps
➔OryCardDividerProps
-
HeadlessAuthMethodListItemProps
➔OryCardAuthMethodListItemProps
-
HeadlessSocialButtonProps
➔OryNodeOidcButtonProps
-
HeadlessSocialButtonContainerProps
➔OryFormOidcRootProps
-
HeadlessSocialButtonsProps
➔OryFormOidcButtonsProps
-
-
Removed the following functions and types:
- Functions:
onSubmitLogin
onSubmitRegistration
onSubmitRecovery
onSubmitSettings
onSubmitVerification
formatMessage
formElementId
formLabelId
isCustomTranslations
- Types:
FlowContainer
IntlProvider
IntlProviderProps
CustomLanguageFormats
CustomTranslations
LanguageCodes
TranslationFile
ProviderProps
OryComponentProvider
OryFlowProvider
OryFlowProviderProps
OryFormComponents
OryCardComponents
- Functions:
-
Modified types and components:
-
OryFlowComponents
structure has been updated to accommodate the new naming conventions and component hierarchy. -
FlowContainerSetter
andFlowContextValue
now expectOryFlowContainer
instead ofFlowContainer
. - Removed the need of providing your own IntlProvider, simplifying custom translation management.
-
To upgrade to this version, please make the following changes in your codebase:
-
Update Type and Component Names:
- Replace all
Headless*
prefixes withOry*
in your imports and code. - Update component and type names according to the renaming list provided above.
- Replace all
-
Adjust Function Usage:
- Remove any usage of the deprecated
onSubmit*
functions (onSubmitLogin
,onSubmitRegistration
, etc.). Implement your own submission handlers as needed.
- Remove any usage of the deprecated
-
Internationalization Updates:
- Replace
IntlProvider
andIntlProviderProps
withOryIntlProviderProps
. - Adjust any custom translation implementations accordingly.
- Replace
-
Component Provider Changes:
- Remove
OryComponentProvider
,OryFlowProvider
, andOryFlowProviderProps
from your code. Their functionalities are now integrated into other components or no longer necessary.
- Remove
-
Type Adjustments:
- Replace any usage of
FlowContainer
with the specific flow container types likeLoginFlowContainer
,RegistrationFlowContainer
, etc. - Update any references to removed types such as
CustomLanguageFormats
,CustomTranslations
,LanguageCodes
, andTranslationFile
.
- Replace any usage of
-
Review Component Structures:
- Check the updated
OryFlowComponents
to understand the new component hierarchy and adjust your custom components if you have any overrides or extensions.
- Check the updated
-
Easier custom translation handling
- Instead of wrapping Ory Components with an
IntlProvider
, please provide your custom translations and i18n settings via the newintl
object in theOryClientConfiguration
passed to each flow component.
- Instead of wrapping Ory Components with an
By addressing these changes, your application should be compatible with the latest version of @ory/elements-react
.