Skip to content

Commit a513ca8

Browse files
committed
fix(RainbowLayouts): disbaled for firefox -> tracking bugzilla
1 parent 8ab794c commit a513ca8

3 files changed

Lines changed: 23 additions & 2 deletions

File tree

.changeset/soft-experts-itch.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"amgiflol": patch
3+
---
4+
5+
fix: temp disable rainbow layouts for firefox

src/lib/modules/Toolbar/index.svelte

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
const trackersStore = getContext<TrackersStore>("trackersStore");
3030
const uiStore = getContext<UIStore>("uiStore");
3131
32+
const disableForFirefox = !import.meta.env.DEV &&
33+
import.meta.env.FIREFOX;
34+
3235
const trackers = trackersStore;
3336
3437
let designModePressed = $state(false);
@@ -208,9 +211,12 @@
208211
class="bg-neutral-200 -my-1 mx-1 w-0.5 self-stretch"
209212
/>
210213
<ToolbarAction
214+
disabled={disableForFirefox}
211215
pressed={uiStore.rainbowLayout.enabled}
212216
onPressedChange={uiStore.toggleRainbowLayout}
213-
label="Rainbow Layouts"
217+
label={disableForFirefox
218+
? "Chrome only for now!"
219+
: "Rainbow Layouts"}
214220
shortcut="6"
215221
>
216222
<Rainbow absoluteStrokeWidth class="size-6" />

src/lib/store/UIStore.svelte.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,13 @@ export class UIStore implements App.UIStore {
4343
this.toggleRainbowLayout = this.toggleRainbowLayout.bind(this);
4444
// Setup rainbow layout stylesheet
4545
this.rainbowLayout.css!.replace(rainbowLayoutCss);
46-
document.adoptedStyleSheets.push(this.rainbowLayout.css!);
46+
47+
// https://bugzilla.mozilla.org/show_bug.cgi?id=1751346
48+
// https://bugzilla.mozilla.org/show_bug.cgi?id=1817675
49+
// https://bugzilla.mozilla.org/show_bug.cgi?id=1928865
50+
if (!import.meta.env.FIREFOX) {
51+
document.adoptedStyleSheets.push(this.rainbowLayout.css!);
52+
}
4753

4854
$effect(() => {
4955
const cleanup = createMessageHandler("KEYDOWN", this.handleKeyDown);
@@ -145,6 +151,10 @@ export class UIStore implements App.UIStore {
145151
}
146152

147153
toggleRainbowLayout = () => {
154+
if (
155+
!import.meta.env.DEV &&
156+
import.meta.env.FIREFOX
157+
) return;
148158
this.rainbowLayout.css!.disabled = this.rainbowLayout.enabled;
149159
this.rainbowLayout.enabled = !this.rainbowLayout.enabled;
150160
};

0 commit comments

Comments
 (0)