Commit fd94e00
committed
Bug 1971382 - allow dropping tabs into collapsed tab groups r=jswinarton,dao,desktop-theme-reviewers,tabbrowser-reviewers
Dragging a tab(s) and hovering it over a collapsed tab group label for a short duration will highlight the dragged tab(s) and the collapsed tab group label in order to indicate that dropping the tab(s) will put it into the group. Since the dragged tab is always the active tab, dropping the moving tab(s) into the collapsed tab group will cause the collapsed tab group to enter the "collapsed-but-with-active-tab" state.
If the active tab is in a collapsed tab group and you try to drag it, dropping the tab right away will drop it after the tab group. In order to "cancel" the operation and return the active tab to its prior position in the collapsed tab group, the user should drag the active tab back over the tab group label and hover over it until it highlights.
This patch leverages the approach of the "create group" functionality + visuals when hovering an ungrouped tab(s) over another. I made the functionality + visuals a bit more generic by referring to it as "grouping" behavior.
If tab group A is collapsed and contains the active tab, and if the user starts dragging tab group B, then the "overflow counter" of tab group A will disappear for the duration of the drag operation. It would be possible to keep that element visible, but it would require opting that element into all of the drag-drop animation logic. That's too large of a change to include in this patch.
Tab selection/tab activation can now cause a tab to appear or disappear if it's in a collapsed tab group, so the <tabs> element's cache of visible tab strip items needs to be updated if that happens.
Differential Revision: https://phabricator.services.mozilla.com/D2567451 parent 062a426 commit fd94e00
File tree
6 files changed
+315
-99
lines changed- browser
- components/tabbrowser
- content
- test/browser/tabs
6 files changed
+315
-99
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
229 | 231 | | |
230 | 232 | | |
231 | 233 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| 187 | + | |
187 | 188 | | |
188 | 189 | | |
189 | 190 | | |
| |||
7244 | 7245 | | |
7245 | 7246 | | |
7246 | 7247 | | |
| 7248 | + | |
| 7249 | + | |
| 7250 | + | |
| 7251 | + | |
| 7252 | + | |
7247 | 7253 | | |
7248 | 7254 | | |
7249 | 7255 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
163 | 164 | | |
164 | 165 | | |
165 | | - | |
| 166 | + | |
166 | 167 | | |
167 | 168 | | |
168 | 169 | | |
169 | 170 | | |
170 | 171 | | |
171 | 172 | | |
172 | 173 | | |
| 174 | + | |
173 | 175 | | |
174 | 176 | | |
175 | 177 | | |
| |||
257 | 259 | | |
258 | 260 | | |
259 | 261 | | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
260 | 265 | | |
261 | 266 | | |
262 | 267 | | |
263 | 268 | | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
264 | 272 | | |
265 | 273 | | |
266 | 274 | | |
| |||
370 | 378 | | |
371 | 379 | | |
372 | 380 | | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
373 | 384 | | |
374 | 385 | | |
375 | 386 | | |
376 | 387 | | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
377 | 402 | | |
378 | 403 | | |
379 | 404 | | |
| |||
392 | 417 | | |
393 | 418 | | |
394 | 419 | | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
395 | 434 | | |
396 | 435 | | |
397 | 436 | | |
| |||
502 | 541 | | |
503 | 542 | | |
504 | 543 | | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
505 | 547 | | |
506 | 548 | | |
507 | 549 | | |
| |||
0 commit comments