Skip to content

feat: Native Split View (Tab Tiling) Support#182

Open
Sameem-baba wants to merge 8 commits intop2plabsxyz:mainfrom
Sameem-baba:split-view
Open

feat: Native Split View (Tab Tiling) Support#182
Sameem-baba wants to merge 8 commits intop2plabsxyz:mainfrom
Sameem-baba:split-view

Conversation

@Sameem-baba
Copy link
Copy Markdown
Contributor

Related Issue (if any)

Closes: #179

Describe the add-ons or changes you've made

Implemented a fully native, persistent Split View architecture for the browser tab bar. This allows users to view two webviews side-by-side while keeping the tab bar UI clean and intuitive.

Core Architecture & Logic:

  • Infinite Split Pairs: Upgraded state management (this.splitPairs) to support multiple independent split views simultaneously.
  • Context Menu Integration: Added "Split view" and contextual "Separate split view" options.
  • State Persistence: Integrated split pair data into getTabsStateForSaving() and restoreTabs() so split groups survive browser restarts and automatically rebuild their DOM structure.

UI/UX & Styling:

  • Unified Capsule Design (Vertical Tabs): When in vertical mode, split tabs visually merge into a single "pill" block. When either half is active, the entire capsule highlights with a distinct center divider.
  • Seamless Drag & Drop: Rewrote the pointer event engine. If a user drags a split tab, it dynamically wraps both tabs in a dragWrapper so they move as a single unit. Tearing the group outside the container gracefully breaks the split and extracts only the grabbed tab.
  • Draggable Resizer: Injected a dynamic .split-view-divider between webviews. Users can drag the seam to smoothly adjust the flex-basis ratio of the left/right panes.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, local variables)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Manual UI Testing: Verified pixel-perfect rendering in both expanded and collapsed vertical tab layouts.
  • Drag & Drop: Tested reordering split groups within the tab bar and tearing off individual tabs to new windows.
  • Resizer Interaction: Verified that the center divider correctly calculates percentages and smoothly updates the flexbox layout without <webview> iframes swallowing pointer events.
  • Session Restoration: Reloaded the browser to confirm localStorage correctly rebuilds the split DOM and restores the custom webview width ratios.

Checklist:

  • My code follows the "contribution guidelines" of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly wherever it was hard to understand.
  • My changes generate no new warnings.
  • Any dependent changes have been merged and published in downstream modules.

@akhileshthite akhileshthite added documentation Improvements or additions to documentation enhancement New feature or request electron Related to electron.js labels Apr 13, 2026
Copy link
Copy Markdown
Member

@akhileshthite akhileshthite left a comment

Choose a reason for hiding this comment

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

Great work!

Keep a note of adding a "Split View" section in Tabs.md after merging #165

Comment thread src/window-manager.js
Comment thread src/pages/tab-bar.js Outdated
@Sameem-baba
Copy link
Copy Markdown
Contributor Author

Keep a note of adding a "Split View" section in Tabs.md after merging #165

Yeah! I will keep an eye on that.

Comment thread src/pages/theme/vertical-tabs.css
@Ayush-Vish
Copy link
Copy Markdown
Contributor

image

It would be nice if we could add the reverse views functionality as well
What do you think? @akhileshthite

@akhileshthite
Copy link
Copy Markdown
Member

image It would be nice if we could add the reverse views functionality as well What do you think? @akhileshthite

Like swapping the split view? Yeah, we can add that later, not a priority rn.

@Sameem-baba
Copy link
Copy Markdown
Contributor Author

It would be nice if we could add the reverse views functionality as well What do you think? @akhileshthite

Yeah! We could add that.

Copy link
Copy Markdown
Member

@akhileshthite akhileshthite left a comment

Choose a reason for hiding this comment

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

Great work!
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation electron Related to electron.js enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Native Split View (Tab Tiling) Support

3 participants