Giter Site home page Giter Site logo

w3c / mdn-spec-links Goto Github PK

View Code? Open in Web Editor NEW
20.0 9.0 15.0 57.78 MB

MDN Spec Links – Linking specs to MDN and browser-support data

Home Page: https://w3c.github.io/mdn-spec-links/

Makefile 0.01% HTML 3.05% JavaScript 0.21% TypeScript 0.01% JSON 96.73%
web-standards w3c whatwg web-development specifications mdn web-platform

mdn-spec-links's Introduction

MDN Spec Links

This space holds JSON data for individual specs; the per-spec data maps fragment IDs from a particular spec to MDN articles which have Specifications sections that contain links to that spec and fragment ID.

All data here is generated. So you don’t want to edit the data directly; rather, edit https://github.com/mdn/browser-compat-data data upstream, and https://developer.mozilla.org/docs/Web article content.

To regenerate the data, just type make. To build from local BCD and MDN clones:

BCD_REPO=/path/to/mdn/browser-compat-data MDN_REPO=/path/to/mdn/content make -e

mdn-spec-links's People

Contributors

sideshowbarker avatar sideshowbarkerbot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mdn-spec-links's Issues

feature-name and slug differ for all pseudo-classes/elements

The keys used in the bcd data structures are clearly optimized for JS usage, and so non-JS-ident characters, such as :, are stripped. They're retained in the actual URLs, tho, which are used to determine the slugs.

As a result, every single pseudo-class and pseudo-element currently triggers the "mismatched between feature name and MDN url" warning in Bikeshed; Selectors in particular is wrecked by this.

I can hack around this in Bikeshed, but since this repo is massaging the data into a flatter format anyway (and thus the feature name doesn't need to correspond to the bcd data structures), maybe we can just fix this here? Specifically, if the only difference between the feature name and the slug name is the presence of :, then change the feature name to match the slug name, so they both have :.

Schema or TypeScript declaration for data

It was a bit difficult to figure out from code and data files what all fields are there, so I created this TypeScript declaration:

interface MdnData {
  [id: string]: MdnEntry[];
}

interface MdnEntry {
  engines: string[];
  filename: string;
  name: string;
  slug: string;
  summary: string;
  support: {
    [browser: string]: {
      version_added: string | boolean | null;
      version_removed?: string;
      notes?: string;
    };
  };
  title: string;
}

I also generated a JSON schema at https://app.quicktype.io?share=5792So9xCL3hM0e2XhUo.

Maybe we can add this to wiki or docs?

Question:

  • Why is the following an array? Are there any instances where it has a length more than 1?
    "the-display-mode-media-feature": [
    {
  • Did I miss anything in the declaration?

Lots of specs in specmap missing in the actual repo

A lot of specs present in SPECMAP.json are missing from the actual repository. For example, the specmap lists both css-values-3.json and css-values-4.json, but both are missing (only css-values.json exists).

This is causing fatal errors in Bikeshed specs :(

IndexedDB missing MDN panels for IDBKeyRange/lowerBound and IDBKeyRange/upperBound

@sideshowbarker - I bet you can help here...

dfns here, which seem fine:

All of these MDN pages exist:

I suspect the fault lies in:

https://w3c.github.io/mdn-spec-links/indexeddb-3.json

which has keys for:

  • "dom-idbkeyrange-only"
  • "dom-idbkeyrange-lowerbound-lower-open-lower"
  • "dom-idbkeyrange-upperbound-upper-open-upper"
  • "dom-idbkeyrange-bound"

Note how some of those have extra stuff (arguments), which correspond to the missing MDN panels - is this something in MDN that's causing the JSON generation to go wonky? Or something in the tooling here?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.