Pre-fill metadata on Publish page #142
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#142
Loading…
Reference in a new issue
No description provided.
Delete branch "prefill-publish"
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?
Also includes some general refactoring and improvements to the state management
@alexliebowitz what needs to happen to merge this?
Related? https://github.com/lbryio/lbry-app/issues/186
Just need to finish writing it. The biggest part is done (refactoring so the metadata fields are controlled). I got stuck because I've been receiving a blank set in the "myClaims" prop and had trouble debugging it; there's a lot of Redux-y indirection that was giving me a headache. It's helping me learn the new codebase, though. Over the weekend I'm going to plow through and finish this. IIRC that issue started happening suddenly for no apparent reason, which makes me think it's a daemon bug. If so, I'll make a simple mock for the correct behavior to get this working and file an issue in the lbry repo.
#186 is related in that the updates won't actually work properly until we fix that. But this is purely form filling logic within the Publish page, doesn't touch Redux at all.
Whew. Figured out the issue with the myClaims prop being empty.
The Publish page is populating the prop with a value from the Redux store: https://github.com/lbryio/lbry-app/blob/master/ui/js/page/publish/index.js#L15
... but it never actually dispatches an action to call
claim_list_mine
and get the value, so it defaults to an empty set:https://github.com/lbryio/lbry-app/blob/master/ui/js/selectors/claims.js#L84
But the My Files page does request the info: https://github.com/lbryio/lbry-app/blob/master/ui/js/page/fileListDownloaded/index.js#L24
So the myClaims prop of the Publish page is only populated if you have already visited the My Files page. If you haven't visited My Files, the Publish page will act like you have no claims, and if you enter the name of something you already published, it doesn't indicate that you're updating an old claim. (This is happening on master too.)
Now that I finally figured that out, tomorrow I will fix this bug, finish the pre-fill stuff, and everything should be ready for review by late tomorrow.
@kauffj
You might want to check out #192, seems related.
Can I help out at all on this @alexliebowitz?