Draftail remaining release blockers
See original GitHub issueFirst of all, I’m very sorry to open this issue… I’m totally OK with releasing Draftail with some minor bugs since it’ll still be better than Hallo.js. The purpose of this issue is to focus only on critical, misleading and easily noticeable issues. These important issues must be fixed before 2.0, otherwise Draftail will get a ton of negative feedback and end users will remember Wagtail 2.0 as the release that changed their habits in a bad way (it’s even more important that Draftail is almost the only really noticeable change in 2.0 for end users).
List of Draftail release blockers
Here is the current list of Draftail release blockers still present in Wagtail 2.0rc1:
- Deleting an image can delete the whole field
- #4295 Draftail crash when rich text field is named “description”
- The “Alt text” field should either be a modifiable input, or not an input at all. Right now it’s misleading everyone.
- For some reason the “Alt text” input became huge and lost its border radius between 2.0b1 and 2.0rc1
Another very noticeable deprecated functionality is the image that no longer float in the text. While I’m strongly in favor of the Draftail behaviour, it is to be expected that a vast part of users will want to keep the old behaviour (I already got feedback on this).
Deleting an image can delete the whole field
As listed below, I faced a case where the whole field disappeared when deleting an image. For some reason, the image was previously saved as outside of a paragraph, so the body
field contains this in the database:
<embed alt="Displaced_Persons_and_Refugees_in_Germany_BU6643.jpg" embedtype="image" format="right" id="503"/><p></p>
Note that the issue only occurs when you didn’t modify anything in that field since the page loaded. Adding content after the image, saving and trying to delete the image still does the same issue, even if you add an entire encyclopedia after the image.
Let’s delete an image!
No, you deleted the entire field.
Here is the corresponding JS error
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:15 (9 by maintainers)
Top GitHub Comments
Completed as of #4311 and Draftail 0.17.0.
Have created a PR for updating the HTML->contentstate converter: #4311. Unless I’m missing something, this change doesn’t break WYSIWYG - effectively, it just performs a one-off fixup of hallo.js content to add the spacer paragraphs that Draftail expects. From that point on, it’s functionally the same as content entered through Draftail, and the spacing will match what appears on the front-end.