-
Notifications
You must be signed in to change notification settings - Fork 814
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
RichLog fixes #4978
RichLog fixes #4978
Conversation
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.
By deferring the initial render until the width is available, we can now render the content that was added via write
in compose
at the correct width, rather than doing the often wrong default of min_width
.
Apologies if you have considered this. Just catching up. There is a danger here that if you defer writing that the renderable could change between the time you call That shouldn't necessarily be a deal breaker. It is probably more surprising if a renderable doesn't fit. Perhaps deferred writes should attempt to copy the renderable at the point of calling |
I'd prefer to document that |
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.
This shows the fix for width
not being respected in write
in action:
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.
Previously, due to #4980, this would incorrectly shrink down to RichLog.min_width
rather than the actual available content width.
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.
LGTM.
Suggest we copy Text renderables, since they have a copy method.
shrink
is shrinking renderable tomin_width
rather than the available width #4980width
param inRichLog.write
isn't respected #4981Please review the following checklist.