Skip to content
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

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

Merged
merged 6 commits into from
Jan 1, 2025

Conversation

christianparpart
Copy link
Member

@christianparpart christianparpart commented Jan 1, 2025

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
@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 <[email protected]>
Copy link
Member

@Yaraslaut Yaraslaut left a comment

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
30 checks passed
@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
2 participants