nareddyt / discover-rewards-notifier

A Chrome Extension that shows a notification when visiting sites that qualify for Discover® Deals or Cashback Rewards.
https://www.tejunareddy.com/discover-rewards-notifier/
GNU General Public License v3.0
6 stars 15 forks source link

Confidence indicator #75

Open nareddyt opened 6 years ago

nareddyt commented 6 years ago

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

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.

jiyoon-koo commented 6 years ago

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 ^_^

nareddyt commented 6 years ago

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 :)

jiyoon-koo commented 6 years ago

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.

nareddyt commented 6 years ago

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?

jiyoon-koo commented 6 years ago

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.

nareddyt commented 6 years ago

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

spikerheado1234 commented 5 years ago

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

jiyoon-koo commented 5 years ago

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 notifications@github.com 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 .