-
-
Notifications
You must be signed in to change notification settings - Fork 365
Fix first-time window flicker & clock panel flicker issue #3391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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 aims to fix issues related to first-time window flicker as well as clock panel flicker by updating the way UI element properties (such as opacity and visibility) are managed and animated. Key changes include:
- Introduction of new viewmodel properties (ClockPanelVisibility, ClockPanelOpacity, and SearchIconOpacity) to drive UI state.
- Moving UI update logic inside Dispatcher.Invoke calls to ensure thread safety.
- Removal of direct UI element property assignments in favor of updating viewmodel properties in MainWindow.xaml.cs.
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
File | Description |
---|---|
Flow.Launcher/ViewModel/MainViewModel.cs | Added viewmodel properties and updated Show/Hide logic to manage flickering. |
Flow.Launcher/MainWindow.xaml.cs | Removed direct UI element updates in favor of viewmodel-driven changes and updated animation handling. |
Files not reviewed (1)
- Flow.Launcher/MainWindow.xaml: Language not supported
Comments suppressed due to low confidence (2)
Flow.Launcher/MainWindow.xaml.cs:888
- The animation is applied to the ClockPanel UI element (line 920) while the viewmodel property is updated here. Ensure that the viewmodel changes are properly reflected in the UI—either by relying solely on data binding for animations or by consistently updating the UI element properties alongside the viewmodel.
_viewModel.ClockPanelOpacity = 0.0; // Set to 0 in case Opacity animation affects it
Flow.Launcher/MainWindow.xaml.cs:301
- Since the code now assigns the UI opacity via the viewmodel property instead of directly modifying the UI element, please verify that the corresponding data binding for ClockPanel.Opacity is properly configured to update the UI as intended.
_viewModel.ClockPanelOpacity = 0.0;
@check-spelling-bot Report🔴 Please reviewSee the 📂 files view, the 📜action log, or 📝 job summary for details.
See ❌ Event descriptions for more information. Forbidden patterns 🙅 (1)In order to address this, you could change the content to not match the forbidden patterns (comments before forbidden patterns may help explain why they're forbidden), add patterns for acceptable instances, or adjust the forbidden patterns themselves. These forbidden patterns matched content: s.b. workaround(s)
If the flagged items are 🤯 false positivesIf items relate to a ...
|
🥷 Code experts: onesounds Jack251970, onesounds have most 👩💻 activity in the files. See details
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame: To learn more about /:\ gitStream - Visit our Docs |
Be a legend 🏆 by adding a before and after screenshot of the changes you made, especially if they are around UI/UX. |
1 similar comment
Be a legend 🏆 by adding a before and after screenshot of the changes you made, especially if they are around UI/UX. |
📝 WalkthroughWalkthroughThis pull request refactors the UI state management of the launcher. New bindings for opacity and visibility have been added to the ClockPanel and SearchIcon in the XAML. The code-behind now delegates state control to the MainViewModel, which has been expanded with new public properties and updated Show/Hide methods. This centralizes UI logic in accordance with MVVM principles. Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant MW as MainWindow
participant CB as Code-behind
participant VM as MainViewModel
U->>MW: Launch Application
MW->>CB: Trigger OnLoaded Event
CB->>VM: Update UI state (opacity, visibility)
VM-->>CB: Return updated property values
CB->>MW: Render ClockPanel & SearchIcon with new settings
MW->>U: Display updated UI
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
🧰 Additional context used🧬 Code Definitions (1)Flow.Launcher/ViewModel/MainViewModel.cs (2)
⏰ Context from checks skipped due to timeout of 90000ms (4)
🔇 Additional comments (13)
✨ 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:
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 (
|
Fix first-time window flicker & clock panel flicker issue
Fix first-time window flicker.
Fix clock panel flicker.