question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Draftail remaining release blockers

See original GitHub issue

First 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!

capture d ecran 2018-02-16 18 15 19

No, you deleted the entire field.

capture d ecran 2018-02-16 18 15 56

Here is the corresponding JS error

capture d ecran de 2018-02-16 18-16-04

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:15 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
gasmancommented, Feb 28, 2018

Completed as of #4311 and Draftail 0.17.0.

1reaction
gasmancommented, Feb 24, 2018

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Formatting options - Draftail
Inline styles, providing inline formatting for text. They can overlap: text can be both bold and italic. · Blocks, that provide structure to...
Read more >
Wagtail Documentation - Read the Docs
Left -aligned Creates an image rendition using width-500, ... although this period may be extended if the further release blockers are.
Read more >
欢迎访问Wagtail's中文文档
开发人员应该将这些类添加到他们的前端CSS文件中,以准确定义他们想要的 left ... bugs that would have prevented a release in the first place (release blockers).
Read more >
draftail | Yarn - Package Manager
Important: This documentation covers modern versions of Yarn. For 1.x docs, see classic.yarnpkg.com. Yarn.
Read more >
Building A Medium-like Text Editor in ReactJS Using Draftail
There will be a floating icon on the left side which you can hover and click. If you want to format a specific...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found