This Plugin is still under development so any help will be appreciated :)
Thank you for your interest in contributing! This document outlines how to get started, the project structure, and guidelines to follow.
# Clone the repo into your vault's plugins folder
cd <your-vault>/.obsidian/plugins/
git clone https://github.com/habibayman/Obsidian-chrome-tab-groups.git
cd Obsidian-chrome-tab-groups
# Install dependencies
npm install
# Start the dev build (watches for changes)
npm run devAfter building, reload Obsidian (Ctrl+R / Cmd+R) and enable the plugin in Settings → Community plugins.
src/
├── main.ts # Plugin entry point — lifecycle, commands, render loop
├── types.ts # Shared types, constants, and default data
├── GroupManager.ts # Core data model — CRUD for groups, persistence
├── DOMRenderer.ts # Idempotent DOM manipulation — chips, tab decorations
├── ContextMenu.ts # Right-click menu handler and modal dialogs
└── SettingsTab.ts # Plugin settings UI
styles.css # All plugin styles
manifest.json # Obsidian plugin manifest
esbuild.config.mjs # Build configuration
-
Create a branch from
mainfor your feature or fix:git checkout -b feat/my-feature
-
Make your changes in the
src/directory. -
Run the linter before committing:
npm run lint
-
Test manually in Obsidian:
- Create, rename, recolor, collapse, and delete groups.
- Test with multiple split panes.
- Reload Obsidian to verify persistence.
- Check that ungrouped tabs are unaffected.
-
Commit with a clear, descriptive message:
feat: add drag-and-drop reordering for group chips fix: prevent duplicate file paths when re-adding a tab -
Open a pull request against
main.
- All CSS lives in
styles.cssat the project root (not in TypeScript). - Prefix all class names with
tab-group-ortab-groups-to avoid collisions with Obsidian or other plugins. - Use CSS custom properties (
--tg-color) for dynamic theming.
- The
DOMRendereris idempotent — every call torender()strips all previous injections and rebuilds from scratch. Keep it that way. - Never cache DOM references across render cycles.
- Use
data-tg-*attributes for any metadata attached to tab headers.
GroupManagerowns all data mutations and persistence. Other modules should call its methods rather than modifyingdata.jsondirectly.DOMRenderershould have no side effects beyond the DOM. It should not callsave()or modify plugin data.ContextMenubridges user interaction to the manager and triggers re-renders via theonRendercallback.
When filing an issue, please include:
- Obsidian version and installer version (found in Settings → About)
- Plugin version
- Steps to reproduce
- Expected vs. actual behavior
- Console errors if any (
Ctrl+Shift+I→ Console tab)
Open an issue with the enhancement label. Describe:
- The use case or problem you're solving
- Your proposed solution
- Any alternatives you've considered
By contributing, you agree that your contributions will be licensed under the MIT License.