Skip to content

Conversation

@Berrysoft
Copy link
Member

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the TabViewItem initialization API to no longer require a parent TabView reference during creation. Instead, tab items are created independently and the parent relationship is established when the item is inserted into a TabView.

Key changes:

  • Changed TabViewItem::Init from &'a TabView to (), allowing tab items to be created without a parent reference
  • Updated all platform implementations (WinUI, Win32, Qt, GTK, AppKit) to support deferred parent assignment
  • Modified example code to pass () instead of &*tabview when initializing tab view items

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
winio/src/widgets/tab_view.rs Changed TabViewItem component initialization to accept () instead of &'a TabView
winio/src/stub/ui/tab_view.rs Updated stub implementation signature to remove parent parameter
winio/examples/widgets.rs Updated all page initializations to pass () and removed unused sender parameter and unnecessary redraw message
winio/examples/subviews/*.rs Updated all subview components to accept () initialization and changed parameter names from tabview to _init
winio-ui-winui/src/ui/tab_view.rs Refactored to use RefCell<Option<>> for deferred parent assignment and added parent tracking in views vector
winio-ui-win32/src/ui/tab_view.rs Added validation checks for duplicate insertions and implemented parent reparenting using SetParent to HWND_MESSAGE
winio-ui-qt/src/ui/tab_view.rs Removed parent parameter from new() function
winio-ui-gtk/src/ui/tab_view.rs Removed parent parameter from new() function
winio-ui-app-kit/src/ui/tab_view.rs Changed to acquire MainThreadMarker directly instead of from parent

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

@Berrysoft Berrysoft merged commit 38a456c into master Dec 6, 2025
16 checks passed
@Berrysoft Berrysoft deleted the dev/tabviewitem-parent branch December 6, 2025 16:49
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