Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified docs/images/launchflow-basic-workbench-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/launchflow-basic-workbench-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/launchflow-export-workflow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/launchflow-log-console.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/launchflow-plan-history.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/launchflow-step-reorder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/launchflow-workbench-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/launchflow-workbench-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion editor/ui/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -1930,7 +1930,11 @@ def _build_ui(self) -> None:

sidebar = QFrame()
sidebar.setObjectName("Sidebar")
sidebar.setFixedWidth(245)
# 245px leaves only 149px for the 20px/800 brand title after 18px
# margins, a 48px icon, and 12px spacing. That fits Professional
# "Launch Flow" (117px) but clips "LaunchFlow Basic" (166px) to
# "LaunchFlow Bas". 270px leaves 174px so both titles stay whole.
sidebar.setFixedWidth(270)

sidebar_layout = QVBoxLayout(sidebar)
sidebar_layout.setContentsMargins(18, 18, 18, 18)
Expand Down
36 changes: 34 additions & 2 deletions tools/check_dual_edition_phase2_smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,7 @@ def check_basic_template_isolation() -> None:

def check_editor_ui_trimming() -> None:
os.environ.setdefault("QT_QPA_PLATFORM", "offscreen")
from PySide6.QtGui import QFontDatabase, QFontInfo
from PySide6.QtWidgets import QApplication

from editor.edition_ui import (
Expand All @@ -495,6 +496,15 @@ def check_editor_ui_trimming() -> None:
from shared.models import AppStep, CommandStep, UrlStep

app = QApplication.instance() or QApplication([])
if sys.platform == "win32":
for font_path in (
Path(r"C:\Windows\Fonts\segoeui.ttf"),
Path(r"C:\Windows\Fonts\segoeuib.ttf"),
Path(r"C:\Windows\Fonts\msyh.ttc"),
Path(r"C:\Windows\Fonts\msyhbd.ttc"),
):
if font_path.is_file():
QFontDatabase.addApplicationFont(str(font_path))
temp_root = Path(tempfile.gettempdir()) / f"launchflow-phase2-ui-{os.getpid()}-{uuid.uuid4().hex}"
old_override = os.environ.get(APP_DATA_ENV)
previous = set_process_edition_context(EditionContext())
Expand All @@ -511,6 +521,28 @@ def add_app_and_select(window: MainWindow) -> AppStep:
app.processEvents()
return step


def require_brand_title_unclipped(window: MainWindow, expected: str, label: str) -> None:
require(window.brand_title_label.text() == expected, f"{label} brand title is wrong")
for width, height in ((1280, 800), (1440, 900)):
window.resize(width, height)
app.processEvents()
title = window.brand_title_label
title.ensurePolished()
info = QFontInfo(title.font())
# Offscreen Qt can leave font metrics unresolved (empty family,
# 20px dummy advances). Only assert layout width when the
# workbench font actually resolved.
if info.pixelSize() <= 0 or not info.family():
continue
available = title.contentsRect().width()
needed = title.fontMetrics().horizontalAdvance(title.text())
require(
available >= needed,
f"{label} sidebar brand is clipped at {width}x{height}: "
f"available={available}px, needed={needed}px, text={title.text()!r}",
)

professional = MainWindow(PROJECT_ROOT)
windows.append(professional)
professional.show()
Expand All @@ -530,7 +562,7 @@ def add_app_and_select(window: MainWindow) -> AppStep:
require(professional.app_args_in.isVisible() and professional.app_delay_in.isVisible(), "Professional app inspector lost its advanced fields")
require(professional.empty_steps_subtitle.text() == PROFESSIONAL_EMPTY_STEPS_HINT, "Professional empty-state hint changed")
require(professional.title_bar.title_label.text() == PROFESSIONAL_WORKBENCH_TITLE, "Professional workbench title changed")
require(professional.brand_title_label.text() == PROFESSIONAL_BRAND_TITLE, "Professional brand title changed")
require_brand_title_unclipped(professional, PROFESSIONAL_BRAND_TITLE, "Professional")
require(professional.app_path_in.placeholderText() == PROFESSIONAL_APP_PATH_PLACEHOLDER, "Professional path placeholder changed")
require(application_file_dialog_filter() == PROFESSIONAL_APP_DIALOG_FILTER, "Professional file-dialog filter changed")
require(professional.log_hint.text() == PROFESSIONAL_LOG_HINT, "Professional log hint changed")
Expand All @@ -547,7 +579,7 @@ def add_app_and_select(window: MainWindow) -> AppStep:
require(basic.empty_steps_subtitle.text() == BASIC_EMPTY_STEPS_HINT, "Basic empty-state hint is wrong")
require("命令" not in basic.empty_steps_subtitle.text() and "等待" not in basic.empty_steps_subtitle.text(), "Basic empty-state still advertises Professional steps")
require(basic.title_bar.title_label.text() == BASIC_WORKBENCH_TITLE, "Basic workbench title is wrong")
require(basic.brand_title_label.text() == BASIC_BRAND_TITLE, "Basic brand title is wrong")
require_brand_title_unclipped(basic, BASIC_BRAND_TITLE, "Basic")
require(basic.app_path_in.placeholderText() == BASIC_APP_PATH_PLACEHOLDER, "Basic path placeholder is wrong")
require(application_file_dialog_filter() == BASIC_APP_DIALOG_FILTER, "Basic file-dialog filter still includes scripts")
require("Command" not in basic.log_hint.text() and "命令" not in basic.log_hint.text(), "Basic log hint still describes Command")
Expand Down
Loading