comments and expandable changes #2667
No reviewers
Labels
No labels
accessibility
app-parity
area: creator
area: daemon
area: design
area: devops
area: discovery
area: docs
area: installer
area: internal
area: livestream
area: performance
area: proposal
area: reposts
area: rewards
area: search
area: security
area: subscriptions
area: sync
area: ux
area: viewer
area: wallet
BEAMER
channel
comments
community PR
consider soon
core team
css
dependencies
electron
Epic
feature request
first-timers-only
good first issue
hacktoberfest
help wanted
hub-dependent
icebox
Invalid
level: 0
level: 1
level: 2
level: 3
level: 4
merge when green
needs: exploration
needs: grooming
needs: priority
needs: repro
needs: tech design
notifications
odysee
on hold
playlists
priority: blocker
priority: high
priority: low
priority: medium
protocol dependent
recsys
redesign
regression
resilience
sdk dependent
Tom's Wishlist
trending
type: bug
type: discussion
type: improvement
type: new feature
type: refactor
type: task
type: testing
unplanned
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/lbry-desktop#2667
Loading…
Reference in a new issue
No description provided.
Delete branch "commentsExpandContained"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
comments are only expandable if larger than 120 rect.height
expandable checks the useRect ref height before inserting itself
Originally I implemented the useRect in the Comment component but it seems to work contained in Expandable.
For now, I commented out Expandable border-bottom style - I don't think expandable should be in charge of that sort of thing.
This will be removed before merge if we agree it doesn't belong.
@ -9,4 +8,4 @@
type Props = {
children: React$Node | Array<React$Node>,
};
This 120 should be a constant, I think. I'm not sure how I'd use that constant for the styles too, though. Base size is 12px and expandable min height is 10rem (=120).
I was considering allowing to pass in as a prop the height at which text becomes expandable as long as it's over 120px
@ -9,4 +8,4 @@
type Props = {
children: React$Node | Array<React$Node>,
};
I just moved it up to the top. I think as long as it's reasonable it's fine. In the browser (and possibly desktop sometime) users can scale the font-size so anything exact falls apart. 120 seems fine.