@mdn/fred 1.5.0 → 1.6.1
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.
- package/CHANGELOG.md +35 -0
- package/components/homepage-body/server.js +5 -0
- package/components/menu/constants.js +8 -20
- package/components/menu/server.js +5 -2
- package/components/placement-top/element.js +3 -5
- package/components/recently-visited/element.css +35 -0
- package/components/recently-visited/element.js +26 -0
- package/components/recently-visited/index.js +64 -0
- package/components/record-visit/element.js +34 -0
- package/components/reference-layout/server.css +1 -1
- package/components/reference-layout/server.js +3 -2
- package/components/survey/README.md +5 -0
- package/components/survey/element.css +10 -0
- package/components/survey/element.js +45 -35
- package/components/survey/surveys.js +25 -21
- package/components/survey/types.d.ts +2 -0
- package/components/writer-toolbar/server.js +3 -0
- package/out/service-worker.js +1 -1
- package/out/service-worker.js.map +1 -1
- package/out/static/client/2936.d694758cdb9cca05.js +2 -0
- package/out/static/client/2936.d694758cdb9cca05.js.map +1 -0
- package/out/static/client/{3132.31660ef023aedecd.js → 3132.4c9442f0ff50faf5.js} +19 -19
- package/out/static/client/{3132.31660ef023aedecd.js.map → 3132.4c9442f0ff50faf5.js.map} +1 -1
- package/out/static/client/3279.af292ae0820e0f6d.js +33 -0
- package/out/static/client/3279.af292ae0820e0f6d.js.map +1 -0
- package/out/static/client/3330.4148ebc5659cafd0.js +2 -0
- package/out/static/client/3330.4148ebc5659cafd0.js.map +1 -0
- package/out/static/client/486.bb14d2f437221509.js +5 -0
- package/out/static/client/486.bb14d2f437221509.js.map +1 -0
- package/out/static/client/9566.e7da9862e9ae2e3f.js +2 -0
- package/out/static/client/9566.e7da9862e9ae2e3f.js.map +1 -0
- package/out/static/client/9804.307d2bd47ea925e6.js +2 -0
- package/out/static/client/9804.307d2bd47ea925e6.js.map +1 -0
- package/out/static/client/{index.d61d794e5ecbd37a.js → index.db196dc46f1ac46c.js} +4 -4
- package/out/static/client/index.db196dc46f1ac46c.js.map +1 -0
- package/out/static/client/{runtime.35c4249bd039427b.js → runtime.27e033484190f93b.js} +2 -2
- package/out/static/client/runtime.27e033484190f93b.js.map +1 -0
- package/out/static/client/stats.json +262 -262
- package/out/static/client/{styles-a11y-menu.2ceb769da0120261.js → styles-a11y-menu.ce2587e83b9d2135.js} +1 -1
- package/out/static/client/{styles-advertising.7adabd576561f3e6.js → styles-advertising.ee8a14c6c67283c3.js} +1 -1
- package/out/static/client/{styles-article-footer.5c9b71d2d3395a7c.js → styles-article-footer.4d5b2d9b056cde59.js} +1 -1
- package/out/static/client/{styles-banner.9d224da378ce969d.js → styles-banner.8fd28aa89146dbdb.js} +1 -1
- package/out/static/client/styles-baseline-indicator.36106be6ca127595.js +1 -0
- package/out/static/client/{styles-blog-index.e7af7243aac02887.js → styles-blog-index.d6e232d7b78e732b.js} +1 -1
- package/out/static/client/{styles-blog-post.63e8c3e251da4ef9.js → styles-blog-post.a97f45d578b9c6d7.js} +1 -1
- package/out/static/client/{styles-breadcrumbs-bar.7490a9d0d1211982.js → styles-breadcrumbs-bar.a0c9f135ff00dbf8.js} +1 -1
- package/out/static/client/{styles-breadcrumbs.cc7291252773154c.js → styles-breadcrumbs.470e2141b512134e.js} +1 -1
- package/out/static/client/{styles-button.7e41bfdbe8042273.js → styles-button.38e3b1ebb5fd2e15.js} +1 -1
- package/out/static/client/{styles-content-section.25c29d94b128761d.js → styles-content-section.e068d5efdd83eb2a.js} +1 -1
- package/out/static/client/styles-contributor-spotlight.2d83d588fd4f4e47.js +1 -0
- package/out/static/client/{styles-curriculum-about.6bc1a13e4fa9f39a.js → styles-curriculum-about.37621a5a4fc4992f.js} +1 -1
- package/out/static/client/styles-curriculum-default.285a1e351d549b93.js +1 -0
- package/out/static/client/styles-curriculum-landing.109f492769f6c7a1.js +1 -0
- package/out/static/client/{styles-curriculum-module.a7bed396f12c806d.js → styles-curriculum-module.1fa90442cce8eecc.js} +1 -1
- package/out/static/client/styles-curriculum-overview.a51e5d26a3bf85c3.js +1 -0
- package/out/static/client/{styles-featured-articles.0cf4e007e6b328f8.js → styles-featured-articles.d6ffde752d8e9c24.js} +1 -1
- package/out/static/client/{styles-footer.ffa197667db94c60.js → styles-footer.6b2237415fa37b9b.js} +1 -1
- package/out/static/client/{styles-generic-about.49dfdc1457f9ef37.js → styles-generic-about.c7b0920661ae0e65.js} +1 -1
- package/out/static/client/{styles-generic-community.a9b56c9e9a77c370.js → styles-generic-community.270a194f0dfb292e.js} +1 -1
- package/out/static/client/{styles-generic-content.b9df075920437e8c.js → styles-generic-content.ddbfc46464be8713.js} +1 -1
- package/out/static/client/{styles-generic-layout.a2e6413657fae615.js → styles-generic-layout.49ecdb1edca3cff7.js} +1 -1
- package/out/static/client/{styles-generic-sidebar.75bca0c7cfc13c23.js → styles-generic-sidebar.401526542a975971.js} +1 -1
- package/out/static/client/{styles-generic-toc.f6feb3d24a0086c8.js → styles-generic-toc.02c1d93c8dd2c206.js} +1 -1
- package/out/static/client/styles-global.c9f2a49e47bf5c55.css +2 -0
- package/out/static/client/{styles-global.684fd2c5254c94b8.css.map → styles-global.c9f2a49e47bf5c55.css.map} +1 -1
- package/out/static/client/{styles-global.f17e574d10066602.js → styles-global.ee8053c9a16002d4.js} +1 -1
- package/out/static/client/{styles-heading-anchor.b8909454f752b8ed.js → styles-heading-anchor.af0af69ba0ce3837.js} +1 -1
- package/out/static/client/{styles-homepage-body.992e8c3030679ed3.js → styles-homepage-body.fc9b3c01cb6239db.js} +1 -1
- package/out/static/client/styles-homepage-contributor-spotlight.678b81ccf8c9585b.js +1 -0
- package/out/static/client/{styles-homepage-footer.366c0e48a34c6e0a.js → styles-homepage-footer.148e1ae4815a95c5.js} +1 -1
- package/out/static/client/{styles-homepage-header.c19924571767d333.js → styles-homepage-header.bde2181288c5bdc5.js} +1 -1
- package/out/static/client/{styles-homepage-hero.d5d84e6ccf60912f.js → styles-homepage-hero.a1e69d4935421230.js} +1 -1
- package/out/static/client/{styles-homepage.046a3e7acc704ffb.js → styles-homepage.4dac740f0935bb20.js} +1 -1
- package/out/static/client/{styles-latest-news.b8bc34eb2b7059f3.js → styles-latest-news.5af4f6c5549190cc.js} +1 -1
- package/out/static/client/{styles-left-sidebar.6252b35503f4bad5.js → styles-left-sidebar.1bd4c9f57edfa21d.js} +1 -1
- package/out/static/client/{styles-logo.c3a8eb2d0c492233.js → styles-logo.e6f047480d8b413c.js} +1 -1
- package/out/static/client/{styles-mandala.79befc40612d83e2.js → styles-mandala.85aa0917c5ded149.js} +1 -1
- package/out/static/client/{styles-menu.086320c17cbb4b04.js → styles-menu.a61ce9773751f1d4.js} +1 -1
- package/out/static/client/{styles-navigation.e41bd6f01abcff92.js → styles-navigation.feedffa9c6952cbe.js} +1 -1
- package/out/static/client/{styles-not-found.7c8c5b9a0e19b8a9.js → styles-not-found.82bfa29eee2c87db.js} +1 -1
- package/out/static/client/styles-observatory-landing.2a4b2c96812f32b6.js +1 -0
- package/out/static/client/styles-observatory-results.3dfae2ffbd96cfae.js +1 -0
- package/out/static/client/{styles-page-layout.25d000b0743f4016.js → styles-page-layout.c5c05df3fe53f77b.js} +1 -1
- package/out/static/client/{styles-pagination.419ec2aa3d5c71a7.js → styles-pagination.ad079f4927bac44a.js} +1 -1
- package/out/static/client/{styles-playground.8872c57657435fd3.js → styles-playground.4364c516f6615f6f.js} +1 -1
- package/out/static/client/styles-recent-contributions.030603cc5127700a.js +1 -0
- package/out/static/client/{styles-reference-layout.80c4db43006c4b34.js → styles-reference-layout.11f35dfd7cb7f5fc.js} +1 -1
- package/out/static/client/styles-reference-layout.be92c8fb52c5622b.css +2 -0
- package/out/static/client/styles-reference-layout.be92c8fb52c5622b.css.map +1 -0
- package/out/static/client/{styles-reference-toc.36356f60a623ac90.js → styles-reference-toc.3453bdb696f82a2c.js} +1 -1
- package/out/static/client/{styles-sandbox.96878ad6e02a855b.js → styles-sandbox.4c33dc3bc0f1eea2.js} +1 -1
- package/out/static/client/{styles-site-search.20078a00977a55aa.js → styles-site-search.01a967c382d8da1f.js} +1 -1
- package/out/static/client/{styles-translation-banner.a66d4ad418df4023.js → styles-translation-banner.4d7f6010548995e0.js} +1 -1
- package/out/static/client/{styles-writer-toolbar.8bd519dc7b52b67b.js → styles-writer-toolbar.2e3fade0db754b72.js} +1 -1
- package/out/static/client/{styles.609dbfdb35b7eee7.js → styles.5cb6809f960cb6d5.js} +2 -2
- package/out/static/client/{styles.609dbfdb35b7eee7.js.map → styles.5cb6809f960cb6d5.js.map} +1 -1
- package/out/static/legacy/{1539.7e1697ed14914723.js → 1539.85dfd82e5678bcd1.js} +4 -4
- package/out/static/legacy/{1539.7e1697ed14914723.js.map → 1539.85dfd82e5678bcd1.js.map} +1 -1
- package/out/static/legacy/asset-manifest.json +7 -7
- package/out/static/legacy/{index.5a039200ae9a358a.js → index.66ef13fe869f8d43.js} +3 -3
- package/out/static/legacy/{index.5a039200ae9a358a.js.map → index.66ef13fe869f8d43.js.map} +1 -1
- package/out/static/legacy/{index.d7733ed68102743e.html → index.ada5bb78e9e86c98.html} +1 -1
- package/out/static/legacy/stats.json +7 -7
- package/out/static/legacy/{yari.a53de09ad69cd193.js → yari.4e0236da42985a90.js} +3 -3
- package/out/static/legacy/{yari.a53de09ad69cd193.js.map → yari.4e0236da42985a90.js.map} +1 -1
- package/out/static/ssr/index.js +62 -47
- package/out/static/ssr/index.js.map +1 -1
- package/out/static/ssr/stats.json +4 -4
- package/package.json +9 -9
- package/types/element-map.d.ts +2 -0
- package/out/static/client/2936.45c52ae3ada1ba52.js +0 -2
- package/out/static/client/2936.45c52ae3ada1ba52.js.map +0 -1
- package/out/static/client/3279.c247237095588115.js +0 -27
- package/out/static/client/3279.c247237095588115.js.LICENSE.txt +0 -5
- package/out/static/client/3279.c247237095588115.js.map +0 -1
- package/out/static/client/9804.f51f5d1ea2fd9564.js +0 -2
- package/out/static/client/9804.f51f5d1ea2fd9564.js.map +0 -1
- package/out/static/client/index.d61d794e5ecbd37a.js.map +0 -1
- package/out/static/client/runtime.35c4249bd039427b.js.map +0 -1
- package/out/static/client/styles-baseline-indicator.f8ef541b7fc98d85.js +0 -1
- package/out/static/client/styles-contributor-spotlight.ddb49136aac4d2f2.js +0 -1
- package/out/static/client/styles-curriculum-default.a267a3f808f44b7b.js +0 -1
- package/out/static/client/styles-curriculum-landing.e3772cfb8fda5a32.js +0 -1
- package/out/static/client/styles-curriculum-overview.59ca99c0a0d2603d.js +0 -1
- package/out/static/client/styles-global.684fd2c5254c94b8.css +0 -2
- package/out/static/client/styles-homepage-contributor-spotlight.90291e9be7f332cc.js +0 -1
- package/out/static/client/styles-observatory-landing.d3534bcc6875ab9f.js +0 -1
- package/out/static/client/styles-observatory-results.c98d9c0afb2ccbbe.js +0 -1
- package/out/static/client/styles-recent-contributions.5ef28ac6e9429ebb.js +0 -1
- package/out/static/client/styles-reference-layout.d6cf97d60124f649.css +0 -2
- package/out/static/client/styles-reference-layout.d6cf97d60124f649.css.map +0 -1
- /package/out/static/client/{index.d61d794e5ecbd37a.js.LICENSE.txt → index.db196dc46f1ac46c.js.LICENSE.txt} +0 -0
- /package/out/static/legacy/{1539.7e1697ed14914723.js.LICENSE.txt → 1539.85dfd82e5678bcd1.js.LICENSE.txt} +0 -0
- /package/out/static/legacy/{index.5a039200ae9a358a.js.LICENSE.txt → index.66ef13fe869f8d43.js.LICENSE.txt} +0 -0
- /package/out/static/legacy/{yari.a53de09ad69cd193.js.LICENSE.txt → yari.4e0236da42985a90.js.LICENSE.txt} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.6.1](https://github.com/mdn/fred/compare/v1.6.0...v1.6.1) (2025-10-03)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **menu:** update Color format converter link (Color picker) ([#816](https://github.com/mdn/fred/issues/816)) ([7422d4b](https://github.com/mdn/fred/commit/7422d4b024967a5cd0765a8a546e27a381541c73))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Miscellaneous
|
|
12
|
+
|
|
13
|
+
* **deps:** bump @codemirror/lang-html from 6.4.10 to 6.4.11 in the prod group ([#854](https://github.com/mdn/fred/issues/854)) ([3e8572c](https://github.com/mdn/fred/commit/3e8572cad623795fd12facc043c421a9850fe9b4))
|
|
14
|
+
* **menu:** update missing docs ([#860](https://github.com/mdn/fred/issues/860)) ([212bfbc](https://github.com/mdn/fred/commit/212bfbca3b522f7c624674bc80641974d674c251))
|
|
15
|
+
* **survey:** add developer survey 2025 ([#853](https://github.com/mdn/fred/issues/853)) ([71acaf1](https://github.com/mdn/fred/commit/71acaf165f8b1136a1c92990b70a6e55b990fd34))
|
|
16
|
+
|
|
17
|
+
## [1.6.0](https://github.com/mdn/fred/compare/v1.5.0...v1.6.0) (2025-10-01)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* **writer-mode:** add recently visited list to homepage ([#821](https://github.com/mdn/fred/issues/821)) ([19d36f2](https://github.com/mdn/fred/commit/19d36f2748f735e838c6825f505ededa6c0db167))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* **placement-top:** show fallback if unfilled ([#838](https://github.com/mdn/fred/issues/838)) ([61e2025](https://github.com/mdn/fred/commit/61e20255ac5b942e405f6697a47d0fba504bd7e2))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Miscellaneous
|
|
31
|
+
|
|
32
|
+
* **deps-dev:** bump @mdn/browser-compat-data from 7.1.6 to 7.1.8 ([#836](https://github.com/mdn/fred/issues/836)) ([a08b60f](https://github.com/mdn/fred/commit/a08b60f5e6adce641862416bdf0d3c95ee25eb7d))
|
|
33
|
+
* **deps-dev:** bump @mdn/browser-compat-data from 7.1.8 to 7.1.9 ([#844](https://github.com/mdn/fred/issues/844)) ([446f19b](https://github.com/mdn/fred/commit/446f19b225d62611575d5bfa8fe67dbc23b00ed6))
|
|
34
|
+
* **deps-dev:** bump the dev group with 3 updates ([#824](https://github.com/mdn/fred/issues/824)) ([50bc063](https://github.com/mdn/fred/commit/50bc063d14612c78c2800701fa1268427cd4eb2d))
|
|
35
|
+
* **deps:** bump @mdn/rari from 0.1.50 to 0.1.51 ([#841](https://github.com/mdn/fred/issues/841)) ([1609bb0](https://github.com/mdn/fred/commit/1609bb010a2335f5d8c6f90973f1b35ccce9056e))
|
|
36
|
+
* **deps:** promote source-map-support ([#846](https://github.com/mdn/fred/issues/846)) ([467d496](https://github.com/mdn/fred/commit/467d496ac1f22b8d67953d4f607812d6ea9cecbd))
|
|
37
|
+
|
|
3
38
|
## [1.5.0](https://github.com/mdn/fred/compare/v1.4.0...v1.5.0) (2025-09-24)
|
|
4
39
|
|
|
5
40
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { html } from "@lit-labs/ssr";
|
|
2
|
+
import { nothing } from "lit";
|
|
2
3
|
|
|
4
|
+
import { WRITER_MODE } from "../env/index.js";
|
|
3
5
|
import { FeaturedArticles } from "../featured-articles/server.js";
|
|
4
6
|
|
|
5
7
|
import { LatestNews } from "../latest-news/server.js";
|
|
@@ -12,6 +14,9 @@ export class HomepageBody extends ServerComponent {
|
|
|
12
14
|
*/
|
|
13
15
|
render(context) {
|
|
14
16
|
return html`<div class="homepage-body">
|
|
17
|
+
${WRITER_MODE && context.localServer
|
|
18
|
+
? html`<mdn-recently-visited></mdn-recently-visited>`
|
|
19
|
+
: nothing}
|
|
15
20
|
<section>
|
|
16
21
|
<h2>${context.l10n`Featured articles`}</h2>
|
|
17
22
|
${FeaturedArticles.render(context.hyData.featuredArticles)}
|
|
@@ -7,14 +7,13 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export const MISSING_DOCS = {
|
|
9
9
|
es: [
|
|
10
|
-
"Web/API/File_System_API",
|
|
11
10
|
"Web/API/HTML_DOM_API",
|
|
12
11
|
"Web/API/History_API/Working_with_the_History_API",
|
|
13
12
|
"Web/API/Web_Animations_API/Using_the_Web_Animations_API",
|
|
13
|
+
"Web/CSS/CSS_Values_and_Units",
|
|
14
14
|
"Web/CSS/CSS_backgrounds_and_borders/Box-shadow_generator",
|
|
15
15
|
"Web/CSS/CSS_colors/Color_mixer",
|
|
16
16
|
"Web/CSS/CSS_shapes/Shape_generator",
|
|
17
|
-
"Web/CSS/CSS_Values_and_Units",
|
|
18
17
|
"Web/CSS/Guides",
|
|
19
18
|
"Web/CSS/Layout_cookbook/Card",
|
|
20
19
|
"Web/CSS/Layout_cookbook/Center_an_element",
|
|
@@ -30,22 +29,8 @@ export const MISSING_DOCS = {
|
|
|
30
29
|
"Web/WebDriver",
|
|
31
30
|
],
|
|
32
31
|
fr: [
|
|
33
|
-
"Learn_web_development/Getting_started",
|
|
34
|
-
"Web/API/File_System_API",
|
|
35
|
-
"Web/API/HTML_DOM_API",
|
|
36
|
-
"Web/API/Web_Animations_API/Using_the_Web_Animations_API",
|
|
37
32
|
"Web/CSS/CSS_box_model/Introduction_to_the_CSS_box_model",
|
|
38
|
-
"Web/CSS/CSS_colors/Color_mixer",
|
|
39
|
-
"Web/CSS/CSS_colors/Color_picker",
|
|
40
33
|
"Web/CSS/CSS_shapes/Shape_generator",
|
|
41
|
-
"Web/CSS/Guides",
|
|
42
|
-
"Web/CSS/Properties",
|
|
43
|
-
"Web/HTML/Guides",
|
|
44
|
-
"Web/JavaScript/Guide/Using_classes",
|
|
45
|
-
"Web/Media",
|
|
46
|
-
"Web/Privacy",
|
|
47
|
-
"Web/URI",
|
|
48
|
-
"Web/WebDriver",
|
|
49
34
|
],
|
|
50
35
|
ja: ["Web/CSS/CSS_colors/Color_mixer", "Web/CSS/CSS_shapes/Shape_generator"],
|
|
51
36
|
ko: [
|
|
@@ -93,14 +78,15 @@ export const MISSING_DOCS = {
|
|
|
93
78
|
"Web/Privacy",
|
|
94
79
|
"Web/URI",
|
|
95
80
|
"Web/WebDriver",
|
|
81
|
+
"Web/XML",
|
|
96
82
|
],
|
|
97
83
|
ru: [
|
|
98
84
|
"Learn_web_development/Getting_started",
|
|
99
85
|
"Web/API/HTML_DOM_API",
|
|
100
86
|
"Web/CSS/CSS_Values_and_Units",
|
|
101
|
-
"Web/CSS/Guides",
|
|
102
87
|
"Web/CSS/CSS_colors/Color_mixer",
|
|
103
88
|
"Web/CSS/CSS_shapes/Shape_generator",
|
|
89
|
+
"Web/CSS/Guides",
|
|
104
90
|
"Web/CSS/Layout_cookbook/Card",
|
|
105
91
|
"Web/CSS/Layout_cookbook/Center_an_element",
|
|
106
92
|
"Web/CSS/Layout_cookbook/Column_layouts",
|
|
@@ -115,9 +101,9 @@ export const MISSING_DOCS = {
|
|
|
115
101
|
"Web/WebDriver",
|
|
116
102
|
],
|
|
117
103
|
"zh-CN": [
|
|
118
|
-
"Web/CSS/Properties",
|
|
119
104
|
"Web/CSS/CSS_colors/Color_mixer",
|
|
120
105
|
"Web/CSS/CSS_shapes/Shape_generator",
|
|
106
|
+
"Web/CSS/Properties",
|
|
121
107
|
],
|
|
122
108
|
"zh-TW": [
|
|
123
109
|
"Learn_web_development/Getting_started",
|
|
@@ -129,14 +115,14 @@ export const MISSING_DOCS = {
|
|
|
129
115
|
"Web/API/Service_Worker_API",
|
|
130
116
|
"Web/API/Web_Animations_API/Using_the_Web_Animations_API",
|
|
131
117
|
"Web/API/Web_Speech_API/Using_the_Web_Speech_API",
|
|
132
|
-
"Web/CSS/CSS_colors/Color_mixer",
|
|
133
|
-
"Web/CSS/CSS_shapes/Shape_generator",
|
|
134
118
|
"Web/CSS/CSS_Values_and_Units",
|
|
135
119
|
"Web/CSS/CSS_backgrounds_and_borders/Border-image_generator",
|
|
136
120
|
"Web/CSS/CSS_backgrounds_and_borders/Border-radius_generator",
|
|
137
121
|
"Web/CSS/CSS_backgrounds_and_borders/Box-shadow_generator",
|
|
138
122
|
"Web/CSS/CSS_box_model/Introduction_to_the_CSS_box_model",
|
|
139
123
|
"Web/CSS/CSS_colors",
|
|
124
|
+
"Web/CSS/CSS_colors/Color_mixer",
|
|
125
|
+
"Web/CSS/CSS_shapes/Shape_generator",
|
|
140
126
|
"Web/CSS/CSS_syntax/At-rule",
|
|
141
127
|
"Web/CSS/Guides",
|
|
142
128
|
"Web/CSS/Layout_cookbook",
|
|
@@ -146,6 +132,7 @@ export const MISSING_DOCS = {
|
|
|
146
132
|
"Web/CSS/Properties",
|
|
147
133
|
"Web/CSS/Reference",
|
|
148
134
|
"Web/HTML/Guides",
|
|
135
|
+
"Web/HTML/Guides/Cheatsheet",
|
|
149
136
|
"Web/HTML/Guides/Date_and_time_formats",
|
|
150
137
|
"Web/HTML/Guides/Responsive_images",
|
|
151
138
|
"Web/HTML/How_to/Add_JavaScript_to_your_web_page",
|
|
@@ -159,5 +146,6 @@ export const MISSING_DOCS = {
|
|
|
159
146
|
"Web/Privacy",
|
|
160
147
|
"Web/URI",
|
|
161
148
|
"Web/WebDriver",
|
|
149
|
+
"Web/XML",
|
|
162
150
|
],
|
|
163
151
|
};
|
|
@@ -618,10 +618,13 @@ export class Menu extends ServerComponent {
|
|
|
618
618
|
)}
|
|
619
619
|
</li>
|
|
620
620
|
<li>
|
|
621
|
-
${link(
|
|
621
|
+
${link(
|
|
622
|
+
"Web/CSS/CSS_colors/Color_format_converter",
|
|
623
|
+
"Color format converter",
|
|
624
|
+
)}
|
|
622
625
|
</li>
|
|
623
626
|
<li>
|
|
624
|
-
${link("Web/CSS/CSS_colors/
|
|
627
|
+
${link("Web/CSS/CSS_colors/Color_mixer", "Color mixer")}
|
|
625
628
|
</li>
|
|
626
629
|
<li>
|
|
627
630
|
${link(
|
|
@@ -14,8 +14,6 @@ import styles from "./element.css?lit";
|
|
|
14
14
|
* @import { TemplateResult } from "lit";
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
const EMPTY = html`<div class="top-placement empty"></div>`;
|
|
18
|
-
|
|
19
17
|
export class MDNPlacementTop extends PlacementMixin(LitElement) {
|
|
20
18
|
static styles = styles;
|
|
21
19
|
|
|
@@ -24,7 +22,7 @@ export class MDNPlacementTop extends PlacementMixin(LitElement) {
|
|
|
24
22
|
* @returns {TemplateResult | symbol}
|
|
25
23
|
*/
|
|
26
24
|
renderInitial() {
|
|
27
|
-
return
|
|
25
|
+
return html`<div class="top-placement empty"></div>`;
|
|
28
26
|
}
|
|
29
27
|
|
|
30
28
|
renderFallback() {
|
|
@@ -58,7 +56,7 @@ export class MDNPlacementTop extends PlacementMixin(LitElement) {
|
|
|
58
56
|
|
|
59
57
|
const data = placementContext?.hpTop || placementContext?.top;
|
|
60
58
|
if (!data) {
|
|
61
|
-
return
|
|
59
|
+
return this.renderFallback();
|
|
62
60
|
}
|
|
63
61
|
const {
|
|
64
62
|
status,
|
|
@@ -73,7 +71,7 @@ export class MDNPlacementTop extends PlacementMixin(LitElement) {
|
|
|
73
71
|
version,
|
|
74
72
|
} = data;
|
|
75
73
|
if (status !== "success") {
|
|
76
|
-
return
|
|
74
|
+
return this.renderFallback();
|
|
77
75
|
}
|
|
78
76
|
if (!this._viewedUrl) {
|
|
79
77
|
this._viewedUrl = view;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
@import url("../global/global.css");
|
|
2
|
+
|
|
3
|
+
h2 {
|
|
4
|
+
font-size: var(--font-size-large);
|
|
5
|
+
font-weight: 500;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
ul {
|
|
9
|
+
padding: 0;
|
|
10
|
+
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
|
|
13
|
+
list-style: none;
|
|
14
|
+
|
|
15
|
+
border: 1px solid var(--color-border-primary);
|
|
16
|
+
border-radius: 0.5rem;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
li {
|
|
20
|
+
border-top: 1px solid var(--color-border-primary);
|
|
21
|
+
|
|
22
|
+
&:first-child {
|
|
23
|
+
border-top: none;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
a {
|
|
28
|
+
display: block;
|
|
29
|
+
padding: 1rem;
|
|
30
|
+
color: var(--color-text-primary);
|
|
31
|
+
|
|
32
|
+
&:not(:hover) {
|
|
33
|
+
text-decoration: none;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { LitElement, html } from "lit";
|
|
2
|
+
|
|
3
|
+
import styles from "./element.css?lit";
|
|
4
|
+
|
|
5
|
+
import { RecentlyVisitedPages } from "./index.js";
|
|
6
|
+
|
|
7
|
+
export class MDNRecentlyVisited extends LitElement {
|
|
8
|
+
static ssr = false;
|
|
9
|
+
static styles = styles;
|
|
10
|
+
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
this._pages = new RecentlyVisitedPages();
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
render() {
|
|
17
|
+
return html`<h2>Recently visited</h2>
|
|
18
|
+
<ul>
|
|
19
|
+
${this._pages.map(
|
|
20
|
+
({ path, title }) => html`<li><a href=${path}>${title}</a></li>`,
|
|
21
|
+
)}
|
|
22
|
+
</ul>`;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
customElements.define("mdn-recently-visited", MDNRecentlyVisited);
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export class RecentlyVisitedPages {
|
|
2
|
+
static #key = "recently-visited";
|
|
3
|
+
#pages;
|
|
4
|
+
|
|
5
|
+
constructor() {
|
|
6
|
+
this.#pages = this.#getFromStorage();
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
#getFromStorage() {
|
|
10
|
+
const storage = localStorage.getItem(RecentlyVisitedPages.#key);
|
|
11
|
+
if (storage) {
|
|
12
|
+
let pages;
|
|
13
|
+
try {
|
|
14
|
+
pages = JSON.parse(storage);
|
|
15
|
+
if (Array.isArray(pages)) {
|
|
16
|
+
return pages.map((page) => new RecentlyVisitedPage(page));
|
|
17
|
+
}
|
|
18
|
+
} catch {
|
|
19
|
+
console.error(`Parsing ${RecentlyVisitedPages.#key} failed`);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return [];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
#saveToStorage() {
|
|
26
|
+
localStorage.setItem(
|
|
27
|
+
RecentlyVisitedPages.#key,
|
|
28
|
+
JSON.stringify(this.#pages),
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @template T
|
|
34
|
+
* @param {(value: RecentlyVisitedPage, index: number, array: RecentlyVisitedPage[]) => T} callback
|
|
35
|
+
* @returns {T[]}
|
|
36
|
+
*/
|
|
37
|
+
map(callback) {
|
|
38
|
+
return this.#pages.map(callback);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @param {RecentlyVisitedPage} page
|
|
43
|
+
*/
|
|
44
|
+
add(page) {
|
|
45
|
+
this.#pages = [
|
|
46
|
+
...new Map([page, ...this.#pages].map((p) => [p.path, p])).values(),
|
|
47
|
+
].slice(0, 10);
|
|
48
|
+
this.#saveToStorage();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export class RecentlyVisitedPage {
|
|
53
|
+
title = "";
|
|
54
|
+
path = "";
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @param {object} data
|
|
58
|
+
* @param {string} data.title
|
|
59
|
+
* @param {string} data.path
|
|
60
|
+
*/
|
|
61
|
+
constructor(data) {
|
|
62
|
+
Object.assign(this, data);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
RecentlyVisitedPage,
|
|
5
|
+
RecentlyVisitedPages,
|
|
6
|
+
} from "../recently-visited/index.js";
|
|
7
|
+
|
|
8
|
+
export class MDNRecordVisit extends LitElement {
|
|
9
|
+
static ssr = false;
|
|
10
|
+
static properties = {
|
|
11
|
+
pageTitle: { type: String, attribute: "page-title" },
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
constructor() {
|
|
15
|
+
super();
|
|
16
|
+
/** @type {string | undefined} */
|
|
17
|
+
this.pageTitle;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
connectedCallback() {
|
|
21
|
+
super.connectedCallback();
|
|
22
|
+
if (this.pageTitle) {
|
|
23
|
+
const visited = new RecentlyVisitedPages();
|
|
24
|
+
visited.add(
|
|
25
|
+
new RecentlyVisitedPage({
|
|
26
|
+
title: this.pageTitle,
|
|
27
|
+
path: location.pathname,
|
|
28
|
+
}),
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
customElements.define("mdn-record-visit", MDNRecordVisit);
|
|
@@ -27,14 +27,15 @@ export class ReferenceLayout extends ServerComponent {
|
|
|
27
27
|
${WRITER_MODE ? WriterToolbar.render(context) : nothing}
|
|
28
28
|
${TranslationBanner.render(context)}
|
|
29
29
|
<h1>${doc.title}</h1>
|
|
30
|
-
${BaselineIndicator.render(context)}
|
|
30
|
+
${BaselineIndicator.render(context)}
|
|
31
|
+
<mdn-survey></mdn-survey>
|
|
32
|
+
${description}
|
|
31
33
|
</div>
|
|
32
34
|
<aside class="reference-layout__toc">
|
|
33
35
|
${ReferenceToc.render(context)}
|
|
34
36
|
<mdn-placement-sidebar></mdn-placement-sidebar>
|
|
35
37
|
</aside>
|
|
36
38
|
<div class="reference-layout__body">
|
|
37
|
-
<mdn-survey></mdn-survey>
|
|
38
39
|
${sections} ${ArticleFooter.render(context)}
|
|
39
40
|
</div>
|
|
40
41
|
</main>
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@import url("../external-link/global.css");
|
|
2
|
+
|
|
1
3
|
:host {
|
|
2
4
|
display: block;
|
|
3
5
|
}
|
|
@@ -53,6 +55,14 @@ summary {
|
|
|
53
55
|
cursor: pointer;
|
|
54
56
|
}
|
|
55
57
|
|
|
58
|
+
a {
|
|
59
|
+
color: var(--color-text-purple);
|
|
60
|
+
|
|
61
|
+
&:hover {
|
|
62
|
+
text-decoration: none;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
56
66
|
iframe {
|
|
57
67
|
width: 100%;
|
|
58
68
|
height: 500px;
|
|
@@ -4,6 +4,7 @@ import { createRef, ref } from "lit/directives/ref.js";
|
|
|
4
4
|
|
|
5
5
|
import "../button/element.js";
|
|
6
6
|
import { L10nMixin } from "../../l10n/mixin.js";
|
|
7
|
+
import { gleanClick } from "../../utils/glean.js";
|
|
7
8
|
import closeIcon from "../icon/cancel.svg?lit";
|
|
8
9
|
|
|
9
10
|
import styles from "./element.css?lit";
|
|
@@ -48,18 +49,13 @@ export class MDNSurvey extends L10nMixin(LitElement) {
|
|
|
48
49
|
}
|
|
49
50
|
|
|
50
51
|
#checkForSurvey() {
|
|
51
|
-
if (globalThis.window === undefined) return;
|
|
52
|
-
|
|
53
|
-
const FORCE_SURVEY_PREFIX = "#FORCE_SURVEY=";
|
|
54
|
-
this._force = globalThis.location.hash.startsWith(FORCE_SURVEY_PREFIX);
|
|
55
|
-
|
|
56
52
|
this._survey = this.#findSurvey();
|
|
57
53
|
|
|
58
54
|
if (this._survey) {
|
|
59
55
|
this._surveyState = getSurveyState(this._survey.bucket);
|
|
60
56
|
this._source =
|
|
61
57
|
typeof this._survey.src === "function"
|
|
62
|
-
? this._survey.src(
|
|
58
|
+
? this._survey.src(location.pathname)
|
|
63
59
|
: this._survey.src;
|
|
64
60
|
|
|
65
61
|
this.#markAsSeen();
|
|
@@ -70,20 +66,16 @@ export class MDNSurvey extends L10nMixin(LitElement) {
|
|
|
70
66
|
* @returns {Survey.Survey | undefined}
|
|
71
67
|
*/
|
|
72
68
|
#findSurvey() {
|
|
69
|
+
const forcedSurvey = new URLSearchParams(location.search).get(
|
|
70
|
+
"force_survey",
|
|
71
|
+
);
|
|
72
|
+
this._force = forcedSurvey !== null;
|
|
73
73
|
return SURVEYS.find((survey) => {
|
|
74
74
|
if (this._force) {
|
|
75
|
-
|
|
76
|
-
return (
|
|
77
|
-
survey.key ===
|
|
78
|
-
globalThis.location.hash.slice(FORCE_SURVEY_PREFIX.length)
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
if (globalThis.window === undefined) {
|
|
83
|
-
return false;
|
|
75
|
+
return forcedSurvey ? survey.key === forcedSurvey : true;
|
|
84
76
|
}
|
|
85
77
|
|
|
86
|
-
if (!survey.show(
|
|
78
|
+
if (!survey.show(location.pathname)) {
|
|
87
79
|
return false;
|
|
88
80
|
}
|
|
89
81
|
|
|
@@ -121,22 +113,32 @@ export class MDNSurvey extends L10nMixin(LitElement) {
|
|
|
121
113
|
this.requestUpdate();
|
|
122
114
|
}
|
|
123
115
|
|
|
116
|
+
#onLinkClick() {
|
|
117
|
+
this.#markOpened();
|
|
118
|
+
}
|
|
119
|
+
|
|
124
120
|
#onToggle() {
|
|
125
121
|
if (!this._survey || !this._surveyState || this._isOpen) return;
|
|
126
122
|
|
|
127
123
|
const details = this._detailsRef.value;
|
|
128
124
|
if (details && details.open) {
|
|
129
|
-
this
|
|
130
|
-
...this._surveyState,
|
|
131
|
-
opened_at: Date.now(),
|
|
132
|
-
};
|
|
133
|
-
writeSurveyState(this._survey.bucket, this._surveyState);
|
|
134
|
-
this.#measure("opened");
|
|
125
|
+
this.#markOpened();
|
|
135
126
|
this._isOpen = true;
|
|
136
127
|
this.requestUpdate();
|
|
137
128
|
}
|
|
138
129
|
}
|
|
139
130
|
|
|
131
|
+
#markOpened() {
|
|
132
|
+
if (!this._survey || !this._surveyState) return;
|
|
133
|
+
|
|
134
|
+
this._surveyState = {
|
|
135
|
+
...this._surveyState,
|
|
136
|
+
opened_at: Date.now(),
|
|
137
|
+
};
|
|
138
|
+
writeSurveyState(this._survey.bucket, this._surveyState);
|
|
139
|
+
this.#measure("opened");
|
|
140
|
+
}
|
|
141
|
+
|
|
140
142
|
#onSubmitted() {
|
|
141
143
|
if (!this._survey || !this._surveyState) return;
|
|
142
144
|
|
|
@@ -155,8 +157,7 @@ export class MDNSurvey extends L10nMixin(LitElement) {
|
|
|
155
157
|
#measure(action) {
|
|
156
158
|
if (!this._survey) return;
|
|
157
159
|
|
|
158
|
-
|
|
159
|
-
console.log(`Survey: ${action} ${this._survey.bucket}`);
|
|
160
|
+
gleanClick(`survey: ${action} ${this._survey.bucket}`);
|
|
160
161
|
}
|
|
161
162
|
|
|
162
163
|
#setupMessageListener() {
|
|
@@ -208,17 +209,26 @@ export class MDNSurvey extends L10nMixin(LitElement) {
|
|
|
208
209
|
@click=${this.#dismiss}
|
|
209
210
|
></mdn-button>
|
|
210
211
|
</header>
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
212
|
+
${this._survey.link
|
|
213
|
+
? html`<a
|
|
214
|
+
class="external"
|
|
215
|
+
href=${this._source}
|
|
216
|
+
target="_blank"
|
|
217
|
+
title=${this.l10n`Take survey (Opens in a new tab)`}
|
|
218
|
+
@click=${this.#onLinkClick}
|
|
219
|
+
>${this._survey.question}</a
|
|
220
|
+
>`
|
|
221
|
+
: html`<details ${ref(this._detailsRef)} @toggle=${this.#onToggle}>
|
|
222
|
+
<summary>${this._survey.question}</summary>
|
|
223
|
+
${this._isOpen && this._source
|
|
224
|
+
? html`
|
|
225
|
+
<iframe
|
|
226
|
+
title=${ifDefined(this._survey.question)}
|
|
227
|
+
src=${this._source}
|
|
228
|
+
></iframe>
|
|
229
|
+
`
|
|
230
|
+
: nothing}
|
|
231
|
+
</details>`}
|
|
222
232
|
${this._survey.footnote
|
|
223
233
|
? html` <footer>(${this._survey.footnote})</footer> `
|
|
224
234
|
: nothing}
|
|
@@ -29,6 +29,7 @@ export const SurveyBucket = Object.freeze({
|
|
|
29
29
|
HOUSE_SURVEY_2025: "HOUSE_SURVEY_2025",
|
|
30
30
|
JS_PROPOSALS_2025: "JS_PROPOSALS_2025",
|
|
31
31
|
FIRST_FRED_2025: "FIRST_FRED_2025",
|
|
32
|
+
DEVELOPER_SURVEY_2025: "DEVELOPER_SURVEY_2025",
|
|
32
33
|
});
|
|
33
34
|
|
|
34
35
|
/**
|
|
@@ -43,25 +44,28 @@ export const SurveyBucket = Object.freeze({
|
|
|
43
44
|
* @type {Survey.Survey[]}
|
|
44
45
|
*/
|
|
45
46
|
export const SURVEYS = [
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
47
|
+
{
|
|
48
|
+
key: SurveyBucket.DEVELOPER_SURVEY_2025,
|
|
49
|
+
bucket: SurveyBucket.DEVELOPER_SURVEY_2025,
|
|
50
|
+
show: (mdn_url) => {
|
|
51
|
+
return /^\/[a-z]{2}(-[A-Z]{2})?\/docs\/(Glossary|Learn|Web)/.test(
|
|
52
|
+
mdn_url,
|
|
53
|
+
);
|
|
54
|
+
},
|
|
55
|
+
src: (mdn_url) => {
|
|
56
|
+
const url = new URL(
|
|
57
|
+
"https://survey.alchemer.com/s3/8409929/MDN-Developer-Survey",
|
|
58
|
+
);
|
|
59
|
+
url.searchParams.set("referrer", mdn_url);
|
|
60
|
+
return url.toString();
|
|
61
|
+
},
|
|
62
|
+
teaser:
|
|
63
|
+
"We’re running a survey to understand how you use MDN in your web development work.",
|
|
64
|
+
question: "We’d love for you to take 10 minutes to share your feedback.",
|
|
65
|
+
link: true,
|
|
66
|
+
rateFrom: 0,
|
|
67
|
+
rateTill: 0.3,
|
|
68
|
+
start: Date.parse("2025-10-06"),
|
|
69
|
+
end: Date.parse("2025-10-20"),
|
|
70
|
+
},
|
|
67
71
|
];
|
|
@@ -23,6 +23,8 @@ export interface Survey {
|
|
|
23
23
|
question: TemplateResult | string;
|
|
24
24
|
/** Optional footer HTML displayed below the survey */
|
|
25
25
|
footnote?: TemplateResult | string;
|
|
26
|
+
/** Link to the survey instead of embedding it */
|
|
27
|
+
link?: boolean;
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
export interface SurveyState {
|
|
@@ -24,6 +24,9 @@ export class WriterToolbar extends ServerComponent {
|
|
|
24
24
|
filepath=${`${folder}/${filename}`}
|
|
25
25
|
></mdn-writer-open-editor>
|
|
26
26
|
<mdn-writer-reload></mdn-writer-reload>
|
|
27
|
+
<mdn-record-visit
|
|
28
|
+
page-title=${context.doc.title}
|
|
29
|
+
></mdn-record-visit>
|
|
27
30
|
`
|
|
28
31
|
: nothing}
|
|
29
32
|
</div>`;
|