You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The addition of Text::style and Line::style broke some assumptions about how things should work in Paragraph.
We need a comprehensive set of tests that shows how the following styles interact:
Any existing background style that is rendered to the buffer beforehand
Paragraph::style
Block::style
Text::style
Line::style
Span::style
Solution
Add an integration test for this under the tests/ folder that tests the combinations. A good name for this might be tests/text_style.rs?
Check whether the unit tests cover this from the perspective of the individual types and make the tests consistent and simple. A good way to do this would be to have a style module in the tests module in each of the paragraph.rs/text.rs/... files.
Ensure the API docs for each of the items indicate the expected interactions neatly (e.g. <this style> overrides <that style>)
Ensure that any illogical overrides / bugs are fixed (note that these might be bugs in the docs or bugs in the implementation. It's important to discuss and capture the rationale / intent behind these before fixing the inconsistencies.
I added some detail to the solution suggestions. I want to re-iterate that the primary goals on this issue are to ensure that we are rendering these things consistently and correctly and to make that clear with both docs and tests.
Problem
The addition of
Text::style
andLine::style
broke some assumptions about how things should work inParagraph
.We need a comprehensive set of tests that shows how the following styles interact:
Solution
tests/text_style.rs
?style
module in thetests
module in each of the paragraph.rs/text.rs/... files.<this style>
overrides<that style>
)Alternatives
Additional context
The text was updated successfully, but these errors were encountered: