Skip to content

chore: suppress console.warn in production builds#1509

Merged
artembelik merged 3 commits into
mainfrom
chore/console-warn
Apr 27, 2026
Merged

chore: suppress console.warn in production builds#1509
artembelik merged 3 commits into
mainfrom
chore/console-warn

Conversation

@artembelik

Copy link
Copy Markdown
Contributor

No description provided.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@artembelik artembelik requested a review from NikGurev April 22, 2026 10:53
@artembelik artembelik self-assigned this Apr 22, 2026
@artembelik artembelik requested a review from lskramarov as a code owner April 22, 2026 10:53
Copilot AI review requested due to automatic review settings April 22, 2026 10:53
@artembelik artembelik added the bug Something isn't working label Apr 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates several components/utilities to avoid emitting console.warn messages in production builds by guarding warnings behind Angular’s isDevMode().

Changes:

  • Wrapped existing console.warn calls with isDevMode() checks across multiple components/mixins.
  • Introduced a small warn() helper in KbqCodeBlockHighlight to centralize dev-only warnings.
  • Updated imports to include isDevMode where needed (but one file is missing the import).

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/components/modal/modal.service.ts Suppresses confirm-modal footer warning outside dev mode.
packages/components/file-upload/primitives/file-drop.ts Suppresses folder drag-drop support warning outside dev mode.
packages/components/core/common-behaviors/tabindex.ts Makes mixin deprecation warning dev-only.
packages/components/core/common-behaviors/error-state.ts Makes mixin deprecation warning dev-only.
packages/components/core/common-behaviors/disabled.ts Makes mixin deprecation warning dev-only (but currently missing isDevMode import).
packages/components/core/common-behaviors/common-module.ts Suppresses missing-doctype warning outside dev mode.
packages/components/core/common-behaviors/color.ts Makes mixin deprecation warning dev-only.
packages/components/code-block/code-block-highlight.ts Routes warnings through a dev-only warn() helper.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/components/core/common-behaviors/disabled.ts
@github-actions

Copy link
Copy Markdown

🚨 E2E tests failed

Review the report for details.


💡 Comment /approve-snapshots to approve snapshot changes.

@github-actions

github-actions Bot commented Apr 22, 2026

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit 24590b5):

https://koobiq-next--prs-1509-lca2ybwd.web.app

(expires Tue, 28 Apr 2026 10:30:14 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: c9e37e518febda70d0317d07e8ceb35ac43c534c

@lskramarov lskramarov changed the title fix(components): suppress console.warn in production builds chore: suppress console.warn in production builds Apr 22, 2026
Comment thread packages/components/file-upload/primitives/file-drop.ts Outdated
@artembelik artembelik merged commit 29ba510 into main Apr 27, 2026
8 checks passed
@artembelik artembelik deleted the chore/console-warn branch April 27, 2026 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants