Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS console log support #15402

Merged
merged 22 commits into from
Jan 21, 2025
Merged

JS console log support #15402

merged 22 commits into from
Jan 21, 2025

Conversation

mike12345567
Copy link
Collaborator

@mike12345567 mike12345567 commented Jan 20, 2025

Description

This PR introduces support for console.log type functions when writing JS bindings. These will be presented as part of the preview - displayed as such:

image
error state:
image

This will correctly handle warn and error - creating a visual distinction from other log types. This will also handle comma separated log statements and will correctly display different types (e.g. correctly highlighting JSON).

All logging is handled purely in the frontend, so while you can preview them for formulas or automation bindings (when preview is supported) they will not be logged on the backend currently.

Logs in the design section will carry through to the app currently, so that when previewing a real page you can check how bindings are evaluating (say in the preview of the app).

Note: At the moment .table() is supported, but does not get displayed any differently to a log statement (it is not fully supported currently).

@mike12345567 mike12345567 self-assigned this Jan 20, 2025
Copy link

qa-wolf bot commented Jan 20, 2025

QA Wolf here! As you write new code it's important that your test coverage is keeping up.
Click here to request test coverage for this PR!

@mike12345567 mike12345567 requested a review from adrinr January 20, 2025 14:36
@github-actions github-actions bot added firestorm Data/Infra/Revenue Team size/m labels Jan 20, 2025
@mike12345567 mike12345567 requested a review from a team as a code owner January 20, 2025 16:33
Copy link
Collaborator

@adrinr adrinr left a comment

Choose a reason for hiding this comment

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

Nice job!

packages/bbui/src/bbui.css Show resolved Hide resolved
@joebudi
Copy link
Contributor

joebudi commented Jan 21, 2025

Great work @mike12345567 . There are two arrows at the right of the screenshot that seem to be out of place.

@mike12345567 mike12345567 merged commit 1bed18a into master Jan 21, 2025
20 checks passed
@mike12345567 mike12345567 deleted the feature/js-logging branch January 21, 2025 14:22
@github-actions github-actions bot locked and limited conversation to collaborators Jan 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
firestorm Data/Infra/Revenue Team size/m
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants