content icon indicating copy to clipboard operation
content copied to clipboard

Use ES spec. /multipage URLs

Open vimirage opened this issue 3 years ago • 8 comments

I've encountered multiple instances of links to the ES spec. included as URLs to https://tc39.es/ecma262/#<some topic>; this should be avoided because their site can be pathologically slow to use for some/many devices. BCD uses https://tc39.es/ecma262/multipage/#<some topic>, and there is mixed usage though this repository.

I've searched on GitHub, and it finds 54 links, some of which are multipage, but someone should do an automated "find and replace."

Furthermore, a lint may be useful for preventing usage of this particular form of the link?

vimirage avatar Aug 30 '22 03:08 vimirage

Have you found them in the prose or in the bcd tables?

I think we should first, check if these 54 links are relevant. My experience is that we use a spec link mostly in two cases:

  1. When the author wanted to save time or avoid going into a rabbit hole, that is avoiding describing precisely something complex, eventually on a separate page.
  2. Just link to the spec.

In case 2, we should remove the link, as it already is in the bcd table. In case 1, we should complete the spec.

Of course there are a few exceptions, and I'm ok to use the multipage link in this case.

teoli2003 avatar Aug 30 '22 04:08 teoli2003

Have you found them in the prose or in the bcd tables?

The BCD tables are automated, and do use /multipage.

I think we should first, check if these 54 links are relevant. My experience is that we use a spec link mostly in two cases:

  1. When the author wanted to save time or avoid going into a rabbit hole, that is avoiding describing precisely something complex, eventually on a separate page.
  2. Just link to the spec.

In case 2, we should remove the link, as it already is in the bcd table. In case 1, we should complete the spec.

Of course there are a few exceptions, and I'm ok to use the multipage link in this case.

Plenty of these seem to be exceptions, the two I encountered before I did a search were the lexical grammar page of JavaScript, and a page on the iteration protocol - these aren't APIs, and lack BCD spec links, even if they have BCD tables; should those have spec links in BCD?

ghost avatar Aug 30 '22 05:08 ghost

I really don't like using multipage links. I find the multipage spec really hard to search and navigate. See also https://github.com/tc39/ecma262/issues/2347

(And yes, if you found a non-multipage link, it's probably me who added it)

Josh-Cena avatar Aug 30 '22 05:08 Josh-Cena

I really don't like using multipage links. I find the multipage spec really hard to search and navigate. See also https://github.com/tc39/ecma262/issues/2347

Well... I really think we should consider the audience? Does the average user of MDN want to start looking through for other parts of the spec.?

ghost avatar Aug 30 '22 05:08 ghost

Average MDN users don't read the spec text in any case 😄

Josh-Cena avatar Aug 30 '22 05:08 Josh-Cena

Yes, that's why I don't like spec links (outside spec table and a few special cases). If there is a piece of information that is needed and we have to link to the spec, most of the time, it is the symptom of something missing in the article or somewhere else on MDN Web Docs.

teoli2003 avatar Aug 30 '22 09:08 teoli2003

Plenty of these seem to be exceptions, the two I encountered before I did a search were the lexical grammar page of JavaScript, and a page on the iteration protocol - these aren't APIs, and lack BCD spec links, even if they have BCD tables; should those have spec links in BCD?

  1. I think it is reasonable for us to have a warning of spec URLs in prose (outside of BCD).
  2. As noted ^^^ they should be very much the exception.

If you want to list them we can go through them methodically.

hamishwillee avatar Sep 02 '22 01:09 hamishwillee

If you want to list them we can go through them methodically.

I was quite adverse to doing so, given that I said there were a lot :)

Every file in this repository currently using a non-multipage link:

  • https://github.com/mdn/content/blob/main/files/en-us/glossary/whitespace/index.md
  • https://github.com/mdn/content/blob/main/files/en-us/web/api/document/all/index.md
  • https://github.com/mdn/content/blob/ce2909126eb09e44c9f48d9f65d072acae827749/files/en-us/web/javascript/reference/global_objects/unescape/index.md
  • https://github.com/mdn/content/blob/d6ce8fcbbc4a71ec9209f379e5ea9774bbf1f5ac/files/en-us/web/javascript/reference/global_objects/date/toutcstring/index.md
  • https://github.com/mdn/content/blob/d6ce8fcbbc4a71ec9209f379e5ea9774bbf1f5ac/files/en-us/web/javascript/reference/global_objects/escape/index.md
  • https://github.com/mdn/content/blob/04e75ce1f83a591a576f52b143f195133bfcbe96/files/en-us/glossary/falsy/index.md
  • https://github.com/mdn/content/blob/968e6f1f3b6f977a09e116a0ac552459b741eac3/files/en-us/web/javascript/reference/statements/index.md
  • https://github.com/mdn/content/blob/d6ce8fcbbc4a71ec9209f379e5ea9774bbf1f5ac/files/en-us/web/javascript/reference/global_objects/object/definegetter/index.md
  • https://github.com/mdn/content/blob/8084ad218b28fd84d452e297f5fb61ae55751935/files/en-us/web/javascript/equality_comparisons_and_sameness/index.md
  • https://github.com/mdn/content/blob/d6ce8fcbbc4a71ec9209f379e5ea9774bbf1f5ac/files/en-us/web/javascript/reference/global_objects/date/parse/index.md
  • https://github.com/mdn/content/blob/ce2909126eb09e44c9f48d9f65d072acae827749/files/en-us/web/javascript/reference/global_objects/string/substr/index.md
  • https://github.com/mdn/content/blob/1533276490d15cff6ddcd201fc05562180058a99/files/en-us/web/javascript/reference/statements/label/index.md
  • https://github.com/mdn/content/blob/968e6f1f3b6f977a09e116a0ac552459b741eac3/files/en-us/web/javascript/reference/strict_mode/index.md
  • https://github.com/mdn/content/blob/ce2909126eb09e44c9f48d9f65d072acae827749/files/en-us/web/javascript/reference/global_objects/object/proto/index.md
  • https://github.com/mdn/content/blob/d6ce8fcbbc4a71ec9209f379e5ea9774bbf1f5ac/files/en-us/web/javascript/reference/global_objects/intl/numberformat/format/index.md
  • https://github.com/mdn/content/blob/ce2909126eb09e44c9f48d9f65d072acae827749/files/en-us/web/javascript/reference/global_objects/object/setprototypeof/index.md
  • https://github.com/mdn/content/blob/a4fa18d6d2237fd4f252c236ad1ce55c32d6c0c2/files/en-us/web/javascript/reference/global_objects/map/index.md
  • https://github.com/mdn/content/blob/968e6f1f3b6f977a09e116a0ac552459b741eac3/files/en-us/web/javascript/reference/global_objects/weakref/index.md
  • https://github.com/mdn/content/blob/968e6f1f3b6f977a09e116a0ac552459b741eac3/files/en-us/web/javascript/reference/global_objects/regexp/sticky/index.md
  • https://github.com/mdn/content/blob/1533276490d15cff6ddcd201fc05562180058a99/files/en-us/web/javascript/reference/statements/var/index.md
  • https://github.com/mdn/content/blob/9b38f886d21c5d0a428f58acb20c4d0fc6c2e098/files/en-us/web/javascript/reference/global_objects/date/date/index.md
  • https://github.com/mdn/content/blob/8b6b6e735601c9bdc04a88695d3f93546df86ff9/files/en-us/web/javascript/reference/global_objects/number/index.md
  • https://github.com/mdn/content/blob/eada29e0774d505becb3a725001d372f0dbdc73d/files/en-us/web/javascript/index.md
  • https://github.com/mdn/content/blob/dbb60777667ebb66321a2dae3acc6162715524d9/files/en-us/web/javascript/javascript_technologies_overview/index.md
  • https://github.com/mdn/content/blob/87a9f73c410c9b9e91300695c8aa4931367243fb/files/en-us/web/javascript/reference/global_objects/array/sort/index.md
  • https://github.com/mdn/content/blob/968e6f1f3b6f977a09e116a0ac552459b741eac3/files/en-us/web/javascript/reference/global_objects/proxy/index.md
  • https://github.com/mdn/content/blob/9b38f886d21c5d0a428f58acb20c4d0fc6c2e098/files/en-us/web/javascript/reference/deprecated_and_obsolete_features/index.md
  • https://github.com/mdn/content/blob/968e6f1f3b6f977a09e116a0ac552459b741eac3/files/en-us/web/javascript/reference/global_objects/regexp/index.md
  • https://github.com/mdn/content/blob/9b38f886d21c5d0a428f58acb20c4d0fc6c2e098/files/en-us/web/javascript/data_structures/index.md
  • https://github.com/mdn/content/blob/9b38f886d21c5d0a428f58acb20c4d0fc6c2e098/files/en-us/web/javascript/reference/iteration_protocols/index.md
  • https://github.com/mdn/content/blob/9b38f886d21c5d0a428f58acb20c4d0fc6c2e098/files/en-us/web/javascript/reference/global_objects/string/index.md
  • https://github.com/mdn/content/blob/968e6f1f3b6f977a09e116a0ac552459b741eac3/files/en-us/web/javascript/reference/lexical_grammar/index.md

Every file in this repository currently using a multipage link:

  • https://github.com/mdn/content/blob/87a9f73c410c9b9e91300695c8aa4931367243fb/files/en-us/web/javascript/guide/regular_expressions/unicode_property_escapes/index.md
  • https://github.com/mdn/content/blob/ce2909126eb09e44c9f48d9f65d072acae827749/files/en-us/web/javascript/reference/global_objects/set/keys/index.md
  • https://github.com/mdn/content/blob/d6ce8fcbbc4a71ec9209f379e5ea9774bbf1f5ac/files/en-us/web/javascript/reference/global_objects/isnan/index.md
  • https://github.com/mdn/content/blob/968e6f1f3b6f977a09e116a0ac552459b741eac3/files/en-us/web/javascript/reference/global_objects/function/prototype/index.md
  • https://github.com/mdn/content/blob/968e6f1f3b6f977a09e116a0ac552459b741eac3/files/en-us/web/javascript/guide/regular_expressions/groups_and_backreferences/index.md
  • https://github.com/mdn/content/blob/968e6f1f3b6f977a09e116a0ac552459b741eac3/files/en-us/web/javascript/guide/regular_expressions/quantifiers/index.md
  • https://github.com/mdn/content/blob/968e6f1f3b6f977a09e116a0ac552459b741eac3/files/en-us/web/javascript/guide/regular_expressions/assertions/index.md
  • https://github.com/mdn/content/blob/968e6f1f3b6f977a09e116a0ac552459b741eac3/files/en-us/web/javascript/guide/regular_expressions/cheatsheet/index.md
  • https://github.com/mdn/content/blob/968e6f1f3b6f977a09e116a0ac552459b741eac3/files/en-us/web/javascript/guide/regular_expressions/character_classes/index.md
  • https://github.com/mdn/content/blob/968e6f1f3b6f977a09e116a0ac552459b741eac3/files/en-us/web/javascript/reference/global_objects/date/index.md

And note that there are also links to specs such as whatwg, which is a related issue, but not my immediate focus.

ghost avatar Sep 17 '22 21:09 ghost