pharo-project / pharo-launcher

Lets you manage your pharo images and download new ones
https://pharo-project.github.io/pharo-launcher/
MIT License
108 stars 46 forks source link

Proxy settings not applied through settings screen #541

Closed TwiggyWan closed 2 years ago

TwiggyWan commented 2 years ago

Describe the bug I am not able to save proxy settings through the GUI.

To Reproduce

  1. Be behind a working http proxy with a port different than 80
  2. Go to Settings > proxy -> check 'Use HTTP Proxy' and fill port/address
  3. Click Store settings
  4. Click 'New' on top left of top toolbar
  5. Go back to proxy settings UI

Expected behavior On step 3 -> I expect the proxy to work and display the menu where I can choose what image to download. What I got: PhlDownloadError

On step 4 -> I expect to see my proxy settings I entered in step 1 What I got: default settings

Screenshots Step 1: image

Step 3 result: image

Step 4 result: image

If applicable, add screenshots to help explain your problem.

Version information:

Expected development cost

As you know nothing happens magically, so do you have an idea of the development effort required? Between 1 hour and 1 week In addition, are you willing to help because after all Pharo is yours too? No, I am there to learn Pharo through the MOOC, then maybe contribute once I complete it.

Additional context I downloaded Pharo launcher in my home directory where I have correct permissions.

I can circumvent the problem by writing inside ~/.config/pharo-launcher/settings.ston

StoredSetting {
        #settingNodeIdentifier : '#pharoLauncher#useHTTPProxy',
        #realValue : true
    },
    StoredSetting {
        #settingNodeIdentifier : '#useHTTPProxy#httpProxyPort',
        #realValue : 8080
    },
    StoredSetting {
        #settingNodeIdentifier : '#useHTTPProxy#httpProxyServer',
        #realValue : '10.MY.IPV4.PROXY'
    },

When I do that, upon launching pharo launcher, the proxy is disabled (check box unticked), however when I tick it the port and address are correctly set and work correctly.

demarey commented 2 years ago

Hi,

I can see on the screenshot that the text entered in the settings (server and port) are not saved (top-right corner is orange). You need to do CTRL+S to save the text so that the setting is saved. Could you confirm it fixes your problem?

TwiggyWan commented 2 years ago

Hi @demarey

I can see on the screenshot that the text entered in the settings (server and port) are not saved (to-right corner is orange). when i save the settings > close the settings > click new -> it now works OK.

In my opinion this is horrible UI design and deserves to be considered as a bug, especially with a big 'store settings' button on the settings browser.

No way someone not used to pharo (like me) will understand what the orange triangle means, especially not since pharo-launcher is most likely their entry point into the pharo world.

Could you confirm it fixes your problem?

Not really as the settings are not persistant. If I close pharo-launcher then re-open it I must go back to the settings and check again 'use http proxy', and only then do my previous port and server fields show up.

I would expect the proxy checkbox to stay checked over restarts.

demarey commented 2 years ago

I just committed a fix: Settings UI was not showing stored settings but they were already loaded. The fix will now display loaded values in the Settings Browser. Concerning the horrible UI design of the settings browser, I agree. It is what we have in Pharo for now but it has to be rewritten. A double save (field + export) is not user friendly. Fields should do auto-accept. PharoLauncher will take advantage of the new settings browser once available.

If it is ok for you, I propose to close the issue and maybe open a new one specific to the settings browser rewrite.

TwiggyWan commented 2 years ago

Sounds awesome. Thank you very much!