-
-
Notifications
You must be signed in to change notification settings - Fork 448
Fix explorer plugin preview margin #3784
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
🥷 Code experts: onesounds, 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 |
Be a legend 🏆 by adding a before and after screenshot of the changes you made, especially if they are around UI/UX. |
📝 WalkthroughWalkthroughThe XAML layout for the preview panel was refactored by replacing a nested StackPanel with a Grid for displaying file information. Margin and visibility bindings were adjusted, and the PreviewGrid's margin attribute was removed. The internal structure and data bindings for displaying file details remain unchanged. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant PreviewPanel (XAML)
participant FileInfoViewModel
User->>PreviewPanel (XAML): Open file preview
PreviewPanel (XAML)->>FileInfoViewModel: Bind file info properties (size, creation date, modified date)
FileInfoViewModel-->>PreviewPanel (XAML): Return property values
PreviewPanel (XAML)-->>User: Display file info using Grid layout
Suggested reviewers
🪧 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: 0
🔭 Outside diff range comments (1)
Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml (1)
12-15
: Row 2 is referenced but never defined – will throw a XAML layout exception
StackPanel
is assignedGrid.Row="2"
while only two<RowDefinition>
elements (index 0 and 1) exist. At runtime this causes
System.Windows.Markup.XamlParseException : Row value 2 is out of range …
.Fix either by adding a third row or by moving the
StackPanel
to row 1:<Grid.RowDefinitions> <RowDefinition /> <RowDefinition Height="Auto" /> + <!-- new footer/info row --> + <RowDefinition Height="Auto" /> </Grid.RowDefinitions> -<StackPanel Grid.Row="2"> +<StackPanel Grid.Row="1">Also applies to: 47-47
🧹 Nitpick comments (1)
Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml (1)
90-159
: Hard-coded 100 px label column risks truncation & RTL issues
With localisation (“Last Modified” in some languages > 100 px) the first column may clip. ConsiderWidth="Auto"
(orSharedSizeGroup
) and rely on right-aligned value column:-<ColumnDefinition Width="100" /> +<ColumnDefinition Width="Auto" SharedSizeGroup="LabelCol" /> +<ColumnDefinition Width="*" SharedSizeGroup="ValueCol" />Also set
Grid.IsSharedSizeScope="True"
on the parentStackPanel
if reuse across rows is desired.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml
(2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
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.
Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml (2)
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.
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: gitStream workflow automation
- GitHub Check: gitStream.cm
- GitHub Check: gitStream.cm
- GitHub Check: gitStream.cm
- GitHub Check: build
🔇 Additional comments (1)
Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml (1)
11-11
: Removal ofMargin
onPreviewGrid
– double-check visual regression on hi-DPI
The outer grid now stretches edge-to-edge. Verify that the preview no longer collides with surrounding chrome on 100 %/125 %/150 % scaling.
Fix explorer plugin preview margin
Original: Center. New: Right.