-
Notifications
You must be signed in to change notification settings - Fork 75
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
Migrate some ImageChooserBlock
instances to ImageBlock
#480
Conversation
31a36c0
to
8963bf7
Compare
Hmmm perhaps I should remove the commit with the patch to use default alt text. It works great in the browser and most titles I checked were perfectly fine as the image's alt text. I tried to look into the failing python tests but I can't run them locally. I have a virtual env and tried |
… to ImageBlock On this site, most images have pretty decent titles so using them while we are converting from ImageChooserBlock to ImageBlock often produces the alt text you likely would have written anyway. Inserting it during the first page save makes this conversion a lot easier for our editors.
8963bf7
to
4fb0f62
Compare
4fb0f62
to
af5167b
Compare
I rebased this onto current main and whatever was causing tests to fail appears to have resolved itself. However, I am not getting the behavior I expect when creating a new blocks which contain an ImageBlock. If I choose an image I know has a description, I expected to see the "Alt text" field filled in with that description - like the image chooser in Draftail has done all along. But I am just getting blank fields for 'decorative' and 'alt/description'. If someone can replicate this on their installs, I think I'll raise an 'am I mistaken' issue on wagtail itself. @Stormheg @vossisboss (Note: I added description text on my local copy of the site; YMMV with other copies of the DB) |
No need to ask for permission @Chiemezuo. If you got time to move something forward, go ahead and do it. |
Closing this in favor of #503 |
Commit extracted from #478 (minus migration files to avoid conflicts)
We are not ready to move our usage over yet, as this will immediately result in validation errors when an editor tries to save an existing page with instances of
ImageBlock
on them, as the contextual alternative text will be missingThis PR is pending a decision on the way forward.
cc @cnk @vossisboss