SJRK-418: Media blocks break on text field changes

Metadata

Source
SJRK-418
Type
Bug
Priority
Major
Status
Closed
Resolution
Fixed
Assignee
N/A
Reporter
Gregor Moss
Created
2020-11-04T15:01:43.052-0500
Updated
2020-11-12T15:16:07.669-0500
Versions
N/A
Fixed Versions
N/A
Component
  1. Storytelling Tool UI

Description

In the SJRK-289 development branch, a bug has been introduced that causes media blocks (i.e. all but text blocks) to break when a text value is altered (e.g. heading, alt text, description). This seems to go away when the uploadState-to-visibility model relay is commented out, but that relay is needed to hide and show elements related to file uploading.

To reproduce

  1. Check out the SJRK-289 branch at commit dc3674af113dffeb2df5c4001e58bb4027cf97f4
  2. Start the server via docker-compose or run the Node server directly in your environment, making sure the database server is running
  3. Go to http://localhost:8081/storyEdit.html
  4. Click "Add an image block"
  5. Click on the "Block heading" input field of the new image block
  6. Type in any value
  7. Click away or defocus from the input field

Expected

The value remains in the field and nothing untoward happens, especially nothing to do with the file upload

Actual

The block's file upload progress indicator and error message text (without an accompanying error message) are shown, and the image placeholder is hidden. Please see the attached screenshot for an example of the result. This also breaks the blockUi by setting its storyId field to "null" (its initial state) and sets the uploadState to a value other than "ready", which prevents navigating to the story preview.

Attachments

Comments