Skip to content
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: remember manual opt-ins and opt-outs per site #929

Merged
merged 10 commits into from
Oct 16, 2020

Conversation

lidel
Copy link
Member

@lidel lidel commented Oct 15, 2020

This PR improves the way we handle manual opt-out performed per site by the user by storing both opt-out and opt-in decisions made by the user.

Changes

Explicit opt-in and opt-out lists in Preferences

  • Preferences screen now has separate list for opt-outs and opt-ins:

    2020-10-15--04-48-21

  • In the past we only had opt-out list named noIntegrationsHostnames.
    • Items from the old list are automatically migrated to the new one named disabledOn.
  • If for some reason item is present on both lists, opt-out takes a priority.

Menu toggle adds/moves hostname between lists

  • The above lists can be modified by hand on Preferences screen,
    however the expectation is that most of the time users will not touch them.
    • Instead, user will be toggling integrations for current website via browser action menu:

      2020-10-15--04-34-22

Overriding implicit default per website

Short term (this PR)

  • In this PR we are adding proto.school to opt-out list if it was not already present on either of lists.
    • This way we are able to tweak implicit default per website while respecting preexisting user choices.
    • Also, in the future we may run opt-in metrics that compare lengths of both lists to gain better insight into user's behavior.
  • We also include app.fleek.cofeat: remember manual opt-ins and opt-outs per site #929 (review) (does not work from local gateway atm due to stripe.com limitation)

Long term (separate PR)

We will be looking into supporting opt-out based on HTTP header or DNS, so any IPFS-powered website can change the implicit behaviour to opt-out. Tracked in #930

Closes #921 cc @terichadbourne @jessicaschilling

This improves the way we handle manual opt-out performend per site by
the user by storing both manual opt-outs and opt-ins.

This way we are able to tweak implicit default per website while respecting
preexisting user choices. Also, in the future we may run opt-in metrics
that compare lengths of both lists to gain better insight into user's behavior.

Closes #921
const { enabledOn, disabledOn } = await storage.get(['enabledOn', 'disabledOn'])
for (const fqdn of [
'proto.school', // https://github.com/ipfs-shipyard/ipfs-companion/issues/921
'app.fleek.co' // TODO: confirm if ok

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Janison from Fleek here - this looks good. Thanks for this. cc @studna

Copy link
Contributor

@jessicaschilling jessicaschilling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested some prefs text tweaks for clarity ...

add-on/_locales/en/messages.json Outdated Show resolved Hide resolved
add-on/_locales/en/messages.json Outdated Show resolved Hide resolved
add-on/_locales/en/messages.json Outdated Show resolved Hide resolved
add-on/_locales/en/messages.json Outdated Show resolved Hide resolved
lidel and others added 5 commits October 15, 2020 22:03
Co-authored-by: Jessica Schilling <jessica@protocol.ai>
Co-authored-by: Jessica Schilling <jessica@protocol.ai>
Co-authored-by: Jessica Schilling <jessica@protocol.ai>
Co-authored-by: Jessica Schilling <jessica@protocol.ai>
We only support hostnames
@lidel
Copy link
Member Author

lidel commented Oct 15, 2020

@jessicaschilling merged your suggestions, but removed "URI" from preference label 853099b (#929) – we only support hostnames. Would that be acceptable?

Copy link
Contributor

@jessicaschilling jessicaschilling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

This ensures that toggling a subdomain creates a rule for subdomain and
does not impact existing rules for parents.

If there is no direct opt-in or opt-out, parents are matched.
If there is opt-out for a parent, but also a direct opt-in for subdomain,
direct opt-in takes precedence.
@lidel
Copy link
Member Author

lidel commented Oct 16, 2020

I'm going to ship this to Beta soon, so we can dogfood it more,
hopefully shipping to Stable next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Opt-out proto.shool from the DNSLink redirect by default
3 participants