From 6dcbf38eb621499e7571eb32139495c21cee7fca Mon Sep 17 00:00:00 2001 From: Reshma R Date: Mon, 14 Jul 2025 16:55:31 +0900 Subject: [PATCH 1/3] Fixes #887 --- styles/global.scss | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/styles/global.scss b/styles/global.scss index 5f34f2ec78..c6a4cdf63a 100644 --- a/styles/global.scss +++ b/styles/global.scss @@ -409,6 +409,12 @@ pre.code-box, } } +.dark-theme { + img { + filter: invert(100%); + } +} + // Grid that switches from 2 to 3 to 4 columns as screen gets bigger // Usually used with items that have a column width of 3 .content-grid { From b52b02e92f0a46bb1d17fefbe4f524d2ee23996f Mon Sep 17 00:00:00 2001 From: Reshma R Date: Wed, 23 Jul 2025 18:29:02 +0900 Subject: [PATCH 2/3] fixed unnecessary inversion of photos --- public/images/fes.svg | 21 +++++++++++++++++++ .../en/fes_contribution_guide.mdx | 6 +++++- styles/global.scss | 6 ++---- 3 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 public/images/fes.svg diff --git a/public/images/fes.svg b/public/images/fes.svg new file mode 100644 index 0000000000..1578b57306 --- /dev/null +++ b/public/images/fes.svg @@ -0,0 +1,21 @@ + + + + + + + + friendly_errors p5._friendlyError() p5._validateParameters() p5._friendlyFileLoadError() p5._friendlyAutoplayError()p5 p5._fesErrorMonitor()test/unit/core/error_helpers.jsused for printing error messagesused for unit testing _report() _friendlyError() _fesErrorMonitor() _friendlyAutoplayError()fes_core.js _validateParameters() _friendlyParamError() _getValidateParamsArgTree() _clearValidateParamsCache() class errvalidate_params.js _friendlyFileLoadError()file_errors.js __getErrorStackParser()stacktrace.js \ No newline at end of file diff --git a/src/content/contributor-docs/en/fes_contribution_guide.mdx b/src/content/contributor-docs/en/fes_contribution_guide.mdx index c68ad15c30..82d27efa86 100644 --- a/src/content/contributor-docs/en/fes_contribution_guide.mdx +++ b/src/content/contributor-docs/en/fes_contribution_guide.mdx @@ -26,7 +26,11 @@ The main functions for generating the Friendly Error messages are: Here is a diagram that outlines the location of all functions in FES and how they connect to others: -![A diagram of the files used in FES and their uses](src/content/contributor-docs/images/fes.svg) +A diagram of the files used in FES and their uses Individual files contain the following main FES functions: diff --git a/styles/global.scss b/styles/global.scss index c6a4cdf63a..facdfac4c2 100644 --- a/styles/global.scss +++ b/styles/global.scss @@ -409,10 +409,8 @@ pre.code-box, } } -.dark-theme { - img { - filter: invert(100%); - } +.dark-theme .invert-in-dark { + filter: invert(100%); } // Grid that switches from 2 to 3 to 4 columns as screen gets bigger From c1b7357ffe147012a4c0a4385943d960f4e4120e Mon Sep 17 00:00:00 2001 From: Renjie Li Date: Mon, 28 Jul 2025 18:20:53 +0800 Subject: [PATCH 3/3] Fix: Use import for fes.svg instead of copying to public --- public/images/fes.svg | 21 ------------------- .../en/fes_contribution_guide.mdx | 9 ++++---- 2 files changed, 5 insertions(+), 25 deletions(-) delete mode 100644 public/images/fes.svg diff --git a/public/images/fes.svg b/public/images/fes.svg deleted file mode 100644 index 1578b57306..0000000000 --- a/public/images/fes.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - friendly_errors p5._friendlyError() p5._validateParameters() p5._friendlyFileLoadError() p5._friendlyAutoplayError()p5 p5._fesErrorMonitor()test/unit/core/error_helpers.jsused for printing error messagesused for unit testing _report() _friendlyError() _fesErrorMonitor() _friendlyAutoplayError()fes_core.js _validateParameters() _friendlyParamError() _getValidateParamsArgTree() _clearValidateParamsCache() class errvalidate_params.js _friendlyFileLoadError()file_errors.js __getErrorStackParser()stacktrace.js \ No newline at end of file diff --git a/src/content/contributor-docs/en/fes_contribution_guide.mdx b/src/content/contributor-docs/en/fes_contribution_guide.mdx index 82d27efa86..625c034555 100644 --- a/src/content/contributor-docs/en/fes_contribution_guide.mdx +++ b/src/content/contributor-docs/en/fes_contribution_guide.mdx @@ -7,7 +7,8 @@ description: > --- {/* An overview of the Friendly Error System codebase and a reference for developers. */} - +import { Image } from 'astro:assets'; +import fesDiagram from '../images/fes.svg'; The `core/friendly_errors` folder contains the code for the p5js’ Friendly Error Systems (FES) responsible for generating Friendly Error messages or Friendly Errors. You may have seen Friendly Error messages starting with “`🌞 p5.js says:`” in your console, supplementing default, browser-generated error messages. @@ -26,10 +27,10 @@ The main functions for generating the Friendly Error messages are: Here is a diagram that outlines the location of all functions in FES and how they connect to others: -A diagram of the files used in FES and their uses Individual files contain the following main FES functions: