Publish by channel_id #1481
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#1481
Loading…
Reference in a new issue
No description provided.
Delete branch "publish-by-channel-id"
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?
Issue #1433
Add
channelId
toPublishState
and use it to replacechannel
inPublishParams
. Store both in redux while editing but always usechannel_id
to publish.Adds
myChannels: selectMyChannelClaims(state)
to PublishForm and uses it to get a channel's id from its name when saving form data.@tzarebczan check this out. I am able to create a new channel and publish seconds later
It looks like you still need to change
src/renderer/redux/actions/publish.js
to look forchannelId
instead ofchannelName
The file is being published without a channel currently. It just looks at the redux state on success to get the data for the modal.Can you add this to
src/rendered/page/publish/index.js
? I know it's weird. We should probably just copy that whole file into this one make that one an empty connect. Not sure.I can't believe I missed that, it's the most important part.
I have made what should be the necessary changes to
/redux/actions/publish.js
and have published to new channels and anonymously. Now they stick around inMy LBRY >> Publishes
like they should.When I go to the Publish page, I don't see channels I've created prior, my only options are anonymous and new channel, which seems wrong.
@daovist - nice work! https://github.com/lbryio/lbry-redux/pull/26 should fix the channel selection issue. I'll test this out once that's merged into redux
One small thing
This should clear out the channel id if there is no
namedChannelClaim
If I select a channel, then go back to anonymous, the same
claim_id
will be stored in redux@daovist Try editing a claim that has a channel, I get this: https://www.screencast.com/t/ubdCz0mx . It should say something like: "You are currently editing this claim". Not sure if this was a new bug introduced here, or if existed before.
@tzarebczan interesting... This was already an issue so I will leave it out of this PR. But here is what I came across looking into this.
uri
andeditingURI
aren't going to match so even when you click edit you get that same message. I used normalizeURI and some logic to fix this so it says its an edit properly, but then if you're working on a new publish with the same name and channel it will give that same message. We need a better way to know when a user is in edit mode. Now, if a user clicks edit and leaves before re-publishing, editingURI won't be reset unless they click reset form.The
editingURI
property is defined in theDO_PREPARE_EDIT
reducer:` [ACTIONS.DO_PREPARE_EDIT]: (state: PublishState, action) => {
const { ...publishData } = action.data;
const { channel, name } = publishData;
`
The message displayed comes from this condition:
if (uri === editingURI)
Looks like this was already a bug. I thought I fixed it but I guess not.
Looks like
channel
isn't being correctly used to createuri
in the publish reducer.One minor suggestion
use
Array.prototype.find()
? (instead of filter)Good call @skhameneh