mdn / mdn/fred

Not useful MDN links from BCD only reload the current page

Open
#1,465 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

p1
Dominant language
JavaScript
Stars
233
Forks
61
Avg merge
1d 1h
Merged PRs (30d)
82

Description

Description

While adding missing mdn_url links to BCD, I found one kind of BCD table that’s not useful or even confusing for our readers:

https://developer.mozilla.org/en-US/docs/Web/API/CSS/factory_functions_static#browser_compatibility

For most of the CSS static methods, there are no dedicated pages, apart from a few interesting ones:

  • highlights
  • registerProperty()
  • supports()

The rest are quite boring, so in BCD mdn_url just goes to one page they’re listed on.

So, in the BCD table:

  • If you click on the highlights static property link, you’ll get useful info on a dedicated page
  • If you click the grad() static method link, you’ll just reload the same page and end up at the top of it

And there’s no way to tell whether the link is useful or not. But that’s only for MDN readers. For other users of BCD, this link might still be helpful.

Suggested solution

I think we could/should filter out links in the BCD table which point to the page you're on, unless they point to a section (that still seems useful), but just going to the top of the page feels useless and frustrating, yeah
@LeoMcA

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the CSS/factory_functions_static browser-compatibility table linked in the issue and reproduce the behavior for the grad() static method versus highlights. Trace how the table builds MDN links and determine how same-page links without a section should be handled. Done means the current page no longer reloads to the top for such links while useful dedicated or section links remain available.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.