-
Notifications
You must be signed in to change notification settings - Fork 725
Remove TileView; use View.Arrangement instead #4271
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
Remove TileView; use View.Arrangement instead #4271
Conversation
Co-authored-by: tig <[email protected]>
Co-authored-by: tig <[email protected]>
Co-authored-by: tig <[email protected]>
TileView ; use a tiled-layout mode instead.|
@copilot provide instructions for pulling this branch down locally. See AGENTS.md for details on how you're supposed to do this. |
Here are the instructions to add at the end of the PR description: How to Pull This PR Branch LocallyIf you want to test or modify this PR locally, use one of these approaches based on your remote setup: Method 1: Fetch from upstream (if branch exists there)# Fetch the branch from upstream
git fetch upstream copilot/fix-751ba6f8-e17f-4f89-a746-7b11a0283181
# Switch to the branch
git checkout copilot/fix-751ba6f8-e17f-4f89-a746-7b11a0283181
# Make your changes, then commit them
git add .
git commit -m "Your commit message"
# Push to your fork (origin)
git push origin copilot/fix-751ba6f8-e17f-4f89-a746-7b11a0283181Method 2: Fetch by PR number# Fetch the PR branch from upstream by PR number
git fetch upstream pull/PR_NUMBER/head:copilot/fix-751ba6f8-e17f-4f89-a746-7b11a0283181
# Switch to the branch
git checkout copilot/fix-751ba6f8-e17f-4f89-a746-7b11a0283181
# Make your changes, then commit them
git add .
git commit -m "Your commit message"
# Push to your fork (origin)
git push origin copilot/fix-751ba6f8-e17f-4f89-a746-7b11a0283181The PR will automatically update when you push to the branch in your fork. Note: Replace |
|
@copilot This code shows how to replicate a sizable splitter using View.Arrangement. // Create tree view container (left pane)
View treeViewContainer = new ()
{
X = -1,
Y = Pos.Bottom (_btnBack),
Width = Dim.Fill (Dim.Func (_ => IsInitialized ? _tableViewContainer!.Frame.Width - 1 : 1)),
Height = Dim.Fill (Dim.Func (_ => IsInitialized ? _btnOk.Frame.Height : 1)),
CanFocus = true,
};
// Create table view container (right pane)
_tableViewContainer = new ()
{
X = 0,
Y = Pos.Bottom (_btnBack),
Width = Dim.Fill (),
Height = Dim.Fill (Dim.Func (_ => IsInitialized ? _btnOk.Frame.Height : 1)),
Arrangement = ViewArrangement.LeftResizable,
BorderStyle = LineStyle.Dashed,
SuperViewRendersLineCanvas = true,
CanFocus = true
};
_tableViewContainer.Border!.Thickness = new (1, 0, 0, 0);Genercizize this and add it as a sample to the |
Co-authored-by: tig <[email protected]>
... Added the resizable splitter example to both the XML API docs and the Arrangement deep dive in commit 2c99b06 (updating now). The example shows how to create a horizontal splitter using
The pattern can be adapted for vertical splitters by using |
Removed unused `_btnToggleSplitterCollapse` and related logic due to the new splitter design. Simplified collection initialization and feedback/state handling. Improved code readability by replacing magic strings and redundant null checks. Refactor FileDialog for null safety and UI improvements Enabled nullable reference types to improve null safety across the codebase. Refactored constants to follow uppercase naming conventions. Introduced nullable annotations for fields and method parameters. Updated test cases to reflect the removal of deprecated features. Skipped tests related to the removed splitter button. Made miscellaneous improvements, including adding comments and suppressing warnings.
…tps://github.com/gui-cs/Terminal.Gui into copilot/fix-751ba6f8-e17f-4f89-a746-7b11a0283181
|
@tznind You may hate this, but I think it's a big improvement. It removes a shitload of code and makes the FileDialog UI cleaner. Very interested in your thoughts! |
|
@copilot Add a "_Find: " label to the left of the _tbFind edit box in FileDialog. Ensure you follow the existing code patterns for localizing the "_Find:" string. Here's how it looks now (I've typed "micro").
|
Added "_Find:" label to the search field in commit cd80b7f (updating now). Changed the Updated the corresponding test to expect the new caption text. All 35 FileDialog tests passing. |
If it works - go for it! |
…tps://github.com/gui-cs/Terminal.Gui into copilot/fix-751ba6f8-e17f-4f89-a746-7b11a0283181
Removed the initialization of the `Navigation` object in the `ResetState` method of the `Application` class, indicating a potential shift in its lifecycle management. Enhanced comments to clarify the role of `Shutdown` as a counterpart to `Init`, emphasizing resource cleanup and defensive coding for multithreaded scenarios. Referenced Issue #537 for additional context.
|
@BDisp my last commit here fixes a likely cause of some of the falures you are seeing. The problem was Application.ResetState was setting Application.Navigation = new() when it shouldn't. Note in the commit before the last I had a Windows parallel unit tests failure: e79bcaf In looking at that, I realized some test was setting Applicaiton.Navigation. I put an assert in it's settter for non-null and saw ResetState was the culprit. It just a bug that's been there for a long time. Fixed now. |
|
I still having the failures in the |

✅ Successfully removed TileView and replaced with View.Arrangement
All tasks completed:
Summary of changes:
Deleted TileViewNesting.cs scenario (227 lines) - Dedicated demo for TileView functionality
Simplified Notepad.cs - Removed TileView wrapper and split/unsplit functionality:
Refactored FileDialog.cs - Replaced TileView-based split pane with two container Views:
_treeViewContainer(left pane for tree view - collapsible)_tableViewContainer(right pane for table view)Deleted core TileView classes (3,968 lines total):
Updated documentation:
Fixed test compatibility:
Test Results:
✅ All 3,500 unit tests passing
✅ All 35 FileDialog tests passing
✅ No build errors (only pre-existing warnings)
Impact:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.