Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Commit f874e28

Browse files
authored
πŸ› Migration for disabling sidebar animations (#234)
* πŸ”¨ Add windows start script * πŸ› Migration for disabling sidebar animations * πŸ“ Update CHANGELOG.md
1 parent cdd1084 commit f874e28

File tree

3 files changed

+18
-13
lines changed

3 files changed

+18
-13
lines changed

β€ŽCHANGELOG.mdβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Fixed
1111

12+
- Migration for disabling sidebar animations (#234)
1213
- New tab button no longer follows OS style (#233, @surapunoyousei)
1314
- Download URL points to Pulse site (#235)
1415

β€Žpackage.jsonβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"bs": "pnpm build && pnpm start",
1616
"bus": "pnpm build:ui && pnpm start",
1717
"start": "pnpm clearStartupCache && gluon run",
18+
"start:win": "gluon run",
1819
"export": "gluon export-file",
1920
"imp": "gluon import",
2021
"clearProfile": "rm -rf engine/obj-x86_64-pc-linux-gnu/tmp/profile-default",

β€Žsrc/browser/base/content/browser-sidebar-js.patchβ€Ž

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/browser/base/content/browser-sidebar.js b/browser/base/content/browser-sidebar.js
2-
index 22c886b09373a38a4fbceb6d279a58f276675d63..5f840372c8c9bf366e98ee3646965aa361530fad 100644
2+
index 22c886b09373a38a4fbceb6d279a58f276675d63..ebc355c651fb48b9d6e7fc88e492783860a67c28 100644
33
--- a/browser/base/content/browser-sidebar.js
44
+++ b/browser/base/content/browser-sidebar.js
55
@@ -11,6 +11,9 @@ var SidebarUI = {
@@ -101,7 +101,7 @@ index 22c886b09373a38a4fbceb6d279a58f276675d63..5f840372c8c9bf366e98ee3646965aa3
101101
/**
102102
* @type {MutationObserver | null}
103103
*/
104-
@@ -112,20 +160,77 @@ var SidebarUI = {
104+
@@ -112,20 +160,80 @@ var SidebarUI = {
105105
this.toggleSwitcherPanel();
106106
});
107107

@@ -141,6 +141,9 @@ index 22c886b09373a38a4fbceb6d279a58f276675d63..5f840372c8c9bf366e98ee3646965aa3
141141
+ this.createBrowser("sidebar");
142142
+ }
143143
+
144+
+ // Temporary migration for 1.0.0-a.61
145+
+ this._box.style.marginLeft = 'unset';
146+
+
144147
+ this.loadedSidebars = [];
145148
+
146149
this._inited = true;
@@ -180,7 +183,7 @@ index 22c886b09373a38a4fbceb6d279a58f276675d63..5f840372c8c9bf366e98ee3646965aa3
180183

181184
if (this._box.hasAttribute("positionend")) {
182185
xulStore.persist(this._box, "positionend");
183-
@@ -157,7 +262,7 @@ var SidebarUI = {
186+
@@ -157,7 +265,7 @@ var SidebarUI = {
184187
/**
185188
* The handler for Services.obs.addObserver.
186189
**/
@@ -189,7 +192,7 @@ index 22c886b09373a38a4fbceb6d279a58f276675d63..5f840372c8c9bf366e98ee3646965aa3
189192
switch (topic) {
190193
case "intl:app-locales-changed": {
191194
if (this.isOpen) {
192-
@@ -168,6 +273,54 @@ var SidebarUI = {
195+
@@ -168,6 +276,54 @@ var SidebarUI = {
193196
this.showInitially(this.lastOpenedId);
194197
break;
195198
}
@@ -244,7 +247,7 @@ index 22c886b09373a38a4fbceb6d279a58f276675d63..5f840372c8c9bf366e98ee3646965aa3
244247
}
245248
}
246249
},
247-
@@ -284,17 +437,32 @@ var SidebarUI = {
250+
@@ -284,17 +440,32 @@ var SidebarUI = {
248251
// First reset all ordinals to match DOM ordering.
249252
let browser = document.getElementById("browser");
250253
[...browser.children].forEach((node, i) => {
@@ -282,7 +285,7 @@ index 22c886b09373a38a4fbceb6d279a58f276675d63..5f840372c8c9bf366e98ee3646965aa3
282285
// Indicate we've switched ordering to the box
283286
this._box.setAttribute("positionend", true);
284287
} else {
285-
@@ -483,6 +651,10 @@ var SidebarUI = {
288+
@@ -483,6 +654,10 @@ var SidebarUI = {
286289
},
287290

288291
_loadSidebarExtension(commandID) {
@@ -293,23 +296,23 @@ index 22c886b09373a38a4fbceb6d279a58f276675d63..5f840372c8c9bf366e98ee3646965aa3
293296
let sidebar = this.sidebars.get(commandID);
294297
let { extensionId } = sidebar;
295298
if (extensionId) {
296-
@@ -521,6 +693,7 @@ var SidebarUI = {
299+
@@ -521,6 +696,7 @@ var SidebarUI = {
297300
}
298301

299302
this._fireFocusedEvent();
300303
+ this.loadedSidebars.push(commandID);
301304
return true;
302305
});
303306
},
304-
@@ -544,6 +717,7 @@ var SidebarUI = {
307+
@@ -544,6 +720,7 @@ var SidebarUI = {
305308
}
306309
return this._show(commandID).then(() => {
307310
this._loadSidebarExtension(commandID);
308311
+ this.loadedSidebars.push(commandID);
309312
return true;
310313
});
311314
},
312-
@@ -557,6 +731,38 @@ var SidebarUI = {
315+
@@ -557,6 +734,38 @@ var SidebarUI = {
313316
*/
314317
_show(commandID) {
315318
return new Promise(resolve => {
@@ -348,7 +351,7 @@ index 22c886b09373a38a4fbceb6d279a58f276675d63..5f840372c8c9bf366e98ee3646965aa3
348351
this.selectMenuItem(commandID);
349352

350353
this._box.hidden = this._splitter.hidden = false;
351-
@@ -574,7 +780,13 @@ var SidebarUI = {
354+
@@ -574,7 +783,13 @@ var SidebarUI = {
352355
this.observeTitleChanges(sourceL10nEl);
353356
this.browser.setAttribute("src", url); // kick off async load
354357

@@ -363,7 +366,7 @@ index 22c886b09373a38a4fbceb6d279a58f276675d63..5f840372c8c9bf366e98ee3646965aa3
363366
this.browser.addEventListener(
364367
"load",
365368
event => {
366-
@@ -618,12 +830,19 @@ var SidebarUI = {
369+
@@ -618,12 +833,19 @@ var SidebarUI = {
367370
// create a new content viewer because the old one doesn't get destroyed
368371
// until about:blank has loaded (which does not happen as long as the
369372
// element is hidden).
@@ -385,7 +388,7 @@ index 22c886b09373a38a4fbceb6d279a58f276675d63..5f840372c8c9bf366e98ee3646965aa3
385388
let selBrowser = gBrowser.selectedBrowser;
386389
selBrowser.focus();
387390
if (triggerNode) {
388-
@@ -636,10 +855,27 @@ var SidebarUI = {
391+
@@ -636,10 +858,27 @@ var SidebarUI = {
389392
* none if the argument is an empty string.
390393
*/
391394
selectMenuItem(commandID) {
@@ -414,7 +417,7 @@ index 22c886b09373a38a4fbceb6d279a58f276675d63..5f840372c8c9bf366e98ee3646965aa3
414417
if (id == commandID) {
415418
menu.setAttribute("checked", "true");
416419
if (triggerbutton) {
417-
@@ -655,6 +891,107 @@ var SidebarUI = {
420+
@@ -655,6 +894,107 @@ var SidebarUI = {
418421
}
419422
}
420423
},

0 commit comments

Comments
Β (0)