Pre-fill metadata on Publish page #142

Merged
alexliebowitz merged 10 commits from prefill-publish into publishing 2017-06-19 16:19:54 +02:00
alexliebowitz commented 2017-05-26 10:27:06 +02:00 (Migrated from github.com)

Also includes some general refactoring and improvements to the state management

Also includes some general refactoring and improvements to the state management
kauffj commented 2017-06-02 14:58:31 +02:00 (Migrated from github.com)

@alexliebowitz what needs to happen to merge this?

@alexliebowitz what needs to happen to merge this?
kauffj commented 2017-06-02 15:36:25 +02:00 (Migrated from github.com)
Related? https://github.com/lbryio/lbry-app/issues/186
alexliebowitz commented 2017-06-03 09:26:13 +02:00 (Migrated from github.com)

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.

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.
alexliebowitz commented 2017-06-03 09:39:08 +02:00 (Migrated from github.com)

#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.

#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.
alexliebowitz commented 2017-06-05 09:44:12 +02:00 (Migrated from github.com)

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

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
kauffj commented 2017-06-05 17:41:38 +02:00 (Migrated from github.com)

You might want to check out #192, seems related.

You might want to check out #192, seems related.
6ea86b96 commented 2017-06-07 15:05:32 +02:00 (Migrated from github.com)

Can I help out at all on this @alexliebowitz?

Can I help out at all on this @alexliebowitz?
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-desktop#142
No description provided.