From e2e7835214d1f6230d0c3f2d638ecadc78e102b9 Mon Sep 17 00:00:00 2001 From: Matchu Date: Sat, 7 Aug 2021 21:32:22 -0700 Subject: [PATCH 1/6] Waka deprecation UI, to expire on Aug 21 --- src/app/ItemPageLayout.js | 52 ++++++++++++++++++++++++++++++++------- 1 file changed, 43 insertions(+), 9 deletions(-) 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; From 0cf97ef612b9ad74ea3beb062715f01b25d38ce2 Mon Sep 17 00:00:00 2001 From: Matchu Date: Sat, 7 Aug 2021 23:13:52 -0700 Subject: [PATCH 2/6] Try updating honeycomb-beeline? In production we're suddenly getting errors in module wrapping in honeycomb-beeline. I wonder if it's like, an incompatibility with Vercel's version of Node? Well, this new version seems to still be playing nice on dev, so hopefully that's all it is and this fixes it! I give it like a 35% chance lol :p --- package.json | 2 +- yarn.lock | 59 +++++++++++++++++++++++++--------------------------- 2 files changed, 29 insertions(+), 32 deletions(-) diff --git a/package.json b/package.json index 660f542..2794392 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/yarn.lock b/yarn.lock index 7a0b787..e5a4d9a 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" @@ -8385,11 +8387,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" @@ -11109,15 +11106,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" From e5081dab7e980954f27284f0d1b424440d41bc59 Mon Sep 17 00:00:00 2001 From: Matchu Date: Sun, 8 Aug 2021 00:14:55 -0700 Subject: [PATCH 4/6] Disable honeycomb auto instrumentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Huh, well, I can't figure out what in our production env stopped working with Honeycomb's automatic instrumentation… so, oh well! Let's try disabling it for now and see if it works. This means our Honeycomb logs will no longer include _super helpful_ visualizations of how HTTP requests and MySQL queries create a request dependency waterfall… but I haven't opened Honeycomb in a while, and this bug is blocking all of prod, so if this fixes the site then I'm okay with that as a stopgap! Btw the error message was: ``` Unhandled rejection: TypeError: Cannot read property 'id' of undefined at exports.instrumentLoad (/var/task/node_modules/honeycomb-beeline/lib/instrumentation.js:80:14) at Function._load (/var/task/node_modules/honeycomb-beeline/lib/instrumentation.js:164:16) at ModuleWrap. (internal/modules/esm/translators.js:199:29) at ModuleJob.run (internal/modules/esm/module_job.js:169:25) at Loader.import (internal/modules/esm/loader.js:177:24) ``` Oh also, this is the first time eslint has looked at scripts/build-cached-data.js I guess, so I fixed some lint errors in there. --- api/allWakaValues.js | 1 + api/assetImage.js | 1 + api/graphql.js | 1 + api/outfitImage.js | 1 + api/outfitPageSSR.js | 1 + api/sendFeedback.js | 1 + api/uploadLayerImage.js | 1 + api/validPetPoses.js | 1 + scripts/build-cached-data.js | 4 ++-- 9 files changed, 10 insertions(+), 2 deletions(-) diff --git a/api/allWakaValues.js b/api/allWakaValues.js index 56ad430..ec97e6e 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", + enabledInstrumentations: [], }); import fetch from "node-fetch"; diff --git a/api/assetImage.js b/api/assetImage.js index 6aaa1fc..4a2e1bc 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", + enabledInstrumentations: [], }); const { chromium } = require("playwright"); diff --git a/api/graphql.js b/api/graphql.js index 07a8b23..08d9baa 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", + enabledInstrumentations: [], samplerHook, }); diff --git a/api/outfitImage.js b/api/outfitImage.js index e267633..e68e790 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", + enabledInstrumentations: [], sampleRate: 10, }); diff --git a/api/outfitPageSSR.js b/api/outfitPageSSR.js index 68a2898..b0808b7 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", + enabledInstrumentations: [], }); import escapeHtml from "escape-html"; diff --git a/api/sendFeedback.js b/api/sendFeedback.js index 3349c8b..239e2e3 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", + enabledInstrumentations: [], }); import sendgridMail from "@sendgrid/mail"; diff --git a/api/uploadLayerImage.js b/api/uploadLayerImage.js index 6eb472a..997d93e 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", + enabledInstrumentations: [], }); const AWS = require("aws-sdk"); const Jimp = require("jimp"); diff --git a/api/validPetPoses.js b/api/validPetPoses.js index c788054..89fe654 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", + enabledInstrumentations: [], }); import connectToDb from "../src/server/db"; import { getPoseFromPetState, normalizeRow } from "../src/server/util"; diff --git a/scripts/build-cached-data.js b/scripts/build-cached-data.js index 3955faa..f72f4f9 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", + enabledInstrumentations: [], }); 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() From ba8e4d8aa744c77b7e3b158f41b6dc364d69a339 Mon Sep 17 00:00:00 2001 From: Matchu Date: Sun, 8 Aug 2021 00:23:57 -0700 Subject: [PATCH 5/6] Trickier disabling honeycomb instrumentation Hm, okay, so the documented way to not instrument anything doesn't actually stop them from patching Module._load. But this undocumented option sure does! So, woo, let's try it! lol --- api/allWakaValues.js | 2 +- api/assetImage.js | 2 +- api/graphql.js | 2 +- api/outfitImage.js | 2 +- api/outfitPageSSR.js | 2 +- api/sendFeedback.js | 2 +- api/uploadLayerImage.js | 2 +- api/validPetPoses.js | 2 +- scripts/build-cached-data.js | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/api/allWakaValues.js b/api/allWakaValues.js index ec97e6e..ecf9f21 100644 --- a/api/allWakaValues.js +++ b/api/allWakaValues.js @@ -5,7 +5,7 @@ const beeline = require("honeycomb-beeline")({ ? "Dress to Impress (2020)" : "Dress to Impress (2020, dev)", serviceName: "impress-2020-gql-server", - enabledInstrumentations: [], + disableInstrumentationOnLoad: true, }); import fetch from "node-fetch"; diff --git a/api/assetImage.js b/api/assetImage.js index 4a2e1bc..27cf1a8 100644 --- a/api/assetImage.js +++ b/api/assetImage.js @@ -15,7 +15,7 @@ const beeline = require("honeycomb-beeline")({ ? "Dress to Impress (2020)" : "Dress to Impress (2020, dev)", serviceName: "impress-2020-gql-server", - enabledInstrumentations: [], + disableInstrumentationOnLoad: true, }); const { chromium } = require("playwright"); diff --git a/api/graphql.js b/api/graphql.js index 08d9baa..cd2e2bf 100644 --- a/api/graphql.js +++ b/api/graphql.js @@ -5,7 +5,7 @@ const beeline = require("honeycomb-beeline")({ ? "Dress to Impress (2020)" : "Dress to Impress (2020, dev)", serviceName: "impress-2020-gql-server", - enabledInstrumentations: [], + disableInstrumentationOnLoad: true, samplerHook, }); diff --git a/api/outfitImage.js b/api/outfitImage.js index e68e790..f44fd9a 100644 --- a/api/outfitImage.js +++ b/api/outfitImage.js @@ -31,7 +31,7 @@ const beeline = require("honeycomb-beeline")({ ? "Dress to Impress (2020)" : "Dress to Impress (2020, dev)", serviceName: "impress-2020-gql-server", - enabledInstrumentations: [], + disableInstrumentationOnLoad: true, sampleRate: 10, }); diff --git a/api/outfitPageSSR.js b/api/outfitPageSSR.js index b0808b7..861370d 100644 --- a/api/outfitPageSSR.js +++ b/api/outfitPageSSR.js @@ -19,7 +19,7 @@ const beeline = require("honeycomb-beeline")({ ? "Dress to Impress (2020)" : "Dress to Impress (2020, dev)", serviceName: "impress-2020-gql-server", - enabledInstrumentations: [], + disableInstrumentationOnLoad: true, }); import escapeHtml from "escape-html"; diff --git a/api/sendFeedback.js b/api/sendFeedback.js index 239e2e3..b48dae1 100644 --- a/api/sendFeedback.js +++ b/api/sendFeedback.js @@ -5,7 +5,7 @@ const beeline = require("honeycomb-beeline")({ ? "Dress to Impress (2020)" : "Dress to Impress (2020, dev)", serviceName: "impress-2020-gql-server", - enabledInstrumentations: [], + disableInstrumentationOnLoad: true, }); import sendgridMail from "@sendgrid/mail"; diff --git a/api/uploadLayerImage.js b/api/uploadLayerImage.js index 997d93e..01669f6 100644 --- a/api/uploadLayerImage.js +++ b/api/uploadLayerImage.js @@ -5,7 +5,7 @@ const beeline = require("honeycomb-beeline")({ ? "Dress to Impress (2020)" : "Dress to Impress (2020, dev)", serviceName: "impress-2020-gql-server", - enabledInstrumentations: [], + disableInstrumentationOnLoad: true, }); const AWS = require("aws-sdk"); const Jimp = require("jimp"); diff --git a/api/validPetPoses.js b/api/validPetPoses.js index 89fe654..be479b4 100644 --- a/api/validPetPoses.js +++ b/api/validPetPoses.js @@ -5,7 +5,7 @@ const beeline = require("honeycomb-beeline")({ ? "Dress to Impress (2020)" : "Dress to Impress (2020, dev)", serviceName: "impress-2020-gql-server", - enabledInstrumentations: [], + disableInstrumentationOnLoad: true, }); import connectToDb from "../src/server/db"; import { getPoseFromPetState, normalizeRow } from "../src/server/util"; diff --git a/scripts/build-cached-data.js b/scripts/build-cached-data.js index f72f4f9..8200139 100644 --- a/scripts/build-cached-data.js +++ b/scripts/build-cached-data.js @@ -7,7 +7,7 @@ require("honeycomb-beeline")({ ? "Dress to Impress (2020)" : "Dress to Impress (2020, dev)", serviceName: "impress-2020-build-process", - enabledInstrumentations: [], + disableInstrumentationOnLoad: true, }); const fs = require("fs").promises; const path = require("path"); From f9b4852da1fff5690e043d442951d9cab0f7ad44 Mon Sep 17 00:00:00 2001 From: Matchu Date: Sat, 14 Aug 2021 16:46:05 -0700 Subject: [PATCH 6/6] Handle OFFICIAL_SWF_IS_INCORRECT for pet layers Marking this glitch on the Yellow Lutari head today, and oops there isn't UI copy for it yet! Added! Also fixed some bugs in here, like old text about the position of the pose picker relative to the glitch badge, and I noticed while debugging that `layerUsesHTML5` returns a truthy string instead of a boolean which seems error-prone! --- .../WardrobePage/OutfitKnownGlitchesBadge.js | 24 +++++++++++++++++-- src/app/components/HTML5Badge.js | 10 ++++---- 2 files changed, 27 insertions(+), 7 deletions(-) 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") ); }