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

Remove the WebImage placeholder maxWidth/maxHeight modifier, this may break some use case like TabView. If user want to use placeholder, limit themselves #178

Merged
merged 2 commits into from
Mar 10, 2021

Conversation

dreampiggy
Copy link
Collaborator

This close #133

Use .frame(maxWidth: .infinity) will cause the TabView crash. Actually I think this is SwiftUI issue.

But anyway, we don't limit the placeholder frame, if you want, limit yourself using .placeholder { MyView().frame(width: 100) }

@dreampiggy dreampiggy added the webimage WebImage struct label Mar 10, 2021
@codecov
Copy link

codecov bot commented Mar 10, 2021

Codecov Report

Merging #178 (d17d44e) into master (e19c35a) will decrease coverage by 0.20%.
The diff coverage is 76.92%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #178      +/-   ##
==========================================
- Coverage   75.00%   74.79%   -0.21%     
==========================================
  Files          11       11              
  Lines         960      968       +8     
==========================================
+ Hits          720      724       +4     
- Misses        240      244       +4     
Flag Coverage Δ
ios 70.87% <76.92%> (-0.19%) ⬇️
macos 74.25% <76.92%> (-0.23%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
SDWebImageSwiftUI/Classes/ImagePlayer.swift 71.05% <75.00%> (-5.62%) ⬇️
SDWebImageSwiftUI/Classes/WebImage.swift 89.32% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e19c35a...2935e2b. Read the comment docs.

… break some use case like `TabView`. If user want to use placeholder, limit themselves

Also, polish the player API
@dreampiggy dreampiggy force-pushed the remove_placeholder_maxWidth_limit branch from 97d862c to d17d44e Compare March 10, 2021 11:13
@dreampiggy dreampiggy force-pushed the remove_placeholder_maxWidth_limit branch from 2b510dc to 2935e2b Compare March 10, 2021 14:28
@dreampiggy dreampiggy merged commit 5b658b0 into master Mar 10, 2021
@dreampiggy dreampiggy deleted the remove_placeholder_maxWidth_limit branch March 10, 2021 14:29
@dreampiggy dreampiggy changed the title Remove the WebImage placeholder maxWidth/maxHeight modifier, this maybreak some use case like TabView. If user want to use placeholder, limit themselves Remove the WebImage placeholder maxWidth/maxHeight modifier, this may break some use case like TabView. If user want to use placeholder, limit themselves Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
webimage WebImage struct
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WebImage Instantly crashes on load when inside a TabView
1 participant