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

fix(block): Fixed title_style not rendered #363

Merged
merged 1 commit into from
Aug 4, 2023
Merged

Conversation

Valentin271
Copy link
Member

@Valentin271 Valentin271 commented Aug 3, 2023

This PR fixes #349 the easy way (see issue). I think the complex fix requires another separate PR.

I added a unit test and made sure it didn't pass prior to this modification. I added a lot of test cases because there are three separate places where this bug can occur.

I didn't change the corresponding example to demonstrate the behavior as there is already an opened PR that will likely be merged.

I didn't want to create a new spans (or lines) because in the future they might contain more than just content and style and this would lead to some half cloned spans. Thus I preferred cloning and modifying them locally.

@Valentin271 Valentin271 marked this pull request as draft August 3, 2023 15:44
@Valentin271 Valentin271 force-pushed the main branch 2 times, most recently from 3ccc39f to 1922b9e Compare August 3, 2023 16:22
@codecov
Copy link

codecov bot commented Aug 3, 2023

Codecov Report

Merging #363 (1c7a122) into main (440f62f) will increase coverage by 0.23%.
Report is 3 commits behind head on main.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #363      +/-   ##
==========================================
+ Coverage   84.76%   84.99%   +0.23%     
==========================================
  Files          40       40              
  Lines        8603     8686      +83     
==========================================
+ Hits         7292     7383      +91     
+ Misses       1311     1303       -8     
Files Changed Coverage Δ
src/widgets/block.rs 86.18% <100.00%> (+2.21%) ⬆️

... and 1 file with indirect coverage changes

@Valentin271 Valentin271 marked this pull request as ready for review August 3, 2023 16:48
@Valentin271 Valentin271 changed the title fix(block): Fixed title_style not rendered (#349) fix(block): Fixed title_style not rendered Aug 3, 2023
Copy link
Member

@joshka joshka left a comment

Choose a reason for hiding this comment

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

Thanks for the PR and welcome to Ratatui.

Generally LGTM. I had a nitpick and a preference that has to do with keeping tests simple. Can be merged as-is or updated to address the feedback (both are not huge points).

@joshka
Copy link
Member

joshka commented Aug 4, 2023

I merged #351 now, and took a look at this visually and it acts as expected.:

fixed title_style

Copy link
Member

@joshka joshka left a comment

Choose a reason for hiding this comment

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

LGTM - Thanks for the fix. We appreciate your effort.

@joshka
Copy link
Member

joshka commented Aug 4, 2023

Merging this even though checks are failing as the failures are due to the MSRV issue.

@joshka joshka added this pull request to the merge queue Aug 4, 2023
Merged via the queue into ratatui:main with commit 49a82e0 Aug 4, 2023
@joshka joshka added this to the v0.23.0 milestone Aug 21, 2023
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.

Block title_style is not rendered
2 participants