-
Notifications
You must be signed in to change notification settings - Fork 18
Settings page: add UI controls for common settings from config file #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is a great point! Just throwing an idea to the air: what if we developed some kind of system that transformed a JSON into a form so we could have every option in a more "usable" way? Although, I recognize that that idea may not be the best because the form could get really complicated due to the nesting level we can find on the configuration.
I think so, and just like you said, it could be hidden under a button saying "Advanced Mode" or even "More Configuration". The user could even enable that mode by default checking a checkbox for example. |
I was thinking about "Advanced Mode" and I realized that personally, I would rather edit raw JSON than edit a huuge nested form. For some reason raw JSON feels like a less of a cognitive load to me, but maybe I just can't imagine a good HTML form for this :) I am not saying this can't be done "right" at some point in future, but I feel we should focus on "Basic Mode" first, which will be displayed by default. Some related thoughts:
|
https://hjson.org/ has been mentioned as a lib for letting humans edit a friendlier json-like thing. |
WebUI allows you to modify the IPFS node config. Desktop and Companion have to deal with app specific settings and also let the user modify the IPFS node config as well. We need to think about how that comes across to the user. We can keep app settings and node config separate, but we should aim to present them as sections of the same page in the UI. Companion calls it "Open preferences", while Desktop calls it "Settings". WebUI referes to the Node Config. We should agree the naming, and review the settings that each provide. |
I think Desktop and Companion could simply link to WebUI's page to edit the settings. And yes, we should define a name. |
I'm leaning towards naming it "Settings" screen (a subset of entire "Configuration"). While we can delegate a lot, each app will always have a small set of app-specific settings that do not belong to WebUI. For example: control if Desktop autostarts with system, customize default public gateway used by Companion etc. At the end of "Settings" screen, after app-specific things there should be button to "Open IPFS Node Settings". It could just link to WebUI screen that enables user to change selected node settings via dedicated UI (or just let user to edit raw Config directly, like it does now). This way there is no duplication of Settings, there is always one place to change specific setting. ps. here is a flowchart from old Android Design Guidelines on what becomes a setting and what doesn’t: |
@lidel I love this flowchart. I have to keep it for future! <3
I think that every application should have its own settings. Some small settings can be specific only for this application :)
About the name - "Settings" will be the best and the least confusing.
Strongly agree, it will be good for the start and name "Advanced Mode" in my opinion will be the most recognizable by users.
Like it! 👍
StorageMax in gigabytes - In my opinion an intuitive interface for this is our "must-have". |
For app specific "settings" most apps I have installed on my macOS have gone with "Preferences" I suspect there will be app specific settings to the WebUI as well. We could add a hook to allow wrappers like desktop/companion to add their app specific settings below/above WebUI settings? I suggest that "Node Configuration" is one of the items on our WebUI settings page. Following the lead of Atom/Sublime etc. I'm in favour of pulling out common/beginner friendly node config options into easy to update and validate HTML form elements and having a button that opens up "advanced mode" edit-the-JSON for pros. In addition to @lidel's list of options to expose we should consider checkboxes for enabling the experiments. |
@akrych I think what we want is Simple controls for:
And then:
... right now Set repo size quota in MB is difficult, as it's only a hint to ipfs, and if garbage collection is disabled, the repo (i believe) will grow beyond that value. Also I'm not aware of any web api to get the users total available disk space, so we can't offer any sensible max value for that control, until we can get the ipfs api to tell us. @lidel is that about right? We should think about
I think we want webui to be something we can point at different ipfs instances, so we need to think about the different use cases "i want to point my webui at that remote ipfs node" and "i want to update the api and gateway config of the ipfs node I'm currently using" as the latter would need special handling... changing the API address when the webui is using the API. |
Some additional thoughts on what is currently technically possible:
|
If we phrase this as "Find IPFS peers on your local network" then it'd be more comprehensible
Good idea. I think the profiles available right now are pretty niche interest. It'd rad to figure out some profiles for the travelling laptop based dev, and the low spec local library desktop. |
There is a discussion about controlling content reproviding setting via browser extension. I feel uses raised there are important enough to provide this as one of Simple Controls in WebUI as well. |
See also:
|
Settings page design proposal (pulled from https://projects.invisionapp.com/share/AVGRKKJ75KT#/screens/302169242_Settings_screen |
I was working on a script to map a checkbox to a JSON element, but I'm not finished yet. I'll publish it on Gist when I'm finished. |
The one problem I have with this is the "What is IPFS?" box. You could instead fit a second column of settings. |
Current state of my script: https://gist.github.com/bleonard252/528acbc7f954603c192f8745c5e5abda The demo saves to local storage, but for some reason no updates are made (testing on Firefox). In this situation you would configure the "January" attribute to the configuration element. If there are problems with my script, please let me know in its comments. |
Proposing we wake this discussion up and make it real ... |
I had an opportunity to talk with enthusiastic non-technical person and she asked interesting question: "sounds cool, but after I install it, how can I control how much disk space IPFS can use?".
AFAIK right now one can set StorageMax via commandline or by editing JSON at http://127.0.0.1:5001/webui/#/config:
I think we can agree that editing JSON by hand is.. not the best UX :) There is a real need for simplified and intuitive UI for setting selected configuration keys,
StorageMax
being the most obvious one,Gateway
port being another one. Less is more. It is ok to have UI only with a few settings, leaving the rest to commandline or "Advanced Mode".Open Questions
Which configuration keys should have UI for setting them?
What is most likely changed after installation?
Should we leave option to edit full config in JSON format?
Perhaps it could be initially hidden under a button saying "Advanced Mode" or something like that.
The text was updated successfully, but these errors were encountered: