Skip to content

Commit 3cf0f5d

Browse files
feat(react): show a loading state while the profile resolves
BaseUserProfile renders a spinner in place of the fields whenever isLoading is set, in both inline and popup modes, and the wrappers set it while an editable="auto" lookup is in flight. Adds the user.profile.loading text. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent e5f7197 commit 3cf0f5d

15 files changed

Lines changed: 57 additions & 3 deletions

File tree

‎.changeset/readonly-federated-profile.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ Asgardeo rejects attribute updates for accounts provisioned from a social or ent
1515
- A rejected update is now reported in plain words instead of the raw SCIM error, and switches the profile to read-only for the rest of the session. The Next.js `<UserProfile />` previously ignored update failures entirely.
1616
- New API `getMeFederatedAssociations` in `@asgardeo/javascript` and `@asgardeo/react`, plus the `signup`-style texts `user.profile.readonly.federated` and `user.profile.update.not.allowed.error` in all i18n bundles.
1717

18-
While `auto` is resolving the profile stays read-only, so a managed account never briefly shows edit controls; in popup mode the lookup is deferred until the profile is actually opened.
18+
While `auto` is resolving, the profile shows a loading state rather than edit controls it may have to take away; `BaseUserProfile` now renders that state whenever `isLoading` is set, in both inline and popup modes. In popup mode the lookup is deferred until the profile is actually opened.

‎packages/i18n/src/models/i18n.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ export interface I18nTranslations {
116116

117117
'user.profile.heading': string;
118118
'user.profile.update.generic.error': string;
119+
'user.profile.loading': string;
119120
'user.profile.readonly.federated': string;
120121
'user.profile.update.not.allowed.error': string;
121122

‎packages/i18n/src/translations/en-US.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ const translations: I18nTranslations = {
118118
/* |---------------------------------------------------------------| */
119119

120120
'user.profile.heading': 'Profile',
121+
122+
'user.profile.loading': 'Loading profile',
121123
'user.profile.update.generic.error': 'An error occurred while updating your profile. Please try again.',
122124
'user.profile.readonly.federated': 'This profile is managed by your {provider} account and cannot be edited here.',
123125
'user.profile.update.not.allowed.error':

‎packages/i18n/src/translations/fr-FR.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ const translations: I18nTranslations = {
118118

119119
'user.profile.heading': 'Profil',
120120

121+
'user.profile.loading': 'Chargement du profil',
122+
121123
'user.profile.readonly.federated': 'Ce profil est géré par votre compte {provider} et ne peut pas être modifié ici.',
122124

123125
'user.profile.update.not.allowed.error':

‎packages/i18n/src/translations/hi-IN.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ const translations: I18nTranslations = {
117117

118118
'user.profile.heading': 'प्रोफ़ाइल',
119119

120+
'user.profile.loading': 'प्रोफ़ाइल लोड हो रही है',
121+
120122
'user.profile.readonly.federated':
121123
'यह प्रोफ़ाइल आपके {provider} खाते द्वारा प्रबंधित है और इसे यहाँ संपादित नहीं किया जा सकता।',
122124

‎packages/i18n/src/translations/ja-JP.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ const translations: I18nTranslations = {
117117

118118
'user.profile.heading': 'プロフィール',
119119

120+
'user.profile.loading': 'プロフィールを読み込んでいます',
121+
120122
'user.profile.readonly.federated':
121123
'このプロフィールは {provider} アカウントで管理されているため、ここでは編集できません。',
122124

‎packages/i18n/src/translations/pt-BR.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ const translations: I18nTranslations = {
117117

118118
'user.profile.heading': 'Perfil',
119119

120+
'user.profile.loading': 'Carregando perfil',
121+
120122
'user.profile.readonly.federated': 'Este perfil é gerenciado pela sua conta {provider} e não pode ser editado aqui.',
121123

122124
'user.profile.update.not.allowed.error':

‎packages/i18n/src/translations/pt-PT.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ const translations: I18nTranslations = {
117117

118118
'user.profile.heading': 'Perfil',
119119

120+
'user.profile.loading': 'A carregar o perfil',
121+
120122
'user.profile.readonly.federated': 'Este perfil é gerido pela sua conta {provider} e não pode ser editado aqui.',
121123

122124
'user.profile.update.not.allowed.error':

‎packages/i18n/src/translations/si-LK.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ const translations: I18nTranslations = {
117117

118118
'user.profile.heading': 'පැතිකඩ',
119119

120+
'user.profile.loading': 'පැතිකඩ පූරණය වෙමින්',
121+
120122
'user.profile.readonly.federated':
121123
'මෙම පැතිකඩ ඔබගේ {provider} ගිණුම මගින් කළමනාකරණය වන අතර මෙහිදී සංස්කරණය කළ නොහැක.',
122124

‎packages/i18n/src/translations/ta-IN.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ const translations: I18nTranslations = {
117117

118118
'user.profile.heading': 'சுயவிவரம்',
119119

120+
'user.profile.loading': 'சுயவிவரம் ஏற்றப்படுகிறது',
121+
120122
'user.profile.readonly.federated':
121123
'இந்தச் சுயவிவரம் உங்கள் {provider} கணக்கால் நிர்வகிக்கப்படுகிறது, இங்கே திருத்த முடியாது.',
122124

0 commit comments

Comments
 (0)