interledger / web-monetization-extension

An open-source browser extension that enables Web Monetization.
Apache License 2.0
73 stars 5 forks source link

[IMPROVEMENT] Show msg that WM ext only supports HTTPS sites #584

Closed tselit closed 1 month ago

tselit commented 2 months ago

Current behaviour

When visiting a monetized website that has a valid link tag, but where the website does not have an SSL certificate (e.g. the URL doesn't have an HTTPS prefix or the page's SSL certificate has expired), then WM extension displays this message "This website is not monetized".

Describe the feature you would like to request

When a web site or page is monetized but it doesn't have a valid SSL certificate (i.e. the URL doesn't have the HTTPS prefix), then let the extension display a more informative and accurate message, to indicate that the extension does not work on site/page.

To do

When a user of the extension visits a website or page that isn't HTTPS compliant, do the following:

Acceptance criteria

When a user navigates to a non-HTTPS compliant website:

  1. The icon of the extension should appear as the default, active icon (i.e. without any green tick, or a red X, or an orange exclamation point). default

  2. Show this message when the user opens the extension: Unable to start Web Monetization. Web Monetization only works on secure sites.

  3. For all non-HTTPS compliant sites or pages, the above points 1 and 2 should always apply, regardless of the monetization status.

Additional context

Related to issue logged #572

sidvishnoi commented 2 months ago

Would like if the messaging reflects that we cannot monetized empty tabs, about:/chrome:///file:/// (local files) pages as well.

sidvishnoi commented 2 months ago

This is what react devtools extension does: https://github.com/facebook/react/blob/main/packages/react-devtools-extensions/popups/restricted.html image

RabebOthmani commented 2 months ago

How about : This is a non supported page. For more details about the Web Monetization usage, check out [link]' This way it's generic enough to cover the different cases you mentioned @sidvishnoi and we can add the explanation in the getting started doc ? cc @tselit @melissahenderson

tselit commented 2 months ago

Cool, this sounds good to me @RabebOthmani.

melissahenderson commented 2 months ago

Is this messaging for testers or is it what we're planning on having in v1? Including "for more details...about usage..." is for developers, not your average user. The average user can't do anything to make a site secure.

In any case, a phrasing suggestion I have is: Unable to start Web Monetization. Web Monetization only works on secure sites.

I don't particularly like "start", but something along those lines.

RabebOthmani commented 2 months ago

@melissahenderson about usage is related to using the extension not how to make a site secure. Basically if they want to know why they can't use WM, they can read somewhere all the exceptions that Sid mentioned above

sidvishnoi commented 2 months ago

Reasons why a site is not monetized where we can show a message to user:

  1. new tab page
  2. browser internal page
  3. unsupported_scheme (http://, file://, ftp:// and many others)
  4. no monetization links on page peered with connected wallet
  5. no monetization links on the page

We can :

RabebOthmani commented 2 months ago

Third option seems the clearest.