-
Notifications
You must be signed in to change notification settings - Fork 489
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
feat: IPFS experiments UI #1048
Conversation
Notes: there are a couple of dummy experiments included and |
@hacdias I'm not sure how I should call out to enable |
Heeey! You can use |
@cwaring I'll review today, but just wanted to say that this is looking really nice! |
yeah it's a tricky one. I mean if the user reloaded the app or browser window then they could activate again but that may not be immediately obvious. perhaps something to revisit later on. what might be helpful in determining this is if we wire in analytics to monitor enable/disable and time it took to activate an experiment. |
I guess that would be a good idea, to add the analytics. Could you do that, please? If you don't have much time, I can take a look |
I'm a bit pushed for time as I need to jump back onto camp but I can take a look early next week if you don't get chance before then :) |
I'll do that today then hahaha. It'd be awesome to perhaps merge this today, or this week at most. |
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
@cwaring it should only track the time to perform the operation. I'm not sure how to include the experiment here though. I'm not really well aware of how the analytics work |
In it's current form, the analytics bundle will just record that an experiment was toggled, but not which one, as it only records the action type. We are deliberately extra cautious in the analytics bundle to be very explicit about what is tracked, so we can give the user a clear answer on what is and isn't tracked. Either we create an action per experiement, or we add custom logic into the analytics bundle for the experiments action to modify the action name to include the experiment name, here https://github.com/ipfs-shipyard/ipfs-webui/blob/babbb6d2d2e742df50fd169d5c5066cc9e2fc546/src/bundles/analytics.js#L109-L113 |
@olizilla great, we have a key in the action payload so it should be possible to pick that up here |
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
@daviddias that's definitely an interesting idea. I just wonder how it'd scale - we only have three visible sides of the IPFS cube and we might introduce more experiments or even JS-IPFS support. I've been wanting to make some changes to IPFS Desktop's icon so perhaps this is a good time to raise an issue there. Done: ipfs/ipfs-desktop#956. |
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
I recommend to not overthink it :) You can potentially pick one side to be the "underlying implementation being used" and another for "the last experiment active" and once you have multiple useful experiments, then consider how to represent it. |
@olizilla could you take one last look at this please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nice work 👍
This PR adds new functionality to enable/disable IPFS experiments from the settings UI.
Experiments are controlled from an
EXPERIMENTS
constant insrc/bundles/experiments.js
. In order to add a new experiment simply create a new key to assign a namespace and then add the appropriate values. Thekey
will also be used to select the correct language strings from the i18n files. Defaults in English have been added.Preflight checklist:
npm
- [ ] add notifications for activation and errorfixes: #814
fixes: ipfs/ipfs-desktop#907
ref: ipfs/ipfs-desktop#911