Skip to content

Do not create customized preview panel when preview is off #3867

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

Merged
merged 2 commits into from
Aug 7, 2025

Conversation

Jack251970
Copy link
Member

@Jack251970 Jack251970 commented Jul 25, 2025

Do not create customized preview panel when preview is off

From TBM13@4db994c. Thanks @TBM13!

Test

  • Toggle Always preview to off
  • Search for some files (Use Explorer plugin results)
  • PreviewPanel is not created if preview control is invisible

Copy link

gitstream-cm bot commented Jul 25, 2025

🥷 Code experts: onesounds, taooceros

Jack251970, taooceros have most 👩‍💻 activity in the files.
Jack251970, onesounds have most 🧠 knowledge in the files.

See details

Flow.Launcher/MainWindow.xaml

Activity based on git-commit:

Jack251970 taooceros
JUL
JUN
MAY 3 additions & 3 deletions
APR
MAR 42 additions & 26 deletions
FEB 1 additions & 1 deletions

Knowledge based on git-blame:
onesounds: 85%
Jack251970: 7%

Flow.Launcher/ViewModel/MainViewModel.cs

Activity based on git-commit:

Jack251970 taooceros
JUL 23 additions & 9 deletions 344 additions & 65 deletions
JUN 25 additions & 13 deletions
MAY 529 additions & 316 deletions
APR 35 additions & 28 deletions
MAR 695 additions & 628 deletions
FEB 63 additions & 21 deletions

Knowledge based on git-blame:
Jack251970: 35%
onesounds: 7%

Flow.Launcher/ViewModel/ResultViewModel.cs

Activity based on git-commit:

Jack251970 taooceros
JUL 0 additions & 5 deletions
JUN
MAY
APR 70 additions & 16 deletions
MAR 47 additions & 50 deletions
FEB

Knowledge based on git-blame:
Jack251970: 31%

✨ Comment /gs review for LinearB AI review. Learn how to automate it here.

Copy link

gitstream-cm bot commented Jul 25, 2025

Be a legend 🏆 by adding a before and after screenshot of the changes you made, especially if they are around UI/UX.

@coderabbitai coderabbitai bot added the bug Something isn't working label Jul 25, 2025
Copy link
Contributor

coderabbitai bot commented Jul 25, 2025

📝 Walkthrough

Walkthrough

The changes refactor how the customized preview feature is handled in the application. The logic and properties for displaying and binding the customized preview are moved from the ResultViewModel to the MainViewModel. The XAML is updated to bind to the new properties in MainViewModel, and the old property is removed from ResultViewModel.

Changes

File(s) Change Summary
Flow.Launcher/MainWindow.xaml Removed DataContext bindings from the preview Border and updated ContentControl to bind to new property.
Flow.Launcher/ViewModel/MainViewModel.cs Added ShowCustomizedPreview and CustomizedPreviewControl properties to manage preview logic.
Flow.Launcher/ViewModel/ResultViewModel.cs Removed ShowCustomizedPreview property from this ViewModel.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant MainWindow
    participant MainViewModel
    participant ResultViewModel

    User->>MainWindow: Selects an item
    MainWindow->>MainViewModel: Updates PreviewSelectedItem
    MainViewModel->>MainViewModel: Evaluates ShowCustomizedPreview & CustomizedPreviewControl
    MainWindow->>MainViewModel: Binds to ShowCustomizedPreview & CustomizedPreviewControl
    MainViewModel->>ResultViewModel: (if needed) Accesses PreviewPanel
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested labels

enhancement

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 277767f and 14af7af.

📒 Files selected for processing (1)
  • Flow.Launcher/MainWindow.xaml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • Flow.Launcher/MainWindow.xaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch preview_panel_creation

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai bot added the enhancement New feature or request label Jul 25, 2025
@Jack251970 Jack251970 enabled auto-merge July 27, 2025 12:36
@Jack251970 Jack251970 merged commit 908ed0c into dev Aug 7, 2025
13 checks passed
@Jack251970 Jack251970 deleted the preview_panel_creation branch August 7, 2025 09:10
@jjw24 jjw24 removed enhancement New feature or request 1 min review labels Aug 7, 2025
@jjw24 jjw24 added this to the 2.0.0 milestone Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants