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

automaticDimension is ignored, only estimatedRowHeight is used as Height #468

Closed
5 of 8 tasks
peterpaulis opened this issue Nov 30, 2021 · 4 comments
Closed
5 of 8 tasks

Comments

@peterpaulis
Copy link

peterpaulis commented Nov 30, 2021

Description

The height of the skeleton cell should be calculated using autolayout based upon it's content, but the cell has always the height from estimatedRowHeight, no matter when providing delegate or rowHeight == UITableView.automaticDimension

What type of issue is this? (place an x in one of the [ ])

  • bug
  • enhancement (feature request)
  • question
  • documentation related
  • discussion

Requirements (place an x in each of the [ ])

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.

Bug Report

Filling out the following details about bugs will help us solve your issue sooner.

SkeletonView Environment:

**SkeletonView version:1.26.0 **
Xcode version:13.1 (13A1030d)
Swift version:5

Steps to reproduce:

The height of the skeleton cell should be calculated using autolayout based upon it's content, but the cell has always the height from estimatedRowHeight, no matter when providing delegate or rowHeight == UITableView.automaticDimension

the docu only states

1️⃣ If you are using resizable cells (tableView.rowHeight = UITableViewAutomaticDimension), it's mandatory define the estimatedRowHeight.

but not, that the an exact size is the only option and you are left out of automaticDimension :( so i suppose this is a bug?

Expected result:

height of the sekelton cell should be based upon UITableView.automaticDimension not estimatedRowHeight

Actual result:

estimatedRowHeight is always used, no matter the content

@Juanpe
Copy link
Owner

Juanpe commented Nov 30, 2021

Hi @peterpaulis 👋🏼

Yep, you're right. Now, SkeletonView neither calculates the height of the cells nor considers the value provided by the delegate.

There is an open PR to allow to specify the height for each cell. #460

@peterpaulis
Copy link
Author

peterpaulis commented Dec 1, 2021

i believe this to be a very important feature... as you can display the table with different kinds of cells, have the skeleton cell match the content (like when you have a text size setting) or have random skeleton content (which changes the height)... looking forward for this to be added to main

as i understand the problem may be in calculating the number of desired cells to fill the table... in this context it would be ok i believe for the programmer to provide a really large number of rows (e.g. 999) as the cell reuse is very effective and only the displayed cells are handled... so basically it has no impact if there are 7 visible cells and 992 not visible, or just 7 visible

@Juanpe Juanpe added the triaged label Jan 7, 2022
@Juanpe
Copy link
Owner

Juanpe commented Jan 7, 2022

Duplicate of #424

@Juanpe Juanpe marked this as a duplicate of #424 Jan 7, 2022
@Juanpe
Copy link
Owner

Juanpe commented Jan 7, 2022

I'm going to close this issue because it's duplicated with #424

Thanks

@Juanpe Juanpe closed this as completed Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants