chore: suppress console.warn in production builds#1509
Merged
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
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.warncalls withisDevMode()checks across multiple components/mixins. - Introduced a small
warn()helper inKbqCodeBlockHighlightto centralize dev-only warnings. - Updated imports to include
isDevModewhere 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.
🚨 E2E tests failedReview the report for details. 💡 Comment |
|
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 |
NikGurev
reviewed
Apr 22, 2026
NikGurev
approved these changes
Apr 23, 2026
lskramarov
approved these changes
Apr 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.