diff --git a/api/allWakaValues.js b/api/allWakaValues.js index 56ad430..ecf9f21 100644 --- a/api/allWakaValues.js +++ b/api/allWakaValues.js @@ -5,6 +5,7 @@ const beeline = require("honeycomb-beeline")({ ? "Dress to Impress (2020)" : "Dress to Impress (2020, dev)", serviceName: "impress-2020-gql-server", + disableInstrumentationOnLoad: true, }); import fetch from "node-fetch"; diff --git a/api/assetImage.js b/api/assetImage.js index b9f20c3..c28400d 100644 --- a/api/assetImage.js +++ b/api/assetImage.js @@ -15,6 +15,7 @@ const beeline = require("honeycomb-beeline")({ ? "Dress to Impress (2020)" : "Dress to Impress (2020, dev)", serviceName: "impress-2020-gql-server", + disableInstrumentationOnLoad: true, }); const playwright = require("playwright-aws-lambda"); diff --git a/api/graphql.js b/api/graphql.js index 07a8b23..cd2e2bf 100644 --- a/api/graphql.js +++ b/api/graphql.js @@ -5,6 +5,7 @@ const beeline = require("honeycomb-beeline")({ ? "Dress to Impress (2020)" : "Dress to Impress (2020, dev)", serviceName: "impress-2020-gql-server", + disableInstrumentationOnLoad: true, samplerHook, }); diff --git a/api/outfitImage.js b/api/outfitImage.js index e267633..f44fd9a 100644 --- a/api/outfitImage.js +++ b/api/outfitImage.js @@ -31,6 +31,7 @@ const beeline = require("honeycomb-beeline")({ ? "Dress to Impress (2020)" : "Dress to Impress (2020, dev)", serviceName: "impress-2020-gql-server", + disableInstrumentationOnLoad: true, sampleRate: 10, }); diff --git a/api/outfitPageSSR.js b/api/outfitPageSSR.js index 68a2898..861370d 100644 --- a/api/outfitPageSSR.js +++ b/api/outfitPageSSR.js @@ -19,6 +19,7 @@ const beeline = require("honeycomb-beeline")({ ? "Dress to Impress (2020)" : "Dress to Impress (2020, dev)", serviceName: "impress-2020-gql-server", + disableInstrumentationOnLoad: true, }); import escapeHtml from "escape-html"; diff --git a/api/sendFeedback.js b/api/sendFeedback.js index 3349c8b..b48dae1 100644 --- a/api/sendFeedback.js +++ b/api/sendFeedback.js @@ -5,6 +5,7 @@ const beeline = require("honeycomb-beeline")({ ? "Dress to Impress (2020)" : "Dress to Impress (2020, dev)", serviceName: "impress-2020-gql-server", + disableInstrumentationOnLoad: true, }); import sendgridMail from "@sendgrid/mail"; diff --git a/api/uploadLayerImage.js b/api/uploadLayerImage.js index 6eb472a..01669f6 100644 --- a/api/uploadLayerImage.js +++ b/api/uploadLayerImage.js @@ -5,6 +5,7 @@ const beeline = require("honeycomb-beeline")({ ? "Dress to Impress (2020)" : "Dress to Impress (2020, dev)", serviceName: "impress-2020-gql-server", + disableInstrumentationOnLoad: true, }); const AWS = require("aws-sdk"); const Jimp = require("jimp"); diff --git a/api/validPetPoses.js b/api/validPetPoses.js index c788054..be479b4 100644 --- a/api/validPetPoses.js +++ b/api/validPetPoses.js @@ -5,6 +5,7 @@ const beeline = require("honeycomb-beeline")({ ? "Dress to Impress (2020)" : "Dress to Impress (2020, dev)", serviceName: "impress-2020-gql-server", + disableInstrumentationOnLoad: true, }); import connectToDb from "../src/server/db"; import { getPoseFromPetState, normalizeRow } from "../src/server/util"; diff --git a/package.json b/package.json index 51bb001..1a97f8a 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "escape-html": "^1.0.3", "framer-motion": "^4.1.11", "graphql": "^15.5.0", - "honeycomb-beeline": "^2.2.0", + "honeycomb-beeline": "^2.7.4", "immer": "^8.0.1", "jimp": "^0.14.0", "jsonwebtoken": "^8.5.1", diff --git a/scripts/build-cached-data.js b/scripts/build-cached-data.js index 3955faa..8200139 100644 --- a/scripts/build-cached-data.js +++ b/scripts/build-cached-data.js @@ -7,6 +7,7 @@ require("honeycomb-beeline")({ ? "Dress to Impress (2020)" : "Dress to Impress (2020, dev)", serviceName: "impress-2020-build-process", + disableInstrumentationOnLoad: true, }); const fs = require("fs").promises; const path = require("path"); @@ -15,7 +16,6 @@ const { ApolloServer } = require("apollo-server"); const { createTestClient } = require("apollo-server-testing"); const gql = require("graphql-tag"); -const connectToDb = require("../src/server/db"); const { config } = require("../src/server"); const cachedDataPath = path.join(__dirname, "..", "src", "app", "cached-data"); @@ -51,7 +51,7 @@ async function main() { "utf8" ); - console.log(`📚 Wrote zones to ${path.relative(process.cwd(), filePath)}`); + console.info(`📚 Wrote zones to ${path.relative(process.cwd(), filePath)}`); } main() diff --git a/src/app/ItemPageLayout.js b/src/app/ItemPageLayout.js index c0f1068..052327f 100644 --- a/src/app/ItemPageLayout.js +++ b/src/app/ItemPageLayout.js @@ -20,6 +20,7 @@ import { ExternalLinkIcon, ChevronRightIcon, QuestionIcon, + WarningTwoIcon, } from "@chakra-ui/icons"; import { gql, useMutation } from "@apollo/client"; @@ -163,12 +164,16 @@ function ItemPageBadges({ item, isEmbedded }) { item.wakaValueText !== undefined } > - {item.wakaValueText && ( + {shouldShowWaka() && item.wakaValueText && ( <> {/* For hover-y devices, use a hover popover over the badge. */} - + + Waka: {item.wakaValueText} @@ -178,7 +183,11 @@ function ItemPageBadges({ item, isEmbedded }) { sx={{ "@media (hover: hover)": { display: "none" } }} align="center" > - + + Waka: {item.wakaValueText} @@ -439,15 +448,23 @@ function WakaPopover({ children, ...props }) {

- Waka is a community resource that tracks the approximate value of - NC items, based on real-world trades. + + The Waka Guide for NC trade values is closing down! + {" "} + We're sad to see them go, but excited that the team gets to move + onto the next phase in their life 💖

- The Waka Team aims to maintain the accuracy of the guide as fully - as possible, but please remember values are often changing and - with certain difficult-to-find or popular items it doesn't hurt to - make a value check! + The Waka guide was last updated August 7, 2021, so this value + might not be accurate anymore. Consider checking in with the + Neoboards! +

+ +

+ Thanks again to the Waka team for letting us experiment with + sharing their trade values here. Best wishes for everything to + come! 💜

@@ -456,4 +473,21 @@ function WakaPopover({ children, ...props }) { ); } +// August 21, 2021. (The month uses 0-indexing, but nothing else does! 🙃) +const STOP_SHOWING_WAKA_AFTER = new Date(2021, 7, 21, 0, 0, 0, 0); + +/** + * shouldShowWaka returns true if, according to the browser, it's not yet + * August 21, 2021. It starts returning false at midnight on Aug 21. + * + * That way, our Waka deprecation message is on an auto-timer. After Aug 21, + * it's safe to remove all Waka UI code, and the Waka API endpoint and GraphQL + * fields. (It might be kind to return a placeholder string for the GraphQL + * case!) + */ +function shouldShowWaka() { + const now = new Date(); + return now < STOP_SHOWING_WAKA_AFTER; +} + export default ItemPageLayout; diff --git a/src/app/WardrobePage/OutfitKnownGlitchesBadge.js b/src/app/WardrobePage/OutfitKnownGlitchesBadge.js index f02248c..8bbf88b 100644 --- a/src/app/WardrobePage/OutfitKnownGlitchesBadge.js +++ b/src/app/WardrobePage/OutfitKnownGlitchesBadge.js @@ -176,7 +176,8 @@ function OutfitKnownGlitchesBadge({ appearance }) { Invisible pets are affected by a number of glitches, including faces sometimes being visible on-site, and errors in the HTML5 conversion. If this pose looks incorrect, you can try another by clicking the emoji - face to the right. But be aware that Neopets.com might look different! + face next to the species/color picker. But be aware that Neopets.com + might look different!
); } @@ -208,13 +209,32 @@ function OutfitKnownGlitchesBadge({ appearance }) { We know that the art for this pet is incorrect, but we still haven't seen a correct model for this pose yet. Once someone models the correct data, we'll use that instead. For now, you could also try - switching to another pose, by clicking the emoji face to the right! + switching to another pose, by clicking the emoji face next to the + species/color picker! ); } const petLayers = petAppearance?.layers || []; + // Look for pet layers with the OFFICIAL_SWF_IS_INCORRECT glitch. + for (const layer of petLayers) { + const layerHasGlitch = (layer.knownGlitches || []).includes( + "OFFICIAL_SWF_IS_INCORRECT" + ); + if (layerHasGlitch) { + glitchMessages.push( + + We're aware of a glitch affecting the art for this pet's{" "} + {layer.zone.label} zone. Last time we checked, this glitch + affected its appearance on Neopets.com, too. But our version might be + out of date! If you've seen it look better on-site, please email me at + matchu@openneo.net so we can fix it! + + ); + } + } + // Look for pet layers with the OFFICIAL_SVG_IS_INCORRECT glitch. for (const layer of petLayers) { const layerHasOfficialSvgIsIncorrect = (layer.knownGlitches || []).includes( diff --git a/src/app/components/HTML5Badge.js b/src/app/components/HTML5Badge.js index 1c5b214..2b9132d 100644 --- a/src/app/components/HTML5Badge.js +++ b/src/app/components/HTML5Badge.js @@ -135,12 +135,12 @@ export function GlitchBadgeLayout({ } export function layerUsesHTML5(layer) { - return ( + return Boolean( layer.svgUrl || - layer.canvasMovieLibraryUrl || - // If this glitch is applied, then `svgUrl` will be null, but there's still - // an HTML5 manifest that the official player can render. - (layer.knownGlitches || []).includes("OFFICIAL_SVG_IS_INCORRECT") + layer.canvasMovieLibraryUrl || + // If this glitch is applied, then `svgUrl` will be null, but there's still + // an HTML5 manifest that the official player can render. + (layer.knownGlitches || []).includes("OFFICIAL_SVG_IS_INCORRECT") ); } diff --git a/yarn.lock b/yarn.lock index 1b41a99..fd29f6d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4606,25 +4606,17 @@ dependencies: mkdirp "^1.0.4" -"@opentelemetry/api@^0.9.0": - version "0.9.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-0.9.0.tgz#23dc68851f98eabfb981f0b0cc5b1c34d715fdcb" - integrity sha512-fJ0CzUf4favXihuD6dDUh4U6GPfEjswUy9w+N4SrIrX3wFi43bGb3BXPSctaWx3PQaRC3Rjsw12HWR+oRl9pRQ== - dependencies: - "@opentelemetry/context-base" "^0.9.0" +"@opentelemetry/api@^0.18.1": + version "0.18.1" + resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-0.18.1.tgz#fb499e07afa1f55acffc47b2469eb218dcdee2a2" + integrity sha512-pKNxHe3AJ5T2N5G3AlT9gx6FyF5K2FS9ZNc+FipC+f1CpVF/EY+JHTJ749dnM2kWIgZTbDJFiGMuc0FYjNSCOg== -"@opentelemetry/context-base@^0.9.0": - version "0.9.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/context-base/-/context-base-0.9.0.tgz#30ad9eee8b5abebc477b5d0a657474324ca5a8cb" - integrity sha512-4XUS2RoGKla+lqbEBKN4NUmPtJI/+NHVt7EHaw6XxFlBwyZ9HAX61Kk53Hlb6eUYOLOehdVx9Q+gdpamj018iQ== - -"@opentelemetry/core@^0.9.0": - version "0.9.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/core/-/core-0.9.0.tgz#bd140ff017094150239430847fc7e2929dd91d6f" - integrity sha512-OU4qmYbDTilvdNgr9rXIGgBh1GENPbQrkyAzob5l/4/blqTDi75a5S/ZfkNjweyVvufVbp81rpvSxu9oN9tg2g== +"@opentelemetry/core@^0.18.0": + version "0.18.2" + resolved "https://registry.yarnpkg.com/@opentelemetry/core/-/core-0.18.2.tgz#3f8f54e250416b50730551f73e42fca9808cafd3" + integrity sha512-WG8veOEd8xZHuBaOHddzWQg5yj794lrEPAe6W1qI0YkV7pyqYXvhJdCxOU5Lyo1SWzTAjI5xrCUQ9J2WlrqzYA== dependencies: - "@opentelemetry/api" "^0.9.0" - "@opentelemetry/context-base" "^0.9.0" + "@opentelemetry/api" "^0.18.1" semver "^7.1.3" "@pmmmwh/react-refresh-webpack-plugin@0.4.2": @@ -5405,6 +5397,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.43.tgz#26bcbb0595b305400e8ceaf9a127a7f905ae49c8" integrity sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ== +"@types/node@^16.3.2": + version "16.4.13" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.4.13.tgz#7dfd9c14661edc65cccd43a29eb454174642370d" + integrity sha512-bLL69sKtd25w7p1nvg9pigE4gtKVpGTPojBFLMkGHXuUgap2sLqQt2qUnqmVCDfzGUL0DRNZP+1prIZJbMeAXg== + "@types/normalize-package-data@^2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" @@ -6619,11 +6616,16 @@ array-flatten@1.1.1: resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= -array-flatten@^2.1.0, array-flatten@^2.1.2: +array-flatten@^2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.2.tgz#24ef80a28c1a893617e2149b0c6d0d788293b099" integrity sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ== +array-flatten@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-3.0.0.tgz#6428ca2ee52c7b823192ec600fa3ed2f157cd541" + integrity sha512-zPMVc3ZYlGLNk4mpK1NzP2wg0ml9t7fUgDsayR5Y5rSzxQilzR9FGu/EH2jQOcKSAeAfWeylyW8juy3OkWRvNA== + array-includes@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.1.tgz#cdd67e6852bdf9c1215460786732255ed2459348" @@ -8407,11 +8409,6 @@ crypto-random-string@^2.0.0: resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA== -crypto@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/crypto/-/crypto-1.0.1.tgz#2af1b7cad8175d24c8a1b0778255794a21803037" - integrity sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig== - css-blank-pseudo@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/css-blank-pseudo/-/css-blank-pseudo-0.1.4.tgz#dfdefd3254bf8a82027993674ccf35483bfcb3c5" @@ -11136,15 +11133,15 @@ hoist-non-react-statics@^3.1.0, hoist-non-react-statics@^3.3.1, hoist-non-react- dependencies: react-is "^16.7.0" -honeycomb-beeline@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/honeycomb-beeline/-/honeycomb-beeline-2.2.0.tgz#b7e258721e178d9c904e6a0af6c81349e784d445" - integrity sha512-dNQQr94xqJ6lwUkceSLompDs0ntOoGa4fKIxidu8+FijArwVzOpUc1L5BKY0nZRV7LIyUZkvOML22czuGXCHsw== +honeycomb-beeline@^2.7.4: + version "2.7.4" + resolved "https://registry.yarnpkg.com/honeycomb-beeline/-/honeycomb-beeline-2.7.4.tgz#57651f2896c59ab76a3f4d1a6238e698dad759d7" + integrity sha512-vNcpfqEHJczAK6sy7MUMKoXVnURJrR/N7fuw3X0OCbq1y4EY4AVUHA+vxBTYFMf0gruEgGcErinKRUUIQwm9jQ== dependencies: - "@opentelemetry/core" "^0.9.0" - array-flatten "^2.1.2" - crypto "^1.0.1" - debug "^4.1.1" + "@opentelemetry/core" "^0.18.0" + "@types/node" "^16.3.2" + array-flatten "^3.0.0" + debug "^4.2.0" libhoney "^2.2.1" on-headers "^1.0.2" shimmer "^1.2.1"