Skip to content

Further improvements to tabs handling (add MoveTabToLeft / MoveTabToRight / MoveTabTo actions) - #1695

Merged
christianparpart merged 6 commits into
masterfrom
improvement/tabs
Jan 1, 2025
Merged

christianparpart merged 6 commits into
masterfrom
improvement/tabs

Conversation

@christianparpart

@christianparpart christianparpart commented Jan 1, 2025 •

Copy link
Copy Markdown
Member

initial support of moving tabs

@Yaraslaut I think we should give TerminalSession access to its owning list of tabs (TerminalSessionManager currently).

Maybe the name isn't the best, when thinking of tabs alone. In the long term, we might think of a tree data structure in order to implement tiling-like splits/pane views.

So whatever the DS / API will be, a leaf node (like a terminal session) should always have access to its parent node. What do you think? IMHO, this could also simplify the logic in the QML side (something I failed to revive in my head today)

Update

Changes:

  • add MoveTabToLeft / MoveTabToRight, MoveTabTo actions
  • ensure inserting new tab happens right next to the currently active tab
  • fixes CreateTab to sometimes not spawn more than one tab (fixed implicitly)

closes #1692
closes #1691

@github-actions github-actions Bot added the frontend Contour Terminal Emulator (GUI frontend) label Jan 1, 2025
@christianparpart christianparpart changed the title Further improvements to tabs handling Further improvements to tabs handling (add MoveTabToLeft / MoveTabToRight actions) Jan 1, 2025
@christianparpart
christianparpart marked this pull request as ready for review January 1, 2025 19:33
…o the left/right

Signed-off-by: Christian Parpart 
@christianparpart christianparpart changed the title Further improvements to tabs handling (add MoveTabToLeft / MoveTabToRight actions) Further improvements to tabs handling (add MoveTabToLeft / MoveTabToRight / MoveTabTo actions) Jan 1, 2025
…ous tab when only one tab is present :)

Signed-off-by: Christian Parpart 

@Yaraslaut Yaraslaut left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice, great changes
We can switch to internal handling of actions in another PR

@christianparpart
christianparpart merged commit 1083ac7 into master Jan 1, 2025
@christianparpart
christianparpart deleted the improvement/tabs branch January 1, 2025 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Contour Terminal Emulator (GUI frontend)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improved tab management: Prevent spam-spawning new tabs Improved tab management: move tabs & tab positioning at creation

2 participants