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

Add basic tldraw poll shape rendering #55

Merged
merged 7 commits into from
Oct 4, 2024
Merged

Add basic tldraw poll shape rendering #55

merged 7 commits into from
Oct 4, 2024

Conversation

kepstin
Copy link
Contributor

@kepstin kepstin commented Oct 2, 2024

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.

Screenshot from presentation mkv

This fixes #52 and #53

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.
@kepstin kepstin requested a review from antobinary October 2, 2024 19:43
@kepstin kepstin linked an issue Oct 2, 2024 that may be closed by this pull request
Copy link
Member

@antobinary antobinary left a comment

Choose a reason for hiding this comment

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

Tested, looks great!

@antobinary
Copy link
Member

Live meeting: annotation includes the [optional] question

Screenshot from 2024-10-04 11-27-00

Presentation format: again includes the question
Screenshot from 2024-10-04 11-25-16

Video format annotation does not include the title:
Screenshot from 2024-10-04 11-29-20

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.
@kepstin
Copy link
Contributor Author

kepstin commented Oct 4, 2024

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:
mpv-shot0003

I think it's good to be merged at this point - we can always tweak colors and spacing further later if needed.

@antobinary antobinary merged commit c473e6f into main Oct 4, 2024
4 of 5 checks passed
@kepstin kepstin deleted the tldraw-poll branch October 31, 2024 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for tldraw "poll" events for BBB 3.0 Missing polling result annotation in BBB 3.0 circa alpha.7+
2 participants