Remove the buttons form the image dialoge WIP#102
Remove the buttons form the image dialoge WIP#102thibaudcolas merged 3 commits intowagtail:masterfrom
Conversation
17ae710 to
9c6ac17
Compare
thibaudcolas
left a comment
There was a problem hiding this comment.
Thank you @allcaps. Sorry it took quite a while for me to get back to this. I wanted to get a new release out with bug fixes before looking into enhancements.
The main reason why we didn't manage to get this working at the sprint is because... there is a bug in Draft.js. We were changing the image entity data but it wasn't reflecting in the UI, because at the moment entity data is a mutable global store and updating that only will fail to trigger a re-render of anything in the <Editor> component, which (wrongly) assumes its input to be immutable.
Long story short, I fixed that by adding a "useless" change on block data.
See facebookarchive/draft-js#839 for further details.
I also changed something somewhat unrelated – in the past, properties altText and alt were used interchangeably to handle the img's alt. This is now using alt everywhere.
|
Coverage decrease is because I forgot to ignore a file in |
Hello @thibaudcolas,
AltText does reset on close/open. Needs work.