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

Ensure single row display for text visualizer #1470

Merged
merged 1 commit into from
Jul 15, 2023

Conversation

glopesdev
Copy link
Member

@glopesdev glopesdev commented Jul 15, 2023

This PR ensures the default text visualizer always displays a single row for every element in a sequence, even if the string representation of the object includes line break characters. This is important to ensure the correctness of the visualizer behavior: expanding the height of the visualizer window directly controls how many values are buffered on the display by using multiples of the rendered line height.

If arbitrary multi-line text is left to render unfiltered, this calculation has the potential to be thrown off in a very misleading way, as expanding the control to see all the lines will have the effect of expanding the buffer. Since in this case a single value would already fill up multiple lines, and new values are shown at the bottom, this would mean that the value at the top would be a value in the past, rather than the most recent.

As it currently stands, it is best to assume that no line breaks are allowed. Future versions of the text visualizer, or other visualizers, may introduce other options for multi-line text but for now we want to ensure predictability over flexibility.

@glopesdev glopesdev added the fix Pull request that fixes an issue label Jul 15, 2023
@glopesdev glopesdev added this to the 2.8 milestone Jul 15, 2023
@glopesdev glopesdev merged commit 88249a3 into bonsai-rx:main Jul 15, 2023
@glopesdev glopesdev deleted the text-visualizer branch July 15, 2023 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Pull request that fixes an issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant