@mdn/fred 1.7.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/CONTRIBUTING.md +2 -2
  3. package/README.md +31 -2
  4. package/components/breadcrumbs-bar/server.css +12 -0
  5. package/components/color-theme/element.js +1 -0
  6. package/components/content-feedback/element.js +58 -22
  7. package/components/content-section/server.css +15 -2
  8. package/components/env/index.js +3 -0
  9. package/components/heading-anchor/server.js +0 -2
  10. package/components/issues-table/element.js +6 -4
  11. package/components/language-switcher/element.js +1 -0
  12. package/components/menu/constants.js +17 -22
  13. package/components/menu/missing-docs.json +25 -32
  14. package/components/modal/element.js +3 -2
  15. package/components/navigation/server.js +1 -1
  16. package/components/observatory-tests-and-scores/element.js +13 -7
  17. package/components/playground/element.js +11 -5
  18. package/components/recently-visited/element.js +4 -2
  19. package/components/scrim-inline/element.js +11 -5
  20. package/components/search-modal/element.js +1 -0
  21. package/components/writer-reload/element.js +10 -2
  22. package/l10n/en-US.ftl +6 -0
  23. package/out/service-worker.js +1 -1
  24. package/out/static/client/{1231.84c230e0fa92f2d4.js → 1231.6a66b96b566b2cca.js} +14 -10
  25. package/out/static/client/1231.6a66b96b566b2cca.js.map +1 -0
  26. package/out/static/client/{2190.7995f19655987265.js → 2190.a21d8b0d7b75a20d.js} +5 -5
  27. package/out/static/client/2190.a21d8b0d7b75a20d.js.map +1 -0
  28. package/out/static/client/{2319.2034183eaacce69a.js → 2319.a419f6d93c814f50.js} +12 -8
  29. package/out/static/client/2319.a419f6d93c814f50.js.map +1 -0
  30. package/out/static/client/{3092.94a3edc866458ab7.js → 3092.54b703ff89ccdaf7.js} +6 -6
  31. package/out/static/client/3092.54b703ff89ccdaf7.js.map +1 -0
  32. package/out/static/client/{3200.024a6b1d06d80026.js → 3200.dc89d9709a81e853.js} +2 -1
  33. package/out/static/client/{3200.024a6b1d06d80026.js.map → 3200.dc89d9709a81e853.js.map} +1 -1
  34. package/out/static/client/{486.bb14d2f437221509.js → 486.b6950b0a4cfb9116.js} +2 -2
  35. package/out/static/client/{486.bb14d2f437221509.js.map → 486.b6950b0a4cfb9116.js.map} +1 -1
  36. package/out/static/client/{5446.3e0ac5aa93616c6f.js → 5446.2e663885069b1680.js} +4 -2
  37. package/out/static/client/5446.2e663885069b1680.js.map +1 -0
  38. package/out/static/client/{603.775311ee1356e86f.js → 603.45bf3e185d1b890d.js} +7 -7
  39. package/out/static/client/603.45bf3e185d1b890d.js.map +1 -0
  40. package/out/static/client/{6465.08012ddcd4597c76.js → 6465.2dc41017ae6abc34.js} +2 -1
  41. package/out/static/client/6465.2dc41017ae6abc34.js.map +1 -0
  42. package/out/static/client/7185.278701dcd05fcd30.js +2 -0
  43. package/out/static/client/7185.278701dcd05fcd30.js.map +1 -0
  44. package/out/static/client/9379.edc05ee9f550804e.js +2 -0
  45. package/out/static/client/9379.edc05ee9f550804e.js.map +1 -0
  46. package/out/static/client/{9784.3c73a0debfcca553.js → 9784.1c8d6e465137fd58.js} +13 -9
  47. package/out/static/client/{9784.3c73a0debfcca553.js.map → 9784.1c8d6e465137fd58.js.map} +1 -1
  48. package/out/static/client/{9804.d9ffbe6b7c44eab3.js → 9804.ba52ea55253eca7b.js} +2 -2
  49. package/out/static/client/{9804.d9ffbe6b7c44eab3.js.map → 9804.ba52ea55253eca7b.js.map} +1 -1
  50. package/out/static/client/{index.0f1f5c05b3c9458b.js → index.0f05d4ac6b3b88a1.js} +11 -4
  51. package/out/static/client/index.0f05d4ac6b3b88a1.js.map +1 -0
  52. package/out/static/client/{runtime.f3c0cd5b45c6e874.js → runtime.c323b9d2153b4ebf.js} +2 -2
  53. package/out/static/client/{runtime.f3c0cd5b45c6e874.js.map → runtime.c323b9d2153b4ebf.js.map} +1 -1
  54. package/out/static/client/stats.json +209 -209
  55. package/out/static/client/styles-breadcrumbs-bar.02910e49bb8b2372.css +2 -0
  56. package/out/static/client/styles-breadcrumbs-bar.02910e49bb8b2372.css.map +1 -0
  57. package/out/static/client/{styles-content-section.d18f07ab3d79a1d2.css → styles-content-section.6dc04fb9b3f3d595.css} +2 -2
  58. package/out/static/client/{styles-content-section.d18f07ab3d79a1d2.css.map → styles-content-section.6dc04fb9b3f3d595.css.map} +1 -1
  59. package/out/static/client/{styles-global.52fa98f0e9ec0040.js → styles-global.01d60465c4584631.js} +1 -1
  60. package/out/static/client/styles-global.4031cdde644ed6ce.css +2 -0
  61. package/out/static/client/{styles-global.75b8c75561733419.css.map → styles-global.4031cdde644ed6ce.css.map} +1 -1
  62. package/out/static/client/watify_bg.c5a182c47876cd2b.wasm +0 -0
  63. package/out/static/legacy/{1539.ad5e9bc68ca36ebd.js → 1539.f16c6732d55f64b7.js} +3 -3
  64. package/out/static/legacy/{1539.ad5e9bc68ca36ebd.js.map → 1539.f16c6732d55f64b7.js.map} +1 -1
  65. package/out/static/legacy/7185.278701dcd05fcd30.js +2 -0
  66. package/out/static/legacy/7185.278701dcd05fcd30.js.map +1 -0
  67. package/out/static/legacy/asset-manifest.json +9 -9
  68. package/out/static/legacy/{index.4d5b9af908771553.html → index.19cded28f6c1e506.html} +1 -1
  69. package/out/static/legacy/{index.e275f57e34e5ad42.js → index.e979e65eb8758f6f.js} +3 -3
  70. package/out/static/legacy/{index.e275f57e34e5ad42.js.map → index.e979e65eb8758f6f.js.map} +1 -1
  71. package/out/static/legacy/stats.json +7 -7
  72. package/out/static/legacy/watify_bg.c5a182c47876cd2b.wasm +0 -0
  73. package/out/static/legacy/{yari.28c752c4002c881d.js → yari.7f26dc58679ef833.js} +3 -3
  74. package/out/static/legacy/{yari.28c752c4002c881d.js.map → yari.7f26dc58679ef833.js.map} +1 -1
  75. package/out/static/ssr/7185.js +1 -1
  76. package/out/static/ssr/7185.js.map +1 -1
  77. package/out/static/ssr/index.js +95 -72
  78. package/out/static/ssr/index.js.map +1 -1
  79. package/out/static/ssr/stats.json +4 -4
  80. package/out/static/ssr/watify_bg.c5a182c47876cd2b.wasm +0 -0
  81. package/package.json +15 -15
  82. package/scripts/npm-test.js +22 -0
  83. package/server.js +22 -4
  84. package/wdio.conf.js +4 -2
  85. package/out/static/client/1231.84c230e0fa92f2d4.js.map +0 -1
  86. package/out/static/client/2190.7995f19655987265.js.map +0 -1
  87. package/out/static/client/2319.2034183eaacce69a.js.map +0 -1
  88. package/out/static/client/3092.94a3edc866458ab7.js.map +0 -1
  89. package/out/static/client/5446.3e0ac5aa93616c6f.js.map +0 -1
  90. package/out/static/client/603.775311ee1356e86f.js.map +0 -1
  91. package/out/static/client/6465.08012ddcd4597c76.js.map +0 -1
  92. package/out/static/client/7185.a014a928e9a39779.js +0 -2
  93. package/out/static/client/7185.a014a928e9a39779.js.map +0 -1
  94. package/out/static/client/9379.7cdf58b4fb5efa66.js +0 -2
  95. package/out/static/client/9379.7cdf58b4fb5efa66.js.map +0 -1
  96. package/out/static/client/index.0f1f5c05b3c9458b.js.map +0 -1
  97. package/out/static/client/styles-breadcrumbs-bar.e2fa6dfb04a38166.css +0 -2
  98. package/out/static/client/styles-breadcrumbs-bar.e2fa6dfb04a38166.css.map +0 -1
  99. package/out/static/client/styles-global.75b8c75561733419.css +0 -2
  100. package/out/static/client/watify_bg.9877982a693ec402.wasm +0 -0
  101. package/out/static/legacy/7185.a014a928e9a39779.js +0 -2
  102. package/out/static/legacy/7185.a014a928e9a39779.js.map +0 -1
  103. package/out/static/legacy/watify_bg.9877982a693ec402.wasm +0 -0
  104. package/out/static/ssr/watify_bg.9877982a693ec402.wasm +0 -0
  105. /package/out/static/client/{2190.7995f19655987265.js.LICENSE.txt → 2190.a21d8b0d7b75a20d.js.LICENSE.txt} +0 -0
  106. /package/out/static/client/{2319.2034183eaacce69a.js.LICENSE.txt → 2319.a419f6d93c814f50.js.LICENSE.txt} +0 -0
  107. /package/out/static/client/{603.775311ee1356e86f.js.LICENSE.txt → 603.45bf3e185d1b890d.js.LICENSE.txt} +0 -0
  108. /package/out/static/client/{9784.3c73a0debfcca553.js.LICENSE.txt → 9784.1c8d6e465137fd58.js.LICENSE.txt} +0 -0
  109. /package/out/static/client/{index.0f1f5c05b3c9458b.js.LICENSE.txt → index.0f05d4ac6b3b88a1.js.LICENSE.txt} +0 -0
  110. /package/out/static/legacy/{1539.ad5e9bc68ca36ebd.js.LICENSE.txt → 1539.f16c6732d55f64b7.js.LICENSE.txt} +0 -0
  111. /package/out/static/legacy/{index.e275f57e34e5ad42.js.LICENSE.txt → index.e979e65eb8758f6f.js.LICENSE.txt} +0 -0
  112. /package/out/static/legacy/{yari.28c752c4002c881d.js.LICENSE.txt → yari.7f26dc58679ef833.js.LICENSE.txt} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,46 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.8.0](https://github.com/mdn/fred/compare/v1.7.0...v1.8.0) (2025-10-31)
4
+
5
+
6
+ ### Features
7
+
8
+ * **server:** add auto open browser when launching dev server ([#805](https://github.com/mdn/fred/issues/805)) ([89b1198](https://github.com/mdn/fred/commit/89b11982d34c0cda6b32d594996a0712060af9d8))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **breadcrumbs-bar:** avoid overlap with Theme/Language dropdown ([#864](https://github.com/mdn/fred/issues/864)) ([fe569a0](https://github.com/mdn/fred/commit/fe569a0ed3013e189f474a48c7e7c58d44f57315))
14
+ * **ci:** add the gh token to the run-tests stage ([7b15761](https://github.com/mdn/fred/commit/7b15761a10178ef85d3a86fa13dfaad1ec41e4e6))
15
+ * **content-section:** add `<kbd>` style ([#1003](https://github.com/mdn/fred/issues/1003)) ([d6495dc](https://github.com/mdn/fred/commit/d6495dccf4d6a321d8b30558f99a9333b2bfb997))
16
+ * **content-section:** loosen restrictions on heading ids ([#1008](https://github.com/mdn/fred/issues/1008)) ([d473156](https://github.com/mdn/fred/commit/d4731566badf9ef2b215253bfe85d802f0b8873c))
17
+ * **content-section:** use white img bg-color for all themes ([#934](https://github.com/mdn/fred/issues/934)) ([e4a22f1](https://github.com/mdn/fred/commit/e4a22f181561ae9f853a5947c5a072ca1f1d967e))
18
+ * **search-modal:** disable autocompletions on search input ([#993](https://github.com/mdn/fred/issues/993)) ([1242fd4](https://github.com/mdn/fred/commit/1242fd4d39d0b868c4a6f51ba5581ad35b442600))
19
+ * **search-modal:** fix unexpected autocompletions from search input ([1242fd4](https://github.com/mdn/fred/commit/1242fd4d39d0b868c4a6f51ba5581ad35b442600))
20
+
21
+
22
+ ### Miscellaneous
23
+
24
+ * **deps-dev:** bump @mdn/browser-compat-data from 7.1.14 to 7.1.15 ([#953](https://github.com/mdn/fred/issues/953)) ([64151d6](https://github.com/mdn/fred/commit/64151d6030a5f5660419fddb1a4d1c391b9dd515))
25
+ * **deps-dev:** bump @mdn/browser-compat-data from 7.1.15 to 7.1.16 ([#999](https://github.com/mdn/fred/issues/999)) ([b4dc524](https://github.com/mdn/fred/commit/b4dc5242a5353902412db50f655c643aa5611a95))
26
+ * **deps-dev:** bump @mdn/browser-compat-data from 7.1.16 to 7.1.17 ([#1015](https://github.com/mdn/fred/issues/1015)) ([126d6ff](https://github.com/mdn/fred/commit/126d6ff93a877f5f990305e1532b74da0bf947f1))
27
+ * **deps-dev:** bump @types/express from 5.0.4 to 5.0.5 in the dev group ([#1009](https://github.com/mdn/fred/issues/1009)) ([2636ff3](https://github.com/mdn/fred/commit/2636ff3cfc4712a202f53d9b9e72d600f3bf2cfc))
28
+ * **deps-dev:** bump eslint-plugin-jsdoc from 55.0.3 to 61.1.4 ([2d50777](https://github.com/mdn/fred/commit/2d50777d71b76e605dad3c086225bac43bfd7eae))
29
+ * **deps-dev:** bump eslint-plugin-jsdoc from 55.0.3 to 61.1.4 ([#918](https://github.com/mdn/fred/issues/918)) ([2d50777](https://github.com/mdn/fred/commit/2d50777d71b76e605dad3c086225bac43bfd7eae))
30
+ * **deps-dev:** bump eslint-plugin-unicorn from 61.0.2 to 62.0.0 ([#998](https://github.com/mdn/fred/issues/998)) ([bdf76af](https://github.com/mdn/fred/commit/bdf76af48db723447d9377479b1a0ccb8b205253))
31
+ * **deps-dev:** bump lefthook from 1.13.6 to 2.0.0 ([#949](https://github.com/mdn/fred/issues/949)) ([8b5c31b](https://github.com/mdn/fred/commit/8b5c31b0b6d3f112751ffc529b91141305b80199))
32
+ * **deps-dev:** bump the dev group with 5 updates ([#958](https://github.com/mdn/fred/issues/958)) ([78ffe61](https://github.com/mdn/fred/commit/78ffe61f0415c2229a96bfd203bd4f7f6b0d78d6))
33
+ * **deps-dev:** bump the dev group with 5 updates ([#996](https://github.com/mdn/fred/issues/996)) ([e32d4c1](https://github.com/mdn/fred/commit/e32d4c1cc215d4fa405189e4ee2390946b881a90))
34
+ * **deps-dev:** migrate from `@typescript-eslint/eslint-plugin` to `typescript-eslint` ([#946](https://github.com/mdn/fred/issues/946)) ([2d50777](https://github.com/mdn/fred/commit/2d50777d71b76e605dad3c086225bac43bfd7eae))
35
+ * **deps:** bump @mdn/rari from 0.1.53 to 0.1.54 ([#1010](https://github.com/mdn/fred/issues/1010)) ([03480ae](https://github.com/mdn/fred/commit/03480aea9914f8b1450d3567d990ed0065e915d7))
36
+ * **deps:** bump @mdn/watify from 1.1.3 to 1.1.4 ([#1014](https://github.com/mdn/fred/issues/1014)) ([baafc43](https://github.com/mdn/fred/commit/baafc4373fb9f7762b086a81db0c1f61c01dde97))
37
+ * **deps:** bump @mdn/watify from 1.1.4 to 1.1.5 ([#1043](https://github.com/mdn/fred/issues/1043)) ([9dc734b](https://github.com/mdn/fred/commit/9dc734bb9787ce563d408929cf512b707c87ffc7))
38
+ * **l10n:** localize more strings ([#893](https://github.com/mdn/fred/issues/893)) ([8fd8227](https://github.com/mdn/fred/commit/8fd822729c16c75eabb59c28236b5f481870a07e))
39
+ * **menu:** improve Learn items ([#942](https://github.com/mdn/fred/issues/942)) ([32442b2](https://github.com/mdn/fred/commit/32442b2fa21af6b3c6089ab55d027879f95bb8ec))
40
+ * **menu:** update Layout Cookbook slugs ([#1023](https://github.com/mdn/fred/issues/1023)) ([d2d89ae](https://github.com/mdn/fred/commit/d2d89aef8ce72487b8e52085901f8153bd2b444e))
41
+ * migrate GitHub team references ([#1002](https://github.com/mdn/fred/issues/1002)) ([6f59543](https://github.com/mdn/fred/commit/6f5954333be011e38e9f9c49428d1465c1146e5f))
42
+ * **npm:** migrate to Trusted Publishing ([#1019](https://github.com/mdn/fred/issues/1019)) ([a4414ad](https://github.com/mdn/fred/commit/a4414adcef346860854e2193fcbb355b3fd8bfec))
43
+
3
44
  ## [1.7.0](https://github.com/mdn/fred/compare/v1.6.2...v1.7.0) (2025-10-21)
4
45
 
5
46
 
package/CONTRIBUTING.md CHANGED
@@ -46,7 +46,7 @@ If you want to contribute but don't know where to start or can't find a suitable
46
46
 
47
47
  Once you find an issue you'd like to work on, please post a comment saying you want to work on it.
48
48
  Something like "I want to work on this" is fine.
49
- Also, mention the community team using the `@mdn/mdn-community-engagement` handle to ensure someone will get back to you.
49
+ Also, mention the community team using the `@mdn/community` handle to ensure someone will get back to you.
50
50
 
51
51
  ## Asking for help
52
52
 
@@ -54,7 +54,7 @@ The best way to reach us with a question when contributing is to use the followi
54
54
 
55
55
  - [Start a discussion](https://github.com/orgs/mdn/discussions)
56
56
  - Ask your question or highlight your discussion on [Matrix](https://matrix.to/#/#mdn:mozilla.org).
57
- - File an issue and tag the community team using the `@mdn/mdn-community-engagement` handle.
57
+ - File an issue and tag the community team using the `@mdn/community` handle.
58
58
 
59
59
  ## Pull request process
60
60
 
package/README.md CHANGED
@@ -4,7 +4,12 @@ MDN's next fr(ont)e(n)d.
4
4
 
5
5
  ## Getting started
6
6
 
7
- 1. Copy `.env-dist` to `.env` and update
7
+ 1. Copy `.env-dist` to `.env` and update values as needed. The file contains comments for guidance:
8
+
9
+ ```bash
10
+ cp .env-dist .env
11
+ ```
12
+
8
13
  2. Install dependencies `npm install`
9
14
  3. Bring up the dev environment with `npm run start`
10
15
 
@@ -41,6 +46,30 @@ This is useful to test changes on mobile, tablets and other platforms.
41
46
 
42
47
  ## Development principles
43
48
 
49
+ ### Supported Browsers
50
+
51
+ _tl;dr_ For visitors to MDN, we support the _Baseline widely available browser set_, with some minor modifications.
52
+
53
+ #### Browsers
54
+
55
+ The [_Baseline widely available browser set_](https://developer.mozilla.org/en-US/docs/Glossary/Baseline/Compatibility) is defined as browsers from the _Core browser set_ whose initial release date is on or before 30 months prior to today's date, plus long-term support releases.
56
+
57
+ MDN supports these browsers, along with Firefox for iOS and all currently active Firefox ESR versions:
58
+
59
+ - Apple Safari (iOS, macOS) — released within the last 2½ years
60
+ - Google Chrome (Android, Desktop) — released within the last 2½ years
61
+ - Microsoft Edge (Desktop) — released within the last 2½ years
62
+ - Mozilla Firefox (Android, Desktop, iOS) — released within the last 2½ years
63
+ - Mozilla Firefox ESR — currently supported by Mozilla
64
+
65
+ #### "Supported"
66
+
67
+ In this context, _supported_ means that any issues with rendering or functionality are considered bugs and will be addressed as soon as reasonably possible.
68
+
69
+ For issues encountered while using unsupported browsers, we decide on a case-by-case assessment of whether the issue will be addressed; however, these issues may have lower priority. Issues with screen readers and other accessibility aids are likely to carry higher levels of importance.
70
+
71
+ We make our best efforts to design MDN to degrade gracefully; however, there are no guarantees of any level of functionality outside the supported browser set.
72
+
44
73
  ### Environment variables
45
74
 
46
75
  See [the environment variables README](./components/env/README.md).
@@ -72,7 +101,7 @@ Logs a CSP hash for the source of the file during the production build.
72
101
  Most commonly used alongside `?source` to import the source of a file for inlining in a component, which needs to be allowlisted in our CSP:
73
102
 
74
103
  ```js
75
- import inlineScript from "./inline.js?source&csp=true`;
104
+ import inlineScript from "./inline.js?source&csp=true";
76
105
  ```
77
106
 
78
107
  ### Layout
@@ -31,6 +31,18 @@
31
31
  display: none;
32
32
  }
33
33
 
34
+ mdn-color-theme,
35
+ mdn-language-switcher {
36
+ display: flex;
37
+ }
38
+
39
+ mdn-color-theme,
40
+ mdn-language-switcher,
41
+ mdn-color-theme::part(button),
42
+ mdn-language-switcher::part(button) {
43
+ height: 100%;
44
+ }
45
+
34
46
  @media (--screen-layout-1-sidebar-or-less) {
35
47
  &:has(mdn-toggle-sidebar) {
36
48
  padding-left: 0;
@@ -63,6 +63,7 @@ export class MDNColorTheme extends L10nMixin(LitElement) {
63
63
  return html`<div class="color-theme">
64
64
  <mdn-dropdown>
65
65
  <button
66
+ part="button"
66
67
  slot="button"
67
68
  class="color-theme__button"
68
69
  data-mode=${this._mode}
@@ -14,24 +14,6 @@ import styles from "./element.css?lit";
14
14
  * @typedef {"outdated"|"incomplete"|"code_examples"|"technical"|"consistency"|"incomprehensible"|"linguistic"|"other"} FeedbackReason
15
15
  */
16
16
 
17
- /** @type {Partial<Record<FeedbackReason, string>>} */
18
- const FEEDBACK_REASONS = {
19
- outdated: "Content is out of date",
20
- incomplete: "Missing information",
21
- code_examples: "Code examples not working as expected",
22
- other: "Other",
23
- };
24
-
25
- /** @type {Partial<Record<FeedbackReason, string>>} */
26
- const FEEDBACK_REASONS_DE = {
27
- technical: "Übersetzung enthält fachliche Fehler",
28
- consistency: "Begriffe sind inkonsistent übersetzt",
29
- incomprehensible: "Übersetzung ist nicht verständlich",
30
- linguistic: "Übersetzung enthält sprachliche Fehler",
31
- code_examples: "Code-Beispiele funktionieren nicht",
32
- other: "Sonstige",
33
- };
34
-
35
17
  export class MDNContentFeedback extends L10nMixin(LitElement) {
36
18
  static styles = styles;
37
19
 
@@ -70,6 +52,60 @@ export class MDNContentFeedback extends L10nMixin(LitElement) {
70
52
  gleanClick(`article_footer: feedback -> ${this._reason}`);
71
53
  }
72
54
 
55
+ /**
56
+ * Get list of feedback reasons with localized labels
57
+ * @returns {Array<{key: FeedbackReason, label: import("@lit").L10nResult}>}
58
+ */
59
+ _getFeedbackReasons() {
60
+ if (this.locale === "de") {
61
+ return [
62
+ {
63
+ key: "technical",
64
+ label: "Übersetzung enthält fachliche Fehler",
65
+ },
66
+ {
67
+ key: "consistency",
68
+ label: "Begriffe sind inkonsistent übersetzt",
69
+ },
70
+ {
71
+ key: "incomprehensible",
72
+ label: "Übersetzung ist nicht verständlich",
73
+ },
74
+ {
75
+ key: "linguistic",
76
+ label: "Übersetzung enthält sprachliche Fehler",
77
+ },
78
+ {
79
+ key: "code_examples",
80
+ label: "Code-Beispiele funktionieren nicht",
81
+ },
82
+ {
83
+ key: "other",
84
+ label: "Sonstige",
85
+ },
86
+ ];
87
+ }
88
+
89
+ return [
90
+ {
91
+ key: "outdated",
92
+ label: this.l10n`Content is out of date`,
93
+ },
94
+ {
95
+ key: "incomplete",
96
+ label: this.l10n`Missing information`,
97
+ },
98
+ {
99
+ key: "code_examples",
100
+ label: this.l10n`Code examples not working as expected`,
101
+ },
102
+ {
103
+ key: "other",
104
+ label: this.l10n`Other`,
105
+ },
106
+ ];
107
+ }
108
+
73
109
  _renderVote() {
74
110
  return html`<label
75
111
  >${this.l10n(
@@ -107,15 +143,15 @@ export class MDNContentFeedback extends L10nMixin(LitElement) {
107
143
  }
108
144
  };
109
145
 
146
+ const reasons = this._getFeedbackReasons();
147
+
110
148
  return html`<label
111
149
  >${this.l10n(
112
150
  "content-feedback-reason",
113
151
  )`Why was this page not helpful to you?`}</label
114
152
  >
115
- ${Object.entries(
116
- this.locale === "de" ? FEEDBACK_REASONS_DE : FEEDBACK_REASONS,
117
- ).map(
118
- ([key, label]) =>
153
+ ${reasons.map(
154
+ ({ key, label }) =>
119
155
  html`<div class="content-feedback--radios">
120
156
  <input
121
157
  type="radio"
@@ -119,7 +119,20 @@
119
119
 
120
120
  code {
121
121
  padding: 0.125em 0.25em;
122
- border-radius: 0.25em;
122
+ border-radius: var(--radius-normal);
123
+ }
124
+
125
+ kbd {
126
+ padding: 0.0625em 0.125em;
127
+
128
+ font-family: var(--font-family-code);
129
+
130
+ color: var(--color-text-secondary);
131
+
132
+ background-color: var(--color-background-primary);
133
+ border: 1px solid var(--color-border-primary);
134
+ border-bottom-width: 2px;
135
+ border-radius: var(--radius-normal);
123
136
  }
124
137
 
125
138
  img {
@@ -127,7 +140,7 @@
127
140
 
128
141
  margin: 2rem auto;
129
142
 
130
- background-color: var(--color-background-secondary);
143
+ background-color: var(--color-white);
131
144
  border: 1px solid var(--color-border-primary);
132
145
  border-radius: 0.25rem;
133
146
  }
@@ -8,6 +8,9 @@ export const PLAYGROUND_LOCAL = parseBool("PLAYGROUND_LOCAL", false, {
8
8
  runtime: true,
9
9
  });
10
10
  export const PORT = parseInt("PORT", 3000, { runtime: true });
11
+ export const OPEN_BROWSER_ON_START = parseBool("OPEN_BROWSER_ON_START", false, {
12
+ runtime: true,
13
+ });
11
14
  export const PLAYGROUND_PORT = parseInt("PLAYGROUND_PORT", 3001, {
12
15
  runtime: true,
13
16
  });
@@ -11,8 +11,6 @@ export class HeadingAnchor extends ServerComponent {
11
11
  * @param {string} title
12
12
  */
13
13
  render(level, id, title) {
14
- // remove leading numbers, dots, underscores, and commas to form a valid element id
15
- id = id ? id.replace(/^[0-9._,]+/, "") : id;
16
14
  return id
17
15
  ? hh`<${unsafeStatic("h" + level)} id=${ifDefined(id)} class="heading"><a class="heading-anchor" href="#${id}">${unsafeStatic(title)}</a></${unsafeStatic("h" + level)}>`
18
16
  : nothing;
@@ -1,8 +1,10 @@
1
1
  import { LitElement, html, nothing } from "lit";
2
2
 
3
+ import { L10nMixin } from "../../l10n/mixin.js";
4
+
3
5
  import styles from "./element.css?lit";
4
6
 
5
- export class MDNIssuesTable extends LitElement {
7
+ export class MDNIssuesTable extends L10nMixin(LitElement) {
6
8
  static styles = styles;
7
9
 
8
10
  static properties = {
@@ -58,7 +60,7 @@ export class MDNIssuesTable extends LitElement {
58
60
 
59
61
  render() {
60
62
  if (this._isLoading) {
61
- return html`loading issues…`;
63
+ return html`${this.l10n`loading issues…`}`;
62
64
  }
63
65
  if (this._error) {
64
66
  return html`${this._error}`;
@@ -71,8 +73,8 @@ export class MDNIssuesTable extends LitElement {
71
73
  <table>
72
74
  <thead>
73
75
  <tr>
74
- <th>Title</th>
75
- <th>Repository</th>
76
+ <th>${this.l10n`Title`}</th>
77
+ <th>${this.l10n`Repository`}</th>
76
78
  </tr>
77
79
  </thead>
78
80
  <tbody>
@@ -82,6 +82,7 @@ export class MDNLanguageSwitcher extends L10nMixin(LitElement) {
82
82
  return html`<div class="language-switcher">
83
83
  <mdn-dropdown>
84
84
  <button
85
+ part="button"
85
86
  slot="button"
86
87
  class="language-switcher__button"
87
88
  type="button"
@@ -104,15 +104,18 @@ export const TABS = [
104
104
  title: "Layout cookbook",
105
105
  items: [
106
106
  {
107
- slug: "Web/CSS/Layout_cookbook/Column_layouts",
107
+ slug: "Web/CSS/How_to/Layout_cookbook/Column_layouts",
108
108
  text: "Column layouts",
109
109
  },
110
110
  {
111
- slug: "Web/CSS/Layout_cookbook/Center_an_element",
111
+ slug: "Web/CSS/How_to/Layout_cookbook/Center_an_element",
112
112
  text: "Centering an element",
113
113
  },
114
- { slug: "Web/CSS/Layout_cookbook/Card", text: "Card component" },
115
- { slug: "Web/CSS/Layout_cookbook", text: "See all…" },
114
+ {
115
+ slug: "Web/CSS/How_to/Layout_cookbook/Card",
116
+ text: "Card component",
117
+ },
118
+ { slug: "Web/CSS/How_to/Layout_cookbook", text: "See all…" },
116
119
  ],
117
120
  },
118
121
  ],
@@ -285,12 +288,12 @@ export const TABS = [
285
288
  items: [
286
289
  {
287
290
  slug: "Learn_web_development/Getting_started",
288
- text: "Getting started",
291
+ text: "Getting started modules",
289
292
  },
290
- { slug: "Learn_web_development/Howto", text: "Common questions" },
293
+ { slug: "Learn_web_development/Core", text: "Core modules" },
291
294
  {
292
295
  href: "/en-US/curriculum/",
293
- text: "Curriculum",
296
+ text: "MDN Curriculum",
294
297
  },
295
298
  ],
296
299
  },
@@ -299,11 +302,7 @@ export const TABS = [
299
302
  items: [
300
303
  {
301
304
  slug: "Learn_web_development/Core/Structuring_content",
302
- text: "Introduction to HTML",
303
- },
304
- {
305
- slug: "Learn_web_development/Core/Structuring_content/Basic_HTML_syntax",
306
- text: "Getting started with HTML",
305
+ text: "Structuring content with HTML module",
307
306
  },
308
307
  ],
309
308
  },
@@ -311,12 +310,12 @@ export const TABS = [
311
310
  title: "Learn CSS",
312
311
  items: [
313
312
  {
314
- slug: "Learn_web_development/Core/Styling_basics/What_is_CSS",
315
- text: "What is CSS",
313
+ slug: "Learn_web_development/Core/Styling_basics",
314
+ text: "CSS styling basics module",
316
315
  },
317
316
  {
318
- slug: "Learn_web_development/Core/Styling_basics/Getting_started",
319
- text: "Getting started with CSS",
317
+ slug: "Learn_web_development/Core/CSS_layout",
318
+ text: "CSS layout module",
320
319
  },
321
320
  ],
322
321
  },
@@ -324,12 +323,8 @@ export const TABS = [
324
323
  title: "Learn JavaScript",
325
324
  items: [
326
325
  {
327
- slug: "Web/HTML/How_to/Use_data_attributes",
328
- text: "How to use data attributes",
329
- },
330
- {
331
- slug: "Web/HTML/How_to/Add_JavaScript_to_your_web_page",
332
- text: "Add JavaScript to your web page",
326
+ slug: "Learn_web_development/Core/Scripting",
327
+ text: "Dynamic scripting with JavaScript module",
333
328
  },
334
329
  ],
335
330
  },
@@ -1,32 +1,28 @@
1
1
  {
2
2
  "es": [
3
- "Web/API/HTML_DOM_API",
4
3
  "Web/API/History_API/Working_with_the_History_API",
5
4
  "Web/API/Web_Animations_API/Using_the_Web_Animations_API",
6
- "Web/CSS/CSS_values_and_units",
7
5
  "Web/CSS/CSS_backgrounds_and_borders/Box-shadow_generator",
8
6
  "Web/CSS/CSS_colors/Color_mixer",
9
7
  "Web/CSS/CSS_shapes/Shape_generator",
8
+ "Web/CSS/CSS_values_and_units",
10
9
  "Web/CSS/Guides",
11
- "Web/CSS/Layout_cookbook/Card",
12
- "Web/CSS/Layout_cookbook/Center_an_element",
13
- "Web/CSS/Layout_cookbook/Column_layouts",
10
+ "Web/CSS/How_to/Layout_cookbook/Card",
11
+ "Web/CSS/How_to/Layout_cookbook/Center_an_element",
12
+ "Web/CSS/How_to/Layout_cookbook/Column_layouts",
14
13
  "Web/CSS/Properties",
15
14
  "Web/HTML/Guides",
16
15
  "Web/HTML/Guides/Cheatsheet",
17
16
  "Web/HTML/Guides/Date_and_time_formats",
18
- "Web/HTML/How_to/Add_JavaScript_to_your_web_page",
19
17
  "Web/JavaScript/Guide/Using_classes",
20
18
  "Web/Privacy",
21
19
  "Web/URI",
22
20
  "Web/WebDriver"
23
21
  ],
24
22
  "fr": [],
25
- "ja": [
26
- "Web/CSS/CSS_colors/Color_mixer",
27
- "Web/CSS/CSS_shapes/Shape_generator"
28
- ],
23
+ "ja": [],
29
24
  "ko": [
25
+ "Learn_web_development/Core",
30
26
  "Web/API/Performance",
31
27
  "Web/API/Web_Animations_API/Using_the_Web_Animations_API",
32
28
  "Web/API/Web_Speech_API/Using_the_Web_Speech_API",
@@ -34,38 +30,36 @@
34
30
  "Web/CSS/CSS_colors/Color_mixer",
35
31
  "Web/CSS/CSS_shapes/Shape_generator",
36
32
  "Web/CSS/Guides",
37
- "Web/CSS/Layout_cookbook",
38
- "Web/CSS/Layout_cookbook/Card",
39
- "Web/CSS/Layout_cookbook/Column_layouts",
33
+ "Web/CSS/How_to/Layout_cookbook",
34
+ "Web/CSS/How_to/Layout_cookbook/Card",
35
+ "Web/CSS/How_to/Layout_cookbook/Column_layouts",
40
36
  "Web/CSS/Properties",
41
37
  "Web/HTML/Guides",
42
38
  "Web/HTML/Guides/Cheatsheet",
43
- "Web/HTML/How_to/Add_JavaScript_to_your_web_page",
44
39
  "Web/JavaScript/Guide/Using_classes",
45
- "Web/URI",
46
40
  "Web/WebDriver"
47
41
  ],
48
42
  "pt-BR": [
43
+ "Learn_web_development/Core",
49
44
  "Learn_web_development/Getting_started",
50
45
  "Web/API/File_System_API",
51
46
  "Web/API/HTML_DOM_API",
52
47
  "Web/API/Performance",
53
48
  "Web/API/Web_Speech_API/Using_the_Web_Speech_API",
54
49
  "Web/API/Web_Workers_API/Using_web_workers",
55
- "Web/CSS/CSS_values_and_units",
56
50
  "Web/CSS/CSS_backgrounds_and_borders/Box-shadow_generator",
57
51
  "Web/CSS/CSS_colors",
58
52
  "Web/CSS/CSS_colors/Color_mixer",
59
53
  "Web/CSS/CSS_shapes/Shape_generator",
54
+ "Web/CSS/CSS_values_and_units",
60
55
  "Web/CSS/Guides",
61
- "Web/CSS/Layout_cookbook/Card",
62
- "Web/CSS/Layout_cookbook/Center_an_element",
63
- "Web/CSS/Layout_cookbook/Column_layouts",
56
+ "Web/CSS/How_to/Layout_cookbook/Card",
57
+ "Web/CSS/How_to/Layout_cookbook/Center_an_element",
58
+ "Web/CSS/How_to/Layout_cookbook/Column_layouts",
64
59
  "Web/CSS/Properties",
65
60
  "Web/HTML/Guides",
66
61
  "Web/HTML/Guides/Cheatsheet",
67
62
  "Web/HTML/Guides/Date_and_time_formats",
68
- "Web/HTML/How_to/Add_JavaScript_to_your_web_page",
69
63
  "Web/JavaScript/Guide/Using_classes",
70
64
  "Web/Media",
71
65
  "Web/Privacy",
@@ -74,20 +68,20 @@
74
68
  "Web/XML"
75
69
  ],
76
70
  "ru": [
71
+ "Learn_web_development/Core",
77
72
  "Learn_web_development/Getting_started",
78
73
  "Web/API/HTML_DOM_API",
79
- "Web/CSS/CSS_values_and_units",
80
74
  "Web/CSS/CSS_colors/Color_mixer",
81
75
  "Web/CSS/CSS_shapes/Shape_generator",
76
+ "Web/CSS/CSS_values_and_units",
82
77
  "Web/CSS/Guides",
83
- "Web/CSS/Layout_cookbook/Card",
84
- "Web/CSS/Layout_cookbook/Center_an_element",
85
- "Web/CSS/Layout_cookbook/Column_layouts",
78
+ "Web/CSS/How_to/Layout_cookbook/Card",
79
+ "Web/CSS/How_to/Layout_cookbook/Center_an_element",
80
+ "Web/CSS/How_to/Layout_cookbook/Column_layouts",
86
81
  "Web/CSS/Properties",
87
82
  "Web/HTML/Guides",
88
83
  "Web/HTML/Guides/Cheatsheet",
89
84
  "Web/HTML/Guides/Date_and_time_formats",
90
- "Web/HTML/How_to/Add_JavaScript_to_your_web_page",
91
85
  "Web/JavaScript/Guide/Using_classes",
92
86
  "Web/Media",
93
87
  "Web/Privacy",
@@ -95,6 +89,7 @@
95
89
  ],
96
90
  "zh-CN": ["Web/CSS/Properties"],
97
91
  "zh-TW": [
92
+ "Learn_web_development/Core",
98
93
  "Learn_web_development/Getting_started",
99
94
  "Web/API/File_System_API",
100
95
  "Web/API/HTML_DOM_API",
@@ -104,7 +99,6 @@
104
99
  "Web/API/Service_Worker_API",
105
100
  "Web/API/Web_Animations_API/Using_the_Web_Animations_API",
106
101
  "Web/API/Web_Speech_API/Using_the_Web_Speech_API",
107
- "Web/CSS/CSS_values_and_units",
108
102
  "Web/CSS/CSS_backgrounds_and_borders/Border-image_generator",
109
103
  "Web/CSS/CSS_backgrounds_and_borders/Border-radius_generator",
110
104
  "Web/CSS/CSS_backgrounds_and_borders/Box-shadow_generator",
@@ -113,19 +107,18 @@
113
107
  "Web/CSS/CSS_colors/Color_mixer",
114
108
  "Web/CSS/CSS_shapes/Shape_generator",
115
109
  "Web/CSS/CSS_syntax/At-rule",
110
+ "Web/CSS/CSS_values_and_units",
116
111
  "Web/CSS/Guides",
117
- "Web/CSS/Layout_cookbook",
118
- "Web/CSS/Layout_cookbook/Card",
119
- "Web/CSS/Layout_cookbook/Center_an_element",
120
- "Web/CSS/Layout_cookbook/Column_layouts",
112
+ "Web/CSS/How_to/Layout_cookbook",
113
+ "Web/CSS/How_to/Layout_cookbook/Card",
114
+ "Web/CSS/How_to/Layout_cookbook/Center_an_element",
115
+ "Web/CSS/How_to/Layout_cookbook/Column_layouts",
121
116
  "Web/CSS/Properties",
122
117
  "Web/CSS/Reference",
123
118
  "Web/HTML/Guides",
124
119
  "Web/HTML/Guides/Cheatsheet",
125
120
  "Web/HTML/Guides/Date_and_time_formats",
126
121
  "Web/HTML/Guides/Responsive_images",
127
- "Web/HTML/How_to/Add_JavaScript_to_your_web_page",
128
- "Web/HTML/How_to/Use_data_attributes",
129
122
  "Web/HTML/Reference/Elements",
130
123
  "Web/HTML/Reference/Global_attributes",
131
124
  "Web/JavaScript/Guide/Using_classes",
@@ -1,11 +1,12 @@
1
1
  import { LitElement, html, nothing } from "lit";
2
2
 
3
+ import { L10nMixin } from "../../l10n/mixin.js";
3
4
  import exitIcon from "../icon/cancel.svg?lit";
4
5
 
5
6
  import "../button/element.js";
6
7
  import styles from "./element.css?lit";
7
8
 
8
- export class MDNModal extends LitElement {
9
+ export class MDNModal extends L10nMixin(LitElement) {
9
10
  static styles = styles;
10
11
 
11
12
  static properties = {
@@ -35,7 +36,7 @@ export class MDNModal extends LitElement {
35
36
  icon-only
36
37
  .icon=${exitIcon}
37
38
  @click=${this.close}
38
- >Exit modal</mdn-button
39
+ >${this.l10n`Exit modal`}</mdn-button
39
40
  >
40
41
  </header>
41
42
  <slot></slot>
@@ -29,7 +29,7 @@ export class Navigation extends ServerComponent {
29
29
  type="button"
30
30
  aria-expanded="false"
31
31
  aria-controls="navigation__popup"
32
- aria-label="Toggle navigation"
32
+ aria-label=${context.l10n`Toggle navigation`}
33
33
  ></button>
34
34
  <div class="navigation__popup" id="navigation__popup">
35
35
  <div class="navigation__menu">${Menu.render(context)}</div>