Skip to content

Disable comment section - #2

Open
ulibath wants to merge 9 commits into
mainfrom
feature/disable-comment-section
Open

Disable comment section#2
ulibath wants to merge 9 commits into
mainfrom
feature/disable-comment-section

Conversation

@ulibath

@ulibath ulibath commented Sep 12, 2023

Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread Sources/WishKit/View/WishCell.swift Outdated
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
Copy Markdown

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
Copy Markdown
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.

# Conflicts:
#	Sources/WishKit/Controller/WishListVC.swift
#	Sources/WishKit/View/WishCell.swift
#	Sources/WishKit/ViewModel/WishListVM.swift
Comment thread Sources/WishKit/SwiftUI/WishView.swift Outdated
.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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

3 participants