Skip to content

Commit db624d3

Browse files
authored
Merge pull request #56 from malston/feature/popup-ux-sections
feat: Improve popup UX with section headers and compact design
2 parents b28105a + 4da00b7 commit db624d3

File tree

5 files changed

+145
-67
lines changed

5 files changed

+145
-67
lines changed

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![CI](https://github.com/malston/chrome-tabs/actions/workflows/ci.yml/badge.svg)](https://github.com/malston/chrome-tabs/actions/workflows/ci.yml)
44
[![Coverage](.github/coverage-badge.svg)](https://github.com/malston/chrome-tabs/actions/workflows/ci.yml)
55

6-
Chrome extension for managing tabs: organize by domain, remove duplicates, and save to bookmarks.
6+
Chrome extension for managing tabs: organize by category or domain, remove duplicates, and save to bookmarks.
77

88
Built for those of us that always have way too many tabs and windows open. Instead of having to manually create multiple Chrome tab groups, Tab Manager automates the groupings. You can then rename, color label, and more via the default Chrome group manager if desired.
99

@@ -110,41 +110,41 @@ See [chrome-extension/README.md](chrome-extension/README.md) for detailed instru
110110

111111
## Usage
112112

113-
### Organize Tabs by Domain
113+
### Organize Tabs by Category
114114

115115
**Use the Chrome Extension**:
116116

117117
1. Click the Tab Organizer icon in your toolbar
118-
2. Click "Organize by Domain"
119-
3. Done! All tabs grouped automatically
118+
2. Click "Organize by Category"
119+
3. Done! All tabs grouped by category
120120

121121
Example result:
122122

123-
- `github.com (25)` - All GitHub tabs
124-
- `acme.com (24)` - All acme.com tabs
125-
- `local-network (7)` - All lab IPs
123+
- `Development (32)` - GitHub, Stack Overflow, localhost tabs
124+
- `Documentation (18)` - All docs sites
125+
- `Social Media (12)` - Twitter, LinkedIn, Reddit tabs
126+
- `Shopping (8)` - Amazon, eBay tabs
126127

127-
### Organize Tabs by Category
128+
### Organize Tabs by Domain
128129

129130
**Use the Chrome Extension**:
130131

131132
1. Click the Tab Organizer icon in your toolbar
132-
2. Click "Organize by Category"
133-
3. Done! All tabs grouped by category
133+
2. Click "Organize by Domain"
134+
3. Done! All tabs grouped automatically
134135

135136
Example result:
136137

137-
- `Development (32)` - GitHub, Stack Overflow, localhost tabs
138-
- `Documentation (18)` - All docs sites
139-
- `Social Media (12)` - Twitter, LinkedIn, Reddit tabs
140-
- `Shopping (8)` - Amazon, eBay tabs
138+
- `github.com (25)` - All GitHub tabs
139+
- `acme.com (24)` - All acme.com tabs
140+
- `local-network (7)` - All lab IPs
141141

142142
### Organize All Windows
143143

144144
**Consolidate tabs from all Chrome windows into the current window**:
145145

146146
1. Click the Tab Organizer icon in your toolbar
147-
2. Click "Organize All Windows by Domain" or "Organize All Windows by Category"
147+
2. Under "All Active Windows", click "Organize by Domain" or "Organize by Category"
148148
3. Done! Tabs from all windows are moved to the current window and grouped
149149

150150
This is useful when you have tabs scattered across multiple Chrome windows. The extension will:

chrome-extension/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"manifest_version": 3,
33
"name": "Tab Organizer",
44
"version": "1.4.0",
5-
"description": "Automatically organize tabs by domain with one click",
5+
"description": "Automatically organize tabs by category or domain with one click",
66
"permissions": [
77
"tabs",
88
"tabGroups",

chrome-extension/src/popup/popup.html

Lines changed: 125 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@
55
<title>Tab Organizer</title>
66
<style>
77
:root {
8+
/* Spacing */
9+
--spacing-xs: 4px;
10+
--spacing-sm: 6px;
11+
--spacing-md: 8px;
12+
--spacing-lg: 10px;
13+
--spacing-xl: 12px;
14+
--spacing-2xl: 16px;
15+
16+
/* Font sizes */
17+
--font-size-xs: 9px;
18+
--font-size-sm: 10px;
19+
--font-size-md: 11px;
20+
--font-size-base: 12px;
21+
--font-size-lg: 13px;
22+
--font-size-xl: 16px;
23+
824
/* Light mode colors (default) */
925
--bg-primary: #ffffff;
1026
--bg-secondary: #f8f9fa;
@@ -14,8 +30,8 @@
1430
--border-color: #e8eaed;
1531
--primary-color: #1a73e8;
1632
--primary-hover: #1557b0;
17-
--secondary-bg: #f1f3f4;
18-
--secondary-hover: #e8eaed;
33+
--secondary-bg: #34a853;
34+
--secondary-hover: #2d9249;
1935
--status-bg: #e8f0fe;
2036
--success-bg: #e6f4ea;
2137
--success-text: #137333;
@@ -34,8 +50,8 @@
3450
--border-color: #5f6368;
3551
--primary-color: #8ab4f8;
3652
--primary-hover: #aecbfa;
37-
--secondary-bg: #3c4043;
38-
--secondary-hover: #5f6368;
53+
--secondary-bg: #81c995;
54+
--secondary-hover: #a8dab5;
3955
--status-bg: #394457;
4056
--success-bg: #1e3a2f;
4157
--success-text: #81c995;
@@ -46,27 +62,27 @@
4662
}
4763

4864
body {
49-
width: 300px;
50-
padding: 16px;
65+
width: 280px;
66+
padding: var(--spacing-xl);
5167
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
5268
margin: 0;
5369
background-color: var(--bg-primary);
5470
color: var(--text-primary);
5571
}
5672

5773
h1 {
58-
font-size: 18px;
59-
margin: 0 0 16px 0;
74+
font-size: var(--font-size-xl);
75+
margin: 0 0 var(--spacing-md) 0;
6076
color: var(--text-primary);
6177
}
6278

6379
button {
6480
width: 100%;
65-
padding: 12px;
66-
margin-bottom: 8px;
81+
padding: var(--spacing-md);
82+
margin-bottom: var(--spacing-xs);
6783
border: none;
68-
border-radius: 4px;
69-
font-size: 14px;
84+
border-radius: var(--spacing-xs);
85+
font-size: var(--font-size-lg);
7086
font-weight: 500;
7187
cursor: pointer;
7288
transition: background-color 0.2s;
@@ -89,19 +105,25 @@
89105

90106
.secondary {
91107
background-color: var(--secondary-bg);
92-
color: var(--text-primary);
108+
color: #ffffff;
93109
}
94110

95111
.secondary:hover {
96112
background-color: var(--secondary-hover);
97113
}
98114

115+
@media (prefers-color-scheme: dark) {
116+
.secondary {
117+
color: #202124;
118+
}
119+
}
120+
99121
.status {
100-
margin-top: 16px;
101-
padding: 12px;
122+
margin-top: var(--spacing-md);
123+
padding: var(--spacing-md);
102124
background-color: var(--status-bg);
103-
border-radius: 4px;
104-
font-size: 13px;
125+
border-radius: var(--spacing-xs);
126+
font-size: var(--font-size-base);
105127
display: none;
106128
color: var(--text-primary);
107129
}
@@ -121,41 +143,77 @@
121143
}
122144

123145
.footer {
124-
margin-top: 16px;
125-
padding-top: 16px;
146+
margin-top: var(--spacing-md);
147+
padding-top: var(--spacing-md);
126148
border-top: 1px solid var(--border-color);
127-
font-size: 12px;
149+
font-size: var(--font-size-md);
128150
color: var(--text-secondary);
129151
text-align: center;
130152
}
131153

154+
.section-header {
155+
font-size: var(--font-size-sm);
156+
font-weight: 600;
157+
text-transform: uppercase;
158+
letter-spacing: 0.5px;
159+
color: var(--text-secondary);
160+
margin: var(--spacing-2xl) 0 var(--spacing-sm) 0;
161+
padding-bottom: 2px;
162+
border-bottom: 1px solid var(--border-color);
163+
}
164+
165+
.section-header:first-of-type {
166+
margin-top: 0;
167+
}
168+
169+
.subsection-header {
170+
font-size: var(--font-size-xs);
171+
font-weight: 500;
172+
text-transform: uppercase;
173+
letter-spacing: 0.3px;
174+
color: var(--text-secondary);
175+
margin: var(--spacing-md) 0 var(--spacing-xs) 0;
176+
opacity: 0.8;
177+
}
178+
179+
.settings-link {
180+
display: inline;
181+
color: var(--primary-color);
182+
text-decoration: none;
183+
font-size: var(--font-size-md);
184+
}
185+
186+
.settings-link:hover {
187+
text-decoration: underline;
188+
}
189+
132190
.bookmark-selector {
133-
margin-top: 16px;
134-
padding: 16px;
191+
margin-top: var(--spacing-lg);
192+
padding: var(--spacing-lg);
135193
background-color: var(--bg-secondary);
136-
border-radius: 4px;
194+
border-radius: var(--spacing-xs);
137195
border: 1px solid var(--border-color);
138196
}
139197

140198
.bookmark-selector h2 {
141-
font-size: 14px;
142-
margin: 0 0 12px 0;
199+
font-size: var(--font-size-lg);
200+
margin: 0 0 var(--spacing-md) 0;
143201
color: var(--text-primary);
144202
}
145203

146204
.bookmark-selector select {
147205
width: 100%;
148-
padding: 8px;
206+
padding: var(--spacing-sm);
149207
border: 1px solid var(--border-color);
150-
border-radius: 4px;
151-
font-size: 13px;
152-
margin-bottom: 12px;
208+
border-radius: var(--spacing-xs);
209+
font-size: var(--font-size-base);
210+
margin-bottom: var(--spacing-md);
153211
background-color: var(--select-bg);
154212
color: var(--text-primary);
155213
}
156214

157215
.bookmark-selector select option {
158-
padding: 8px;
216+
padding: var(--spacing-md);
159217
background-color: var(--select-bg);
160218
color: var(--text-primary);
161219
}
@@ -173,32 +231,40 @@
173231

174232
.selector-buttons {
175233
display: flex;
176-
gap: 8px;
234+
gap: var(--spacing-md);
177235
}
178236

179237
.selector-buttons button {
180238
flex: 1;
181239
margin-bottom: 0;
182240
}
241+
242+
.selector-label {
243+
font-size: var(--font-size-md);
244+
display: block;
245+
margin-bottom: var(--spacing-xs);
246+
}
247+
248+
.protected-groups-container {
249+
max-height: 150px;
250+
overflow-y: auto;
251+
margin-bottom: var(--spacing-xl);
252+
}
183253
</style>
184254
</head>
185255
<body>
186256
<h1>Tab Organizer</h1>
187257

188-
<button id="organizeBtn" class="primary">
189-
Organize by Domain
190-
</button>
258+
<div class="section-header" role="heading" aria-level="2">Current Window</div>
259+
260+
<div class="subsection-header" role="heading" aria-level="3">Manage Tabs</div>
191261

192262
<button id="organizeCategoryBtn" class="primary">
193263
Organize by Category
194264
</button>
195265

196-
<button id="organizeAllWindowsBtn" class="primary">
197-
Organize All Windows by Domain
198-
</button>
199-
200-
<button id="organizeAllWindowsCategoryBtn" class="primary">
201-
Organize All Windows by Category
266+
<button id="organizeBtn" class="primary">
267+
Organize by Domain
202268
</button>
203269

204270
<button id="dedupeBtn" class="primary">
@@ -213,6 +279,8 @@ <h1>Tab Organizer</h1>
213279
Restore from Bookmarks
214280
</button>
215281

282+
<div class="subsection-header" role="heading" aria-level="3">Manage Groups</div>
283+
216284
<button id="combineGroupsBtn" class="secondary">
217285
Combine Groups
218286
</button>
@@ -225,6 +293,18 @@ <h1>Tab Organizer</h1>
225293
Remove All Groups
226294
</button>
227295

296+
<div class="section-header" role="heading" aria-level="2">All Active Windows</div>
297+
298+
<div class="subsection-header" role="heading" aria-level="3">Manage Tabs</div>
299+
300+
<button id="organizeAllWindowsCategoryBtn" class="primary">
301+
Organize by Category
302+
</button>
303+
304+
<button id="organizeAllWindowsBtn" class="primary">
305+
Organize by Domain
306+
</button>
307+
228308
<div id="status" class="status"></div>
229309

230310
<div id="bookmarkSelector" class="bookmark-selector" style="display: none;">
@@ -238,9 +318,9 @@ <h2>Select Bookmark Folder</h2>
238318

239319
<div id="combineGroupsSelector" class="bookmark-selector" style="display: none;">
240320
<h2>Combine Tab Groups</h2>
241-
<label for="sourceGroupSelect" style="font-size: 13px; display: block; margin-bottom: 4px;">Merge these groups (Cmd/Ctrl+click for multiple):</label>
321+
<label for="sourceGroupSelect" class="selector-label">Merge these groups (Cmd/Ctrl+click for multiple):</label>
242322
<select id="sourceGroupSelect" size="4" multiple></select>
243-
<label for="targetGroupSelect" style="font-size: 13px; display: block; margin-bottom: 4px;">Into this group:</label>
323+
<label for="targetGroupSelect" class="selector-label">Into this group:</label>
244324
<select id="targetGroupSelect" size="4"></select>
245325
<div class="selector-buttons">
246326
<button id="combineSelectedBtn" class="primary">Combine</button>
@@ -250,7 +330,7 @@ <h2>Combine Tab Groups</h2>
250330

251331
<div id="protectGroupSelector" class="bookmark-selector" style="display: none;">
252332
<h2>Protect Tab Groups</h2>
253-
<label for="protectGroupSelect" style="font-size: 13px; display: block; margin-bottom: 4px;">Select groups to protect (Cmd/Ctrl+click for multiple):</label>
333+
<label for="protectGroupSelect" class="selector-label">Select groups to protect (Cmd/Ctrl+click for multiple):</label>
254334
<select id="protectGroupSelect" size="4" multiple></select>
255335
<div class="selector-buttons">
256336
<button id="protectSelectedBtn" class="primary">Protect</button>
@@ -260,16 +340,14 @@ <h2>Protect Tab Groups</h2>
260340

261341
<div id="protectedGroupsList" class="bookmark-selector" style="display: none;">
262342
<h2>Protected Groups</h2>
263-
<div id="protectedGroupsContainer" style="max-height: 150px; overflow-y: auto; margin-bottom: 12px;"></div>
343+
<div id="protectedGroupsContainer" class="protected-groups-container"></div>
264344
<div class="selector-buttons">
265345
<button id="closeProtectedListBtn" class="secondary">Close</button>
266346
</div>
267347
</div>
268348

269349
<div class="footer">
270-
Organize and deduplicate tabs
271-
<br>
272-
<a href="#" id="settingsLink" style="color: #1a73e8; text-decoration: none;">Category Settings</a>
350+
<a href="#" id="settingsLink" class="settings-link">Category Settings</a>
273351
</div>
274352

275353
<script src="popup.js"></script>

0 commit comments

Comments
 (0)