discover-rewards-notifier icon indicating copy to clipboard operation
discover-rewards-notifier copied to clipboard

Confidence indicator

Open nareddyt opened this issue 7 years ago • 8 comments

Currently, we have 2 different ways of matching sites to discover deals or cashback rewards:

  • URL Matching: (High Confidence) We check if any deals or cashbacks urls match the url of the website
  • Fuzzy Site Name Matching: (Low Confidence) We do a fuzzy check on the name of the website. We try to find a deal or cashback that contains all of the site title (with some irrelevant edge cases, see #70 and #67).

When we find a match and display a popup, we should display a confidence level in the popup UI. Specifically, we would want to add a UI component to the templates/deal.handlebars and templates/cashback.handlebars to display the confidence level of the deal or cashback.

I imagine this indicator would just list the confidence level and provide an information icon. When the user hovers over the information icon, it can show a Bootstrap Popover with details on why it's high / low confidence. This is open to change though, feel free to post UI mockups below!

It would be nice if this is coded to support other confidence levels in the future.

nareddyt avatar May 27 '18 06:05 nareddyt

hi there. i'd like to work on this, but i have a question before i get started...

i did the following so far:

  1. forked the repo and cloned it down to my local machine
  2. followed npm install etc on README.md and then got it as a chrome extension
  3. when i go to www.jcrew.com or www.ae.com as you suggest in README.md though, i don't get anything "lighting up" on the chrome extension icon. When I hover over the icon, it says "no discover deal for this page."

my question is -- is there a specific site (maybe jcrew.com is outdated?) or do i need to be a discover card member / log in and then i can see the deals?

thank you! sorry i am new to this, so i appreciate your help in advance ^_^

jiyoon-koo avatar Jul 11 '18 01:07 jiyoon-koo

Hi, glad you're interested!

I just double checked, and both sites work for me. It should look something like this:

image

I haven't seen anyone else with this issue, so it's pretty surprising. But we should definitely debug it. Can you try checking the extension logs? You can view these by going to the chrome extensions page (three dots button -> more tools -> extensions), clicking on View Details for this extension, and then clicking on the View background page link (under the Inspect views section).

This should open up a new window. In the top of the window, you should see tabs for Elements, Console, Sources, Network, etc. Click on the Console tab, and this should have all the logs for the extension!

Try navigating to pages like www.jcrew.com in a new tab while leaving this Console window open. You should see info messages pop up that has the name of the website. If you see any errors, could you paste them here? Errors will have a big red x and the entire cell will be red.

You may see errors about NETWORK_IO being suspended. That's normal, that happens whenever your computer goes to sleep. You can ignore those if they happen only about once per hour.

Let me know what you find! I'm curious :)

nareddyt avatar Jul 12 '18 03:07 nareddyt

Ah! Okay, so here's what Inspection Views -> Background Page shows in the console...

background.js:48 Cashback data has never been loaded! Extension will not work onCashbackData @ background.js:48

was i supposed to load cashback data somewhere in the install?

edit: i just closed that extensions view and went to jcrew again and it works! i see it light up just like the snippet you posted! :) maybe a weird blip. i hope that console log is helpful. i'll get to work on this.

jiyoon-koo avatar Jul 12 '18 13:07 jiyoon-koo

Nope, those should be loaded automatically when the extension runs. Currently, it loads those directly from this url. Is it possible the network you are on is blocking requests to that URL when you visit it from your web browser? If so, let me know and I can think of a solution. That's a problem I haven't considered before!

My other guess is that GitHub pages (the site for hosting the data) was down 2 days ago. The status is reported here. That would have causes the extension to fail loading the data. However, the extension is designed to keep trying to load the data every hour. So even if it failed 2 days ago, it should have kept trying until it worked.

You can also try reloading the extension. On the Chrome Extensions page (three dots button -> more tools -> extensions), try hitting the refresh button under this extension. This should cause the extension to restart. Then when you open up the logs, they should be pretty clean (they should only have a few items). If there are are warnings or errors, can you paste them here?

nareddyt avatar Jul 12 '18 15:07 nareddyt

ah, i guess you did not see my edit on my last comment.

now i am seeing this instead of the console error in the console

Fetched and loaded the latest Discover data successfully :) background.js:108 Registered all listeners :)

yay! thanks :) i'll try reloading the extension if i run into issues in the future.

jiyoon-koo avatar Jul 12 '18 17:07 jiyoon-koo

Oh interesting, yeah I missed that. I wonder why it happened, but I guess it's hard to reproduce. But yay, it works :)

nareddyt avatar Jul 12 '18 23:07 nareddyt

Hey, is this issue still open? If so i'd like to work on it.

spikerheado1234 avatar Jan 18 '19 12:01 spikerheado1234

Hi Ahan,

Yeah go for it. Sorry I’ve been away for long, I won’t be able to work on this so feel free to take it.

On Fri, Jan 18, 2019 at 7:02 AM Ahan Gupta [email protected] wrote:

Hey, is this issue still open? If so i'd like to work on it.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/nareddyt/discover-rewards-notifier/issues/75#issuecomment-455523919, or mute the thread https://github.com/notifications/unsubscribe-auth/AL2AVUGbLhaC1TbQcXpL0bWm6EjrfI_-ks5vEbe7gaJpZM4UPKk6 .

jiyoon-koo avatar Jan 18 '19 12:01 jiyoon-koo