Skip to content

fix: suppress and resolve console warnings#6

Merged
takaokouji merged 3 commits into
developfrom
fix/suppress-warnings
Jan 20, 2026
Merged

fix: suppress and resolve console warnings#6
takaokouji merged 3 commits into
developfrom
fix/suppress-warnings

Conversation

@takaokouji
Copy link
Copy Markdown

Summary

This PR addresses several console warnings that appeared when running the GUI in development mode.

Implementation details

  • Fix StageHeaderComponent PropType: Changed projectId to allow both string and number, and removed isRequired as it can be null initially.
  • Improve Log Suppression: Updated src/lib/log-suppression.js to check all arguments passed to console.warn and console.error. This ensures that formatted React warnings are correctly identified and suppressed.
  • Avoid GenerateSW in Development: Modified webpack.config.js to use buildConfig (without Workbox) in development mode. This prevents the warning: "GenerateSW has been called multiple times, perhaps due to running webpack in --watch mode".
  • Address Deprecated Meta Tag: Added <meta name="mobile-web-app-capable" content="yes"> to src/playground/index.ejs to resolve the deprecation warning for apple-mobile-web-app-capable.
  • Lint Fixes: Resolved ESLint issues in log-suppression.js.

Test coverage

  • Verified that lint checks pass for modified files.
  • Confirmed that npm run build:dev completes successfully.

Co-Authored-By: Gemini noreply@google.com

takaokouji and others added 3 commits January 20, 2026 15:10
…ration

- Added src/lib/log-suppression.js to filter out specific console warnings.
- Imported suppression logic in all playground entry points and main library index.
- Warnings suppressed include:
  - Object freezing is not supported by Opal
  - Canvas2D willReadFrequently attribute
  - React 18 defaultProps deprecation
  - React unknown prop recognition
  - Deprecated React lifecycle methods (componentWillMount, etc.)
  - findDOMNode deprecation
  - AudioContext user gesture requirement
  - apple-mobile-web-app-capable meta tag deprecation

🤖 Generated with [Gemini Code](https://gemini.google.com/code)

Co-Authored-By: Gemini <noreply@google.com>
- Fix StageHeaderComponent projectId prop type to allow string/number and null
- Robustify log-suppression to check all console arguments
- Add mobile-web-app-capable meta tag to address deprecation warning
- Avoid GenerateSW in development mode to prevent 'multiple calls' warning
- Add GenerateSW warning to ignoredWarnings as a fallback
@takaokouji takaokouji merged commit 4abdf4c into develop Jan 20, 2026
@takaokouji takaokouji deleted the fix/suppress-warnings branch January 20, 2026 10:34
takaokouji pushed a commit that referenced this pull request Mar 8, 2026
* fix: add support for Scratch-style procedures

* refactor: remove underscore procedure creation callback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant