[MediaWiki-commits] [Gerrit] marvin[master]: New: add page summaries fetcher and UI
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/378267 ) Change subject: New: add page summaries fetcher and UI .. New: add page summaries fetcher and UI - Add new UI for page summaries. - Fetch page summaries from RESTBase and display them. - It isn't clear why but the TypeScript root configuration file doesn't appear to pass includes to its children so copy this configuration downwards. (Copy instead of move so common code can still use the common config.) - DRY up "ChildrenProps" and "ClassProps" types for Preact components to allow children or a class parameter in a unified way. Also, break apart Children into ComponentChild and ComponentChildren. - Add isomorphic-unfetch to the package runtime dependencies, the vendor chunk, and add typing that mimics fetch. - Move Preact supplemental definitions to a plain TypeScript file so functional utilities can also be specified. - Minor hygiene to rename "parameters" to "params" and update the docs. - Add type aliases for page title URL path, decoded page URL path, and localized titles. These types all alias string but at least they can point to JSDocs and help devs consider the contents, avoid bugs, and clarify API expectations. - Add a couple promised Webpack configuration comments promised long ago. Bug: T173324 Change-Id: I7456e654e24db34343bd8e108bc990be8fff31fe --- M docs/development.md M package-lock.json M package.json M src/client/tsconfig.json M src/common/components/app/app.tsx M src/common/components/link.tsx A src/common/components/page-summary/page-summary.css A src/common/components/page-summary/page-summary.tsx M src/common/components/paper/paper.tsx A src/common/components/preact-utils.ts M src/common/components/with-context.ts A src/common/data-clients/page-data-client.ts M src/common/models/page.ts M src/common/pages/wiki.tsx M src/common/routers/api.ts M src/common/routers/route.ts M src/common/routers/router.ts A src/common/types/isomorphic-unfetch.d.ts D src/common/types/preact.d.ts M src/server/components/page.tsx M src/server/index.tsx M src/server/tsconfig.json M webpack.config.ts 23 files changed, 241 insertions(+), 56 deletions(-) Approvals: Jhernandez: Looks good to me, approved jenkins-bot: Verified diff --git a/docs/development.md b/docs/development.md index 4d2..d7e34ef 100644 --- a/docs/development.md +++ b/docs/development.md @@ -124,8 +124,14 @@ - Static constants should be written in `SHOUTING_SNAKE_CASE`. All other variables should be written in `camelCase`. - Preact components should be written in PascalCase. -- Preact component properties variables and types, especially - `ComponentProps` implementations, should be called "props" and "Props". + + Abbreviations + +Marvin uses the following abbreviations: + +- Parameters => params +- Properties => props +- Utilities => utils ### Filenaming diff --git a/package-lock.json b/package-lock.json index 50bafa5..8136876 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1519,6 +1519,14 @@ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz";, "integrity": "sha1-eePVhlU0aQn+bw9Fpd5oEDspTSA=" }, +"encoding": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz";, + "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", + "requires": { +"iconv-lite": "0.4.18" + } +}, "enhanced-resolve": { "version": "3.4.1", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz";, @@ -2632,8 +2640,7 @@ "iconv-lite": { "version": "0.4.18", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.18.tgz";, - "integrity": "sha512-sr1ZQph3UwHTR0XftSbK85OvBbxe/abLGzEnPENCQwmHf7sck8Oyu4ob3LgBxWWxRoM+QszeUyl7jbqapu2TqA==", - "dev": true + "integrity": "sha512-sr1ZQph3UwHTR0XftSbK85OvBbxe/abLGzEnPENCQwmHf7sck8Oyu4ob3LgBxWWxRoM+QszeUyl7jbqapu2TqA==" }, "icss-replace-symbols": { "version": "1.1.0", @@ -3104,8 +3111,7 @@ "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz";, - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" }, "is-svg": { "version": "2.1.0", @@ -3153,6 +3159,15 @@ "dev": true, "requires": { "isarray": "1.0.0" + } +}, +"isomorphic-unfetch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-unfetch/-/isomorphic-unfetch-2.0.0.tgz";, + "integrity": "sha1-9QFApMFj11grXzfxWRloxPgJpkU=", + "requires": { +"node-fetch": "1.7.3", +"unfetch": "3.0.0" } }, "jest-docblock": { @@ -3962,6 +3977,15 @@ "isa
[MediaWiki-commits] [Gerrit] marvin[master]: New: add page summaries fetcher and UI
Niedzielski has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/378267 ) Change subject: New: add page summaries fetcher and UI .. New: add page summaries fetcher and UI Bug: T173323 Change-Id: I7456e654e24db34343bd8e108bc990be8fff31fe --- M docs/development.md M package-lock.json M package.json M src/client/tsconfig.json M src/common/components/app/app.tsx M src/common/components/link.tsx A src/common/components/page-summary/page-summary.css A src/common/components/page-summary/page-summary.tsx M src/common/components/paper/paper.tsx A src/common/data-clients/page-data-client.ts M src/common/models/page.ts M src/common/pages/wiki.tsx M src/common/routers/api.ts M src/common/routers/route.ts M src/common/routers/router.ts A src/common/types/isomorphic-unfetch.d.ts M src/common/types/preact.d.ts M src/server/components/page.tsx M src/server/index.tsx M src/server/tsconfig.json M tsconfig.json M webpack.config.ts 22 files changed, 227 insertions(+), 967 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/67/378267/1 diff --git a/docs/development.md b/docs/development.md index 4d2..bf1b6f3 100644 --- a/docs/development.md +++ b/docs/development.md @@ -124,8 +124,13 @@ - Static constants should be written in `SHOUTING_SNAKE_CASE`. All other variables should be written in `camelCase`. - Preact components should be written in PascalCase. -- Preact component properties variables and types, especially - `ComponentProps` implementations, should be called "props" and "Props". + + Abbreviations + +Marvin uses the following abbreviations: + +- Properties => props +- Parameters => params ### Filenaming diff --git a/package-lock.json b/package-lock.json index 319c07a..4b41755 100644 --- a/package-lock.json +++ b/package-lock.json @@ -711,7 +711,6 @@ "requires": { "anymatch": "1.3.2", "async-each": "1.0.1", -"fsevents": "1.1.2", "glob-parent": "2.0.0", "inherits": "2.0.3", "is-binary-path": "1.0.1", @@ -1445,6 +1444,14 @@ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz";, "integrity": "sha1-eePVhlU0aQn+bw9Fpd5oEDspTSA=" }, +"encoding": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz";, + "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", + "requires": { +"iconv-lite": "0.4.18" + } +}, "end-of-stream": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.0.tgz";, @@ -2119,905 +2126,6 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, -"fsevents": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.2.tgz";, - "integrity": "sha512-Sn44E5wQW4bTHXvQmvSHwqbuiXtduD6Rrjm2ZtUEGbyrig+nUH3t/QD4M4/ZXViY556TBpRgZkHLDx3JxPwxiw==", - "dev": true, - "optional": true, - "requires": { -"nan": "2.7.0", -"node-pre-gyp": "0.6.36" - }, - "dependencies": { -"abbrev": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true -}, -"ajv": { - "version": "4.11.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { -"co": "4.6.0", -"json-stable-stringify": "1.0.1" - } -}, -"ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true -}, -"aproba": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true -}, -"are-we-there-yet": { - "version": "1.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { -"delegates": "1.0.0", -"readable-stream": "2.2.9" - } -}, -"asn1": { - "version": "0.2.3", - "bundled": true, - "dev": true, - "optional": true -}, -"assert-plus": { - "version": "0.2.0", - "bundled": true, - "dev": true, - "optional": true -}, -"asynckit": { - "version": "0.4.0", - "bundled": true, - "dev": true, - "optional": true -}, -"aws-sign2": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true -}, -"aws4": { - "version": "1.6.0", - "bundled": true, - "dev": true, - "optional": true -}, -"balanced-match": { - "version": "0.4.2", - "bundled": true, - "dev": true -}, -"bcrypt-pbkdf":