File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " amgiflol " : patch
3+ ---
4+
5+ fix: temp disable rainbow layouts for firefox
Original file line number Diff line number Diff line change 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 );
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" />
Original file line number Diff line number Diff 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 } ;
You can’t perform that action at this time.
0 commit comments