learn icon indicating copy to clipboard operation
learn copied to clipboard

Intelligent selection for primary link

Open teampolyglot opened this issue 4 years ago • 3 comments

Currently, on the item page, one of the links is selected RANDOMLY and shown as a primary. This creates inconsistent / sub-optimal behavior. For eg, book pages sometimes show Amazon or GoodReads link as primary, when actually Wikipedia or OpenLibrary pages should be prioritized.

Check the implementation in Item#primary_link

teampolyglot avatar Apr 21 '20 19:04 teampolyglot

how come this is not a github issue on the OL repository? You have a valid concern. Idk why it's like this - but the OL uses Amazon for its book imports, so that might be why there. The other ones idk why they're there - as you're right - they do look like advertising - and gives the wrong message. I think they do it for partnerships, but I'm not an expert here.

BrittanyBunk avatar Apr 22 '20 01:04 BrittanyBunk

@BrittanyBunk This is an improvement for learnawesome's item pages like this, not OL's. :) LearnAwesome intends to be a good citizen of the Open Web ecosystem so it matters HOW we choose one of the links as primary. The random selection behaviour was a quick and dirty hack which now needs to be fixed.

teampolyglot avatar Apr 22 '20 09:04 teampolyglot

For ranking/sorting links, would a reasonable approach be the following :

  1. Links from known "good" sites (whitelist based)
  2. Links from Youtube/Vimeo
  3. Links from .edu / .org
  4. Links from unknown sites
  5. Links from .com
  6. Links from known ecommerce sites

tejpochiraju avatar Aug 21 '21 08:08 tejpochiraju