Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Conversation

Ruk33
Copy link
Collaborator

@Ruk33 Ruk33 commented Jul 13, 2022

Fixes

Issue Number: #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

@Ruk33 Ruk33 requested a review from jessopb July 13, 2022 16:08
Copy link
Member

@jessopb jessopb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Collaborator Author

Ruk33 commented Jul 13, 2022

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
Copy link
Member

jessopb commented Jul 13, 2022

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

@jessopb
Copy link
Member

jessopb commented Jul 13, 2022

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

@jessopb jessopb merged commit 38200b9 into master Jul 14, 2022
@jessopb jessopb deleted the 7159-channel-cover-image-upload-bug-submit-button-grayed-out-when-it-shouldnt-be branch July 14, 2022 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants