reactive-python / reactpy

It's React, but in Python
https://reactpy.dev
MIT License
7.89k stars 318 forks source link

Communicate Javascript console output as Python logging #890

Open Archmonger opened 1 year ago

Archmonger commented 1 year ago

Current Situation

Javascript warnings and exceptions are currently not visible within the Python console. This feels fairly fragmented, as Python developers won't expect to check the client side console for warnings/errors.

Proposed Actions

By using our new messaging schema, all client-sided console output should be redirected to the server and logged the within the Python console.

This should only occur when ReactPy is in debug mode.

Related:

rmorshea commented 1 year ago

As noted in the linked comment, the messaging scheme (as it stands today) only anticipates a message routing system. It would be useful to write up a task for actually implementing that routing system since this issue would depend upon it.

Archmonger commented 1 year ago

@rmorshea This issue has reminded me that we probably want to flesh this out soon.

It's going to be confusing as hell to new users that class is class_name, especially given that there's zero server side indication of such.

rmorshea commented 1 year ago

Yup. I actually completely forgot about that.