Skip to content

feat(Window Framework): global controlled window title bar#11

Merged
GT-610 merged 1 commit intolollipopkit:mainfrom
GT-610:fix/titlebar
Jan 22, 2026
Merged

feat(Window Framework): global controlled window title bar#11
GT-610 merged 1 commit intolollipopkit:mainfrom
GT-610:fix/titlebar

Conversation

@GT-610
Copy link
Copy Markdown
Collaborator

@GT-610 GT-610 commented Jan 22, 2026

Resolve lollipopkit/flutter_server_box/issues/956.

This commit needs to be used in conjunction with behavioral changes in ServerBox and is incompatible with the current processing logic. I will push new changes to ServerBox later and then link these two changes together.

Summary by CodeRabbit

  • New Features
    • Added window caption visibility controls accessible both globally and per-instance
    • Caption display behavior now configurable with defaults set to show captions
    • Enhanced window frame customization options on supported platforms

✏️ Tip: You can customize this high-level summary in your review settings.

…isplay function

Add the WindowFrameConfig class for global control of the display of the virtual window title bar

Modify the VirtualWindowFrame component to support dynamically showing/hiding the title bar based on configuration
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 22, 2026

📝 Walkthrough

Walkthrough

Introduces global and instance-level configuration for VirtualWindowFrame caption visibility. Adds WindowFrameConfig class with static getter and setter for showCaption property, extends VirtualWindowFrame with showCaption parameter, and propagates the configuration through route builders to control caption display based on both global and instance-level settings.

Changes

Cohort / File(s) Summary
Caption Visibility Configuration
lib/src/view/widget/virtual_window_frame.dart
Adds WindowFrameConfig class with static showCaption getter (desktop-only) and setShowCaption() setter. Extends VirtualWindowFrame constructor with instance-level showCaption parameter (default true). Modifies content construction to show caption wrapper only when both global and instance-level showCaption are true.
Route Builder Propagation
lib/src/core/route/route.dart
Updates AppRoute.toWidget(), AppRouteArg.go(), AppRouteArg.toWidget(), AppRouteNoArg.go(), and AppRouteNoArg.toWidget() to pass showCaption: WindowFrameConfig.showCaption parameter to VirtualWindowFrame during construction.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: introducing global control for window title bar visibility through WindowFrameConfig.
Linked Issues check ✅ Passed The PR implements WindowFrameConfig for global title bar control and modifies VirtualWindowFrame to respect this configuration, directly addressing issue #956's requirement to prevent duplicate title bars.
Out of Scope Changes check ✅ Passed All changes are scoped to implementing global title bar control: WindowFrameConfig introduction, VirtualWindowFrame modifications, and route builder propagation are all related to the linked issue objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

🧹 Recent nitpick comments
lib/src/view/widget/virtual_window_frame.dart (1)

5-12: Consider clarifying rebuild requirements for global toggles.

setShowCaption only mutates a static flag; existing frames won’t update unless the caller triggers a rebuild. If runtime toggling is expected, document that a rebuild is required (or add an explicit notification mechanism).

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cb8cb16 and 2abbaf2.

📒 Files selected for processing (2)
  • lib/src/core/route/route.dart
  • lib/src/view/widget/virtual_window_frame.dart
🔇 Additional comments (2)
lib/src/view/widget/virtual_window_frame.dart (1)

21-39: LGTM: per-instance flag + global gate is clear and safe.

The combined showCaption flag and WindowFrameConfig.showCaption check makes the caption rendering behavior explicit and easy to reason about.

lib/src/core/route/route.dart (1)

66-68: LGTM: global caption propagation through routes is consistent.

Passing WindowFrameConfig.showCaption in the route wrappers keeps the behavior aligned across navigation paths.

Also applies to: 98-101, 113-115, 145-147, 156-158

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

@GT-610 GT-610 merged commit 8201d47 into lollipopkit:main Jan 22, 2026
1 check passed
@GT-610 GT-610 deleted the fix/titlebar branch January 22, 2026 12:52
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.

关闭隐藏标题栏会导致出现双重标题栏

1 participant