-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add basic tldraw poll shape rendering #55
Conversation
The existing poll rendering code for pre-tldraw polls has been copy/ pasted and adjusted slightly to handle the different data structure for the poll response data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested, looks great!
Poll now uses the colors from tldraw for the background, which makes it look more like the poll in the live meeting. Text size and padding is adjusted slightly smaller, since the tldraw shapes end up being kind of small for the amount of text in them. Poll title is rendered at the top of the box if present.
Make the question be bold, to match the live session. Fix the calculation of the title width; poll bars were being rendered at the wrong vertical position because the variable for the reserved height was being overwritten.
Updated version of the renderer improves the text size and spacing around bars a bit, and adds support for rendering the poll question if provided. I tried to get the colors a bit closer to the live session, but I'm not totally sure where the colors are coming from there… some of them seem to be hardcoded? The images in bigbluebutton/tldraw#16 show a grey background, but the screenshot in #55 (comment) shows a white background. Here's what the updated poll rendering looks like: I think it's good to be merged at this point - we can always tweak colors and spacing further later if needed. |
This fixes a crash caused by an unsupported tldraw shape, and renders polls in the correct location and size on the canvas.
The current poll rendering is re-using code that was made for the pre-tldraw whiteboard, so the styling doesn't match the live polls, and the poll title is not shown. Some additional work is still needed to tweak/improve the rendering style.
This fixes #52 and #53