Skip to content

Migrate to the PreviewVisibility API#4

Open
TrueCrimeDev wants to merge 1 commit into
mainfrom
migrate-preview-visibility
Open

Migrate to the PreviewVisibility API#4
TrueCrimeDev wants to merge 1 commit into
mainfrom
migrate-preview-visibility

Conversation

@TrueCrimeDev

Copy link
Copy Markdown
Owner

Migrates Shorty to Flow.Launcher's new preview-visibility API.

Flow.Launcher PR Flow-Launcher/Flow.Launcher#4529 replaces PreviewContentType.Hidden with a PreviewVisibility enum on Result (Default / Never / Always), decoupling pane visibility from the content type.

  • Ask / Loading placeholder rows → PreviewVisibility.Never (was ContentType.Hidden)
  • Answer / Copy / Error markdown rows → PreviewVisibility.Always, so they keep auto-opening the preview now that the content type no longer forces the pane open

⚠️ Depends on Flow.Launcher#4529 — won't build until that core API change is available.

Flow.Launcher replaced PreviewContentType.Hidden with a PreviewVisibility enum on
Result (Default/Never/Always), decoupling pane visibility from the content type.

- Ask / Loading placeholder rows: PreviewVisibility.Never (was ContentType.Hidden)
- Answer / Copy / Error markdown rows: PreviewVisibility.Always, so they keep
  auto-opening the preview now that markdown content no longer forces the pane open

Requires Flow.Launcher PR #4529 (the core API change) to build.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011TcJGQVjhYU3tEMi8FF4TM

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Migrates Shorty’s result rows to Flow.Launcher’s new Result.PreviewVisibility API, decoupling preview-pane visibility from PreviewContentType so the plugin preserves the previous auto-open / hidden preview behavior.

Changes:

  • Replaced PreviewContentType.Hidden usage with PreviewVisibility.Never for “Ask” and “Loading” rows.
  • Set PreviewVisibility.Always for markdown-backed “Answer”, “Copy”, and “Error” rows so the preview pane still auto-opens.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Shorty/Main.cs
Comment on lines 239 to 243
RoundedIcon = false,
CopyText = entry.Text,
Preview = preview,
PreviewVisibility = PreviewVisibility.Always,
ContextData = entry,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants