Live data from Hacker News

Why it took a long time to build the tiny link preview on Wikipedia

blog.wikimedia.org

21–30 of 255 posts

Re: Why it took a long time to build the tiny link preview on Wikipedia

#21

Can I access this API externally, e.g. by sending a http get request to some endpoint, to get the summary content in JSON format?

You can get a similar effect by hitting Wikipedia for its extract. For example: https://en.wikipedia.org/w/api.php?action=query&prop=extract...

Re: Why it took a long time to build the tiny link preview on Wikipedia

#22
I think I have these turned off, since in Safari I can Force Touch on links to preview them in a similar fashion. This has the benefit of letting me choose where I want to stop reading, instead of cutting a sentence off at some arbitrary point.

Re: Why it took a long time to build the tiny link preview on Wikipedia

#23
post #8

> People seem to like it — we are seeing 5,000 hits to our API a minute to serve those cards that show when you hover over any link. Uhm, no. It just means that people are hovering over links with their mouse. It does not imply any opinion about the previews. > The original idea was conceived four years ago When I was active at Wikipedia/Wikibooks 12 years ago, there was a user script floating around that did the sam…

> Uhm, no. It just means that people are hovering over links with their mouse. It does not imply any opinion about the previews.

When you evaluate features using engagement metrics, there are only two possibilities. If the metric is high, users love the feature. If the metric is low, users don't know the feature exists, and more alerts or "unread" badges must be added to help them learn.

Re: Why it took a long time to build the tiny link preview on Wikipedia

#24
post #8

> People seem to like it — we are seeing 5,000 hits to our API a minute to serve those cards that show when you hover over any link. Uhm, no. It just means that people are hovering over links with their mouse. It does not imply any opinion about the previews. > The original idea was conceived four years ago When I was active at Wikipedia/Wikibooks 12 years ago, there was a user script floating around that did the sam…

Also, is 5K hits/minute really that impressive?

According to https://stats.wikimedia.org/EN/Sitemap.htm , English Wikipedia gets 88K views per minute.

Re: Why it took a long time to build the tiny link preview on Wikipedia

#25
post #8

> People seem to like it — we are seeing 5,000 hits to our API a minute to serve those cards that show when you hover over any link. Uhm, no. It just means that people are hovering over links with their mouse. It does not imply any opinion about the previews. > The original idea was conceived four years ago When I was active at Wikipedia/Wikibooks 12 years ago, there was a user script floating around that did the sam…

I expect you're remembering User:Lupin/popups.js[1], which dates back to August 2005.

It soon became known as Navigation Popups[2], and is still available today.

The main documentation for Page Previews mentions Navigation Popups.[3]

[1]: https://en.wikipedia.org/wiki/User:Lupin/popups.js

[2]: https://en.wikipedia.org/wiki/Wikipedia:Tools/Navigation_pop...

[3]: https://www.mediawiki.org/wiki/Page_Previews

Re: Why it took a long time to build the tiny link preview on Wikipedia

#27
post #9

I am continually impressed by the markup Wikipedia generates. They've managed to pull in pretty link previews, scientific notation and a grid layout, whilst building a highly nested markup structure? The remarkable part? Wikipedia works great inside a text browser like elinks. It works great in a modern browser. Without sacrificing the interactivity people have grown to expect.

Wikipedia's markup is just terrible for trying to do any sort of scraping or analysis. I once tried to write a script that pulled the latest version of macOS from the sidebar of this article[1] and I gave up because it was difficult and brittle in a way that made it nearly impossible. I'd probably have better results parsing the HTML with a regex. Likewise, I know a friend who literally had to scrap an entire project…

Oh, I know. The markup is incomprehensible, but not to a render engine. It doesn't even seem to impact loading speed. It generates amazing machine-text.

As for scraping... Parsing the hell that is wikitext is all you can do. Or apparently, pipe it through a text browser.

Re: Why it took a long time to build the tiny link preview on Wikipedia

#28
post #24
post #8

> People seem to like it — we are seeing 5,000 hits to our API a minute to serve those cards that show when you hover over any link. Uhm, no. It just means that people are hovering over links with their mouse. It does not imply any opinion about the previews. > The original idea was conceived four years ago When I was active at Wikipedia/Wikibooks 12 years ago, there was a user script floating around that did the sam…

Also, is 5K hits/minute really that impressive? According to https://stats.wikimedia.org/EN/Sitemap.htm , English Wikipedia gets 88K views per minute.

I'm thinking it has to be heavily cached.

Re: Why it took a long time to build the tiny link preview on Wikipedia

#29

Wow. Had just read that and then saw the feature first time while browsing over a list page. Was moving my curser down the list and when ever I wanted to click a link, the above link hat popped up the layer, highjacking my click and leading me to the wrong page. What a great way of destroying the user experience with a beautifully over-engineered feature that is utterly crap while actually trying to use the underlyin…

I have a habit to select some text in a page when I'm reading it. And I hate websites that trying to immediately interact with me when I'm selecting a text (usually it's "fix a typo" or something similar).

Re: Why it took a long time to build the tiny link preview on Wikipedia

#30
post #23
post #8

> People seem to like it — we are seeing 5,000 hits to our API a minute to serve those cards that show when you hover over any link. Uhm, no. It just means that people are hovering over links with their mouse. It does not imply any opinion about the previews. > The original idea was conceived four years ago When I was active at Wikipedia/Wikibooks 12 years ago, there was a user script floating around that did the sam…

> Uhm, no. It just means that people are hovering over links with their mouse. It does not imply any opinion about the previews. When you evaluate features using engagement metrics, there are only two possibilities. If the metric is high, users love the feature. If the metric is low, users don't know the feature exists, and more alerts or "unread" badges must be added to help them learn.

My point is that the metric is bad.
Post reply on HN