-
-
Notifications
You must be signed in to change notification settings - Fork 446
Fix Card Control in CardGroup #3779
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
📝 Walkthrough""" WalkthroughThe changes update the Card control's styling logic by introducing and utilizing a new Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant SettingsPage (XAML)
participant Card Control
participant Card.xaml (Style)
User->>SettingsPage (XAML): Loads settings page
SettingsPage (XAML)->>Card Control: Instantiates Card with Type (First/Middle/Last)
Card Control->>Card.xaml (Style): Applies style based on Type property
Card.xaml (Style)-->>Card Control: Sets styling (Margin, CornerRadius, etc.)
Card Control-->>SettingsPage (XAML): Renders styled card
Suggested reviewers
📜 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 (6)
🪧 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 (
|
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: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
Flow.Launcher/Resources/Controls/Card.xaml
(1 hunks)Flow.Launcher/Resources/Controls/Card.xaml.cs
(1 hunks)Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
(6 hunks)Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml
(2 hunks)Flow.Launcher/SettingPages/Views/SettingsPaneProxy.xaml
(1 hunks)Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml
(4 hunks)
🧰 Additional context used
🧠 Learnings (3)
Flow.Launcher/Resources/Controls/Card.xaml (4)
Learnt from: onesounds
PR: Flow-Launcher/Flow.Launcher#3394
File: Flow.Launcher/Themes/Darker Glass.xaml:134-141
Timestamp: 2025-03-28T21:20:54.978Z
Learning: In WPF applications like Flow.Launcher, Border elements cannot directly display text content and require a child element like TextBlock to handle text rendering. This separation of concerns (Border for visual container styling, TextBlock for text display) follows WPF best practices and provides greater styling flexibility.
Learnt from: onesounds
PR: Flow-Launcher/Flow.Launcher#3394
File: Flow.Launcher/Themes/Darker Glass.xaml:134-141
Timestamp: 2025-03-28T21:20:54.978Z
Learning: In WPF applications like Flow.Launcher, Border elements cannot directly display text content and require a child element like TextBlock to handle text rendering. This separation of concerns (Border for visual container styling, TextBlock for text display) follows WPF best practices and provides greater styling flexibility.
Learnt from: onesounds
PR: Flow-Launcher/Flow.Launcher#3394
File: Flow.Launcher/Themes/Darker Glass.xaml:134-141
Timestamp: 2025-03-28T21:12:13.386Z
Learning: In Flow.Launcher, hotkey styling is implemented with a two-component structure: a Border element with style `ItemHotkeyBGStyle` that provides background and border styling, containing a TextBlock with style `ItemHotkeyStyle` that handles the text styling.
Learnt from: onesounds
PR: Flow-Launcher/Flow.Launcher#0
File: :0-0
Timestamp: 2025-04-23T15:14:49.986Z
Learning: In WPF applications like Flow.Launcher, font styling should be applied using implicit styles instead of setting the FontFamily property on individual controls. Define implicit styles in a ResourceDictionary using <Style TargetType="{x:Type Button}"> format and merge it into App.xaml, which automatically applies the font to all instances of the control type while still allowing explicit overrides where needed.
Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml (1)
Learnt from: Yusyuriv
PR: Flow-Launcher/Flow.Launcher#3118
File: Flow.Launcher/ViewModel/MainViewModel.cs:1404-1413
Timestamp: 2024-12-08T21:12:12.060Z
Learning: In the `MainViewModel` class, the `_lastQuery` field is initialized in the constructor and is never null.
Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml (1)
Learnt from: onesounds
PR: Flow-Launcher/Flow.Launcher#3394
File: Flow.Launcher/Themes/Darker Glass.xaml:134-141
Timestamp: 2025-03-28T21:12:13.386Z
Learning: In Flow.Launcher, hotkey styling is implemented with a two-component structure: a Border element with style `ItemHotkeyBGStyle` that provides background and border styling, containing a TextBlock with style `ItemHotkeyStyle` that handles the text styling.
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: gitStream.cm
- GitHub Check: gitStream.cm
- GitHub Check: build
🔇 Additional comments (7)
Flow.Launcher/Resources/Controls/Card.xaml.cs (1)
12-15
: LGTM! Clean enum extension.The addition of
First
,Middle
, andLast
values to theCardType
enum is well-structured and follows the existing pattern. This supports the new explicit positioning approach for card styling.Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml (1)
492-493
: Excellent implementation of the new Type attribute pattern.The Type assignments correctly identify first and last cards in their respective CardGroups, ensuring proper visual styling boundaries. The pattern is consistent across both backdrop/shadow and clock/date card groups.
Also applies to: 509-510, 551-554, 575-578
Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml (1)
94-97
: Consistent and correct Type attribute implementation.All CardGroups properly implement the First/Last pattern for their respective card pairs. The Type assignments will ensure appropriate visual styling for grouped cards while maintaining the new explicit positioning approach.
Also applies to: 122-122, 203-206, 215-218, 388-389, 398-399
Flow.Launcher/Resources/Controls/Card.xaml (1)
41-46
: Well-implemented style trigger updates for the new Type property.The DataTrigger bindings correctly use the Card's
Type
property instead of the attached property, and the styling logic appropriately handles visual grouping:
- First cards: Clean start with no borders
- Middle/Last cards: Top border creates visual continuation
- All grouped cards: Transparent background maintains cohesion
This resolves the dependency issue while preserving the intended card grouping visual effects.
Also applies to: 48-53, 55-60
Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml (3)
54-57
: LGTM: Explicit Type attribute correctly applied.The
Type="First"
attribute properly identifies this card as the first element in the CardGroup, replacing the previous automatic detection that caused XAML errors.
65-68
: LGTM: Explicit Type attribute correctly applied.The
Type="Last"
attribute properly identifies this card as the last element in the CardGroup, completing the explicit positioning approach for this group.
213-221
: LGTM: New RenameFileHotkey card properly implemented.The new card follows the established pattern:
- Uses
Type="Inside"
consistent with other cards in the hotkeyPresets section- Properly configured HotkeyControl with F2 default hotkey
- Includes appropriate validation settings
- Uses correct resource binding for the title
The implementation aligns well with the existing hotkey cards in this section.
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.
LGTM! The performance of the settings window under debug configuration is improved largely!
I turned off this debug message, so I was completely aware of it. |
🥷 Code experts: Yusyuriv, Jack251970 onesounds, Jack251970 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:
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 |
What's the PR
Details