Skip to content

Conversation

@ulibath
Copy link
Collaborator

@ulibath ulibath commented Sep 12, 2023

No description provided.

private let descriptionLabel = UILabel(font: .systemFont(ofSize: 13), lineCount: WishKit.config.expandDescriptionInList ? 0 : 1)
private var descriptionLabel = UILabel(font: .systemFont(ofSize: 13), lineCount: WishKit.config.expandDescriptionInList ? 0 : 1)

public var isExpanded = WishKit.config.expandDescriptionInList {
Copy link

Choose a reason for hiding this comment

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

Does this need to be a stored property or can it be computed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This Boolean can be toggled to expand/shrink the WishCell by tapping on it. So I don't think it can be computed.

Ulrike added 4 commits October 5, 2023 10:50
# Conflicts:
#	Sources/WishKit/Controller/WishListVC.swift
#	Sources/WishKit/View/WishCell.swift
#	Sources/WishKit/ViewModel/WishListVM.swift
.multilineTextAlignment(.leading)
.lineLimit(descriptionLineLimit)
// By changing the id, the view is identified as a new view and we avoid the weird text animation.
.id(descriptionLineLimit)
Copy link
Member

Choose a reason for hiding this comment

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

But don't you now have multiple views with the same ID in the hierarchy? Won't that be a problem?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Would it be okay to generate a new UUID() instead or should I create a unique id myself?

Copy link
Member

Choose a reason for hiding this comment

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

Maybe Text + line limit? Then the ID wouldn't change every time body is reevaluated.

@ulibath ulibath requested a review from frankschlegel October 25, 2023 09:25
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.

4 participants