Skip to content

fix(framework): prevent language-aware components from rendering before CLDR data loads#13602

Merged
nnaydenow merged 2 commits into
mainfrom
date-tests-new
May 29, 2026
Merged

fix(framework): prevent language-aware components from rendering before CLDR data loads#13602
nnaydenow merged 2 commits into
mainfrom
date-tests-new

Conversation

@nnaydenow
Copy link
Copy Markdown
Contributor

When setLanguage() is called without awaiting, languageChangePending is set to true while CLDR/i18n data is still being fetched. Previously, a language-aware component mounted during this window would call renderImmediately with incomplete locale data, causing a crash.

The fix registers the element in connectedCallback before any async work, then bails out of rendering if a language change is pending. Once CLDR resolves, reRenderAllUI5Elements({ languageAware: true }) picks up the registered element and renders it correctly.

registerElement/unregisterElement are extracted from renderImmediately and cancelRender and exported so UI5Element can call them independently of the render cycle.

@nnaydenow nnaydenow requested review from ilhan007 and pskelin and removed request for pskelin May 28, 2026 10:40
@ui5-webcomponents-bot
Copy link
Copy Markdown
Collaborator

ui5-webcomponents-bot commented May 28, 2026

🧹 Preview deployment cleaned up: https://pr-13602--ui5-webcomponents.netlify.app

@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview May 28, 2026 10:47 Inactive
pskelin
pskelin previously approved these changes May 28, 2026
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview May 28, 2026 14:16 Inactive
@nnaydenow nnaydenow merged commit 441672b into main May 29, 2026
13 of 14 checks passed
@nnaydenow nnaydenow deleted the date-tests-new branch May 29, 2026 07:07
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview May 29, 2026 07:08 Inactive
@sap-ui5-webcomponents-release
Copy link
Copy Markdown

🎉 This PR is included in version v2.23.0-rc.2 🎉

The release is available on v2.23.0-rc.2

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants