Repository navigation
Set the layout direction before MainLayout loads the current user #13893 - #13894
Conversation
…foundation#13893 SetCurrentDir ran after awaiting SetCurrentUser, so the first render had no direction, and a cancelled or failed GetCurrentUser request skipped it for the whole session, leaving RTL cultures laid out left to right. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
Walkthrough
ChangesLayout direction initialization
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~8 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to
|
Signed-off-by: Yas Moradi <yas_moradi@outlook.com>
Summary
Moves
SetCurrentDir()in the Boilerplate'sMainLayout.OnInitializedAsyncto run before anything is awaited, so an RTL culture gets its direction on the first render and keeps it when loading the current user fails.Changes
MainLayout.razor.cs: callSetCurrentDir()first, outside thetry, instead of afterawait SetCurrentUser(...). It only readsCultureInfo.CurrentUICulture, so it does not depend on the user. Previously a cancelled or failedGetCurrentUserrequest skipped it, andCurrentDirstayednull(left to right) until a refresh.Related Issue
This closes #13893
🤖 Generated with Claude Code
Summary by CodeRabbit