-
-
Notifications
You must be signed in to change notification settings - Fork 381
initialize position before InitializeComponent #3549
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
🥷 Code experts: Yusyuriv Jack251970 has most 👩💻 activity in the files. See details
Activity based on git-commit:
Knowledge based on git-blame: To learn more about /:\ gitStream - Visit our Docs |
This comment has been minimized.
This comment has been minimized.
Be a legend 🏆 by adding a before and after screenshot of the changes you made, especially if they are around UI/UX. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR reorders the initialization calls so that the window’s position is set before loading the XAML when WindowStartupLocation
is Manual.
- Moves
UpdatePositionAndState()
to occur beforeInitializeComponent()
- Adds a clarifying comment for the new call order
📝 WalkthroughWalkthroughThe constructor of the Changes
Suggested reviewers
Poem
Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Note ⚡️ Faster reviews with cachingCodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (7)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
Flow.Launcher/SettingWindow.xaml.cs (1)
30-31
: Add “Ioc” to the spelling dictionaryThe
Ioc
acronym (Inversion of Control) is being flagged by the spell checker. To suppress this warning, consider adding “Ioc” to your project’s custom dictionary or.editorconfig
.🧰 Tools
🪛 GitHub Check: Check Spelling
[warning] 31-31:
Ioc
is not a recognized word. (unrecognized-spelling)🪛 GitHub Actions: Check Spelling
[warning] 31-31: Spell check warning:
Ioc
is not a recognized word. (unrecognized-spelling)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
Flow.Launcher/SettingWindow.xaml.cs
(1 hunks)
🧰 Additional context used
🪛 GitHub Actions: Check Spelling
Flow.Launcher/SettingWindow.xaml.cs
[warning] 31-31: Spell check warning: Ioc
is not a recognized word. (unrecognized-spelling)
⏰ Context from checks skipped due to timeout of 90000ms (11)
- GitHub Check: gitStream.cm
- GitHub Check: gitStream.cm
- GitHub Check: gitStream.cm
- GitHub Check: gitStream workflow automation
- GitHub Check: gitStream workflow automation
- GitHub Check: gitStream.cm
- GitHub Check: gitStream.cm
- GitHub Check: gitStream.cm
- GitHub Check: gitStream.cm
- GitHub Check: gitStream.cm
- GitHub Check: build
🔇 Additional comments (1)
Flow.Launcher/SettingWindow.xaml.cs (1)
33-35
: Position initialization before component load is correctBy invoking
UpdatePositionAndState()
prior toInitializeComponent()
, we ensure the manualWindowStartupLocation
setting is respected before any UI elements are laid out. Since this method only uses window settings and system parameters (and does not depend on fully initialized visuals), it is safe to run pre-component initialization.
@check-spelling-bot Report🔴 Please reviewSee the 📂 files view, the 📜action log, or 📝 job summary for details.
See ❌ Event descriptions for more information. If the flagged items are 🤯 false positivesIf items relate to a ...
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested.
Follow on with #3470.
Because WindowStartupLocation is Manual, so we need to initialize position before InitializeComponent.
Fix:
