iris_firefox icon indicating copy to clipboard operation
iris_firefox copied to clipboard

Move Firefox properties out of core code and into FirefoxApp class

Open mwobensmith opened this issue 6 years ago • 2 comments

In the core API Settings class, we have a bunch of properties that apply only to Firefox. Since these are not relevant to the core project, they should go somewhere in the Firefox target. I suggest these go under firefox/firefox_app/fx_browser.py, inside FirefoxApp as static properties. Any imports would need to be updated as well.

I'm mainly referring to lines 52 and after, as well as 138-140:

    DEFAULT_SITE_LOAD_TIMEOUT = 30
    DEFAULT_HEAVY_SITE_LOAD_TIMEOUT = 90
    DEFAULT_KEY_SHORTCUT_DELAY = 0.1
    DEFAULT_UI_DELAY = 1
    DEFAULT_UI_DELAY_SHORT = 0.5
    DEFAULT_UI_DELAY_LONG = 2.5
    DEFAULT_SYSTEM_DELAY = 5
    DEFAULT_FIREFOX_TIMEOUT = 10
    DEFAULT_FX_PREFS = {(...)}

A few of these - such as DEFAULT_KEY_SHORTCUT_DELAY - might be seen as more general that just Firefox, but I am not sure if would just make sense to put them all in the same place if they are used together.

mwobensmith avatar Aug 12 '19 21:08 mwobensmith

Actually, we can probably just move these two to FirefoxSettings and leave the rest:

    DEFAULT_FIREFOX_TIMEOUT = 10
    DEFAULT_FX_PREFS = {...}

mwobensmith avatar Aug 16 '19 18:08 mwobensmith

These are browser specific:

    DEFAULT_SITE_LOAD_TIMEOUT = 30
    DEFAULT_HEAVY_SITE_LOAD_TIMEOUT = 90

tracywalker avatar Aug 16 '19 20:08 tracywalker