Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions chartlets.js/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## Version 0.1.4 (in development)

* In `chartlets.js` we no longer emit warnings and errors in common
situations to avoid too much spam in the browser console.

## Version 0.1.3 (from 2025/01/28)

* **Chore:** Version bump to align CI process with GitHub release flow.
Expand Down
2 changes: 1 addition & 1 deletion chartlets.js/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion chartlets.js/packages/lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chartlets",
"version": "0.1.3",
"version": "0.1.4-dev.0",
"description": "An experimental library for integrating interactive charts into existing JavaScript applications.",
"type": "module",
"files": [
Expand Down
10 changes: 8 additions & 2 deletions chartlets.js/packages/lib/src/actions/helpers/getInputValues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,18 @@ export function getInputValue(
} else if (isHostChannel(input) && hostStore) {
inputValue = getInputValueFromHostStore(hostStore, property);
} else {
console.warn(`input with unknown data source:`, input);
// We no longer log, as the situation is quite common if a
// component has not yet been rendered.
// Enable logging for debugging only:
// console.warn(`input with unknown data source:`, input);
}
if (inputValue === undefined || inputValue === noValue) {
// We use null, because undefined is not JSON-serializable.
inputValue = null;
console.warn(`value is undefined for input`, input);
// We no longer log, as the situation is quite common if a
// component has not yet been rendered.
// Enable logging for debugging only:
// console.warn(`value is undefined for input`, input);
}
return inputValue;
}
Expand Down
9 changes: 6 additions & 3 deletions chartlets.js/packages/lib/src/components/Component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ export function Component(props: ComponentProps) {
if (typeof ActualComponent === "function") {
return <ActualComponent {...props} />;
} else {
console.error(
`chartlets: invalid component type encountered: ${componentType}`,
);
// We no longer log, as the situation is quite common
// and users can not do anything against it.
// Enable error logging for debugging only:
// console.error(
// `chartlets: invalid component type encountered: ${componentType}`,
// );
return null;
}
}