Use image preview to display the cover image recently uploaded. #7647

Merged
Ruk33 merged 1 commit from 7159-channel-cover-image-upload-bug-submit-button-grayed-out-when-it-shouldnt-be into master 2022-07-14 02:09:11 +02:00
Ruk33 commented 2022-07-13 18:08:28 +02:00 (Migrated from github.com)

Fixes

Issue Number: https://github.com/lbryio/lbry-desktop/issues/7159

What is the current behavior?

When the image gets uploaded, it doesn't mean the image
is immediately available to be displayed (that's how the
upload image service seems to work) If we try to display
the image before it's ready, the image will result in
an error that locks the submit button.

What is the new behavior?

When the image gets uploaded, instead of waiting for the
upload image service, we just display a local preview using
base 64. This way, the preview becomes available much faster
and the error no longer occurs.

Other information

PR Checklist

Toggle...

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting)
  • Refactoring (no functional changes)
  • Documentation changes
  • Other - Please describe:

Please check all that apply to this PR using "x":

  • I have checked that this PR is not a duplicate of an existing PR (open, closed or merged)
  • I added a line describing my change to CHANGELOG.md
  • I have checked that this PR does not introduce a breaking change
  • This PR introduces breaking changes and I have provided a detailed explanation below
## Fixes Issue Number: https://github.com/lbryio/lbry-desktop/issues/7159 <!-- Tip: - Add keywords to directly close the Issue when the PR is merged. - Skip the keyword if the Issue contains multiple items. - https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword --> ## What is the current behavior? When the image gets uploaded, it doesn't mean the image is immediately available to be displayed (that's how the upload image service seems to work) If we try to display the image before it's ready, the image will result in an error that locks the submit button. ## What is the new behavior? When the image gets uploaded, instead of waiting for the upload image service, we just display a local preview using base 64. This way, the preview becomes available much faster and the error no longer occurs. ## Other information <!-- If this PR contains a breaking change, please describe the impact and solution strategy for existing applications below. --> ## PR Checklist <!-- For the checkbox formatting to work properly, make sure there are no spaces on either side of the "x" --> <details><summary>Toggle...</summary> What kind of change does this PR introduce? - [x] Bugfix - [ ] Feature - [ ] Code style update (formatting) - [ ] Refactoring (no functional changes) - [ ] Documentation changes - [ ] Other - Please describe: Please check all that apply to this PR using "x": - [x] I have checked that this PR is not a duplicate of an existing PR (open, closed or merged) - [ ] I added a line describing my change to CHANGELOG.md - [x] I have checked that this PR does not introduce a breaking change - [ ] This PR introduces breaking changes and I have provided a detailed explanation below </details>
jessopb (Migrated from github.com) reviewed 2022-07-13 21:01:04 +02:00
jessopb (Migrated from github.com) left a comment

I wasn't able to see any kind of preview on the second or third channel publishes testing this branch. However, I was unable to repro the problem on master.
Did it repro for you?

I wasn't able to see any kind of preview on the second or third channel publishes testing this branch. However, I was unable to repro the problem on master. Did it repro for you?
Ruk33 commented 2022-07-13 21:55:22 +02:00 (Migrated from github.com)

Yes @jessopb, if you upload and then try the URL right away, you may encounter the error described in the ticket. After that, since the image will fail, the error appears.

Yes @jessopb, if you upload and then try the URL right away, you may encounter the error described in the ticket. After that, since the image will fail, the error appears.
jessopb commented 2022-07-13 22:01:07 +02:00 (Migrated from github.com)

Did you test a second channel publish while first was pending?

Did you test a second channel publish while first was pending?
jessopb commented 2022-07-13 22:28:52 +02:00 (Migrated from github.com)

@Ruk33 What I did was publish a channel with a cover image. Then I scrolled to the pending channels (at the bottom :( ). I navigated to the pending channel, there was a cover image.
Then I published a second channel with a different cover image.
The second channel's cover image was blank while pending.

@Ruk33 What I did was publish a channel with a cover image. Then I scrolled to the pending channels (at the bottom :( ). I navigated to the pending channel, there was a cover image. Then I published a second channel with a different cover image. The second channel's cover image was blank while pending.
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#7647
No description provided.