acmerobotics / ftc-dashboard

React-based web dashboard designed for FTC
https://acmerobotics.github.io/ftc-dashboard
Other
171 stars 129 forks source link

Render telemetry view via `dangerouslySetInnerHTML` #61

Closed NoahBres closed 2 years ago

NoahBres commented 3 years ago

Telemetry view: render via dangerously set inner html to enable to enable the fancy HTML Logging from the SDK.

Implementation tbd

Probably requires manual parsing as the tags that the Android textview supports aren't native HTML. Maybe a simple regex replace will suffice.

NoahAndrews commented 3 years ago

I believe the supported tags should also be valid HTML. It's just that many valid HTML tags don't work in the Android TextView.

NoahBres commented 3 years ago

Ah you're right. I was testing the HTML properties (color, font, etc.) on non-<font> tags. Wasn't aware that it was limited to that tag. But it seems to work fine.

So no parsing necessary! A simple PR to just switch to dangerouslySetInnerHTML should work great!

NoahBres commented 2 years ago

0.4.5